[exim] Autoreply transport 'from'

Góra strony
Delete this message
Reply to this message
Autor: Martijn Grendelman
Data:  
Dla: exim-users
Temat: [exim] Autoreply transport 'from'
Hi all,

I was wondering if there could be any problems with the following, that
I may have overseen.

I have a autoreply transport, that looks like this:

mysql_reply:
         driver                  = autoreply
#       reply_to                = "${local_part}@${domain}"
#       from                    = "${local_part}@${domain}"
         # Experimental:
         reply_to    = "${original_local_part}@${original_domain}"
         from        = "${original_local_part}@${original_domain}"
         to          = ${sender_address}
         subject     = ${expand:${lookup mysql 
{MYSQL_ARSUBJECT}{$value}{Re: $header_subject:}}}
         text        = ${lookup mysql {MYSQL_ARTEXT}{$value}}
         log         = /var/log/exim4/autoreplylog
         once        = /var/spool/exim4/autoreply/${local_part}@${domain}.db
         once_repeat = ${lookup mysql {MYSQL_ONCE}{$value}{7d}}


Up to today, I used the settings for 'reply-to' and 'from' that are
commented above, but that caused an unwanted result in the case where
the address that triggered the autoreply was the result of a redirect.

In that case, the sender of the autoreply is the address that triggered
the autoreply (the final recipient) instead of the address that was
actually mailed to.

So I replaced ${local_part}@${domain} by
${original_local_part}@${original_domain} and that seems to work.

Are there any situations in which this does not work as expected? The
Exim spec states:

"When more than one address is being delivered in a single transport
run, $original_local_part is not set."

However, I cannot forsee if this could ever be the case here. Feedback
would be appreciated!

Best regards,

Martijn Grendelman