Re: [Exim] Autoreply problems, Exim 3.35

Top Page
Delete this message
Reply to this message
Author: Alex King
Date:  
To: exim-users
Subject: Re: [Exim] Autoreply problems, Exim 3.35
Thanks for the tip, it sent me in the right direction.

Just for reference, how I set up my autoresponder with a mime
attachment (exim 3.35):

[ in the directors: ]

autoreply_director:
driver = smartuser
transport = autoreply_transport
require_files = /etc/mail/autoreply/${local_part}

[ in the transports: ]

autoreply_transport:
driver = autoreply
file = /etc/mail/autoreply/${local_part}
headers = ${if exists {/etc/mail/autoreply.headers} {${lookup{${local_part}} lsearch {/etc/mail/autoreply.headers}{$value}}}}
from = ${local_part}@${domain}
log = /etc/mail/autoreply.log
reply_to = office@${domain}
subject = Autoreply
user = mail
to = $sender_address

[ explanation ]

If a file exists in in /etc/mail/autoreply/ with the name of foo, then a
message sent to foo@??? (where bar.com is a local domain) results in
a reply with the text in /etc/mail/autoreply/foo used as the message
body.

If there is also a line with:

foo:    X-Header-1: abc\nX-Header-2: def


in /etc/mail/autoreply.headers, then the two headers will be added to
the message also.

(As an aside, it would be simpler if I could keep all the headers for
each autoreply in a separate file, eg, /etc/mail/autoreply.headers/foo,
and include the entire file as the headers, rather than lsearch into a
keyed universal file. But there appears to be no string expansion to
include a file?)

Alex

On Fri, Aug 08, 2003 at 09:51:46AM +0100, Philip Hazel wrote:
> On Fri, 8 Aug 2003, Alex King wrote:
>
> > OK, I'm on exim 3.35 as long as Debian stable includes this version,
> > just for explanaion.
>
> > The autoreply transport (and output returned from a pipe transport)
> > seem to only allow you to secify the text of the message to be used as
> > the reply, not the headers.
>
> Can't remember how it was in 3.35, but in Exim 4 the autoreply transport
> has a "headers" option. This works if the message is generated by the
> transport. It isn't used if the message is generated by a filter script.
>
> [I'm afraid that getting help with Exim 3 is going to become more and
> more difficult.]
>
> --
> Philip Hazel            University of Cambridge Computing Service,
> ph10@???      Cambridge, England. Phone: +44 1223 334714.
> Get the Exim 4 book:    http://www.uit.co.uk/exim-book

>