Re: Auto-respond only if file exists

Peter Thomassen via Exim-users <[email protected]>
Newsgroups gmane.mail.exim.user
Organization a4a GmbH
Message-ID <[email protected]>
Hi Viktor,

On 8/6/25 09:07, Viktor Dukhovni via Exim-users wrote:
>> # Exim filter
>> if personal alias [email protected]
>> then
>>    unseen mail
>>      subject "Automatic reply: $h_subject:"
>>      from "[email protected]"
>>      extra_headers "Content-Type: text/plain; charset=UTF-8"
>>      file ./.reply.msg
>>      once ./.reply
>>      once_repeat 7d
>> endif
> 
> This filter is not a good idea.  It appears to fail to take into account
> the essential requirements of RFC3834:
> 
>      <https://datatracker.ietf.org/doc/html/rfc3834>
> 
> in particular the exceptions listed in:
> 
>      <https://datatracker.ietf.org/doc/html/rfc3834#section-2>
> 
> and ensuring that auto-reply envelope sender is the NULL sender: <>.
> 
> So unless those requirements are built-in features of the filter syntax,
> this filter MUST NOT be used without appropriate modifications.

The docs say that the "mail" command has "no effect when the incoming message is a bounce (delivery error) message, and messages sent by this means are treated as if they were reporting delivery errors. Thus, they should never themselves cause a bounce message to be returned." (https://www.exim.org/exim-html-current/doc/html/spec_html/filter_ch-exim_filter_files.html#SECTmail)

And indeed, the Return-path: header of so-generated response messages is <> (I've checked). Assuming I'm understanding things correctly, this should take care of it.

Best,
Peter

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   [email protected]
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.