Re: [EXIM] Newbee Question re autoreply

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: David M Walker
CC: Exim Users Mailing List
Sujet: Re: [EXIM] Newbee Question re autoreply
On Mon, 23 Nov 1998, David M Walker wrote:

> If a file called .autoreply exists in the users home directory as
> defined in /monza/clients/${domain}/etc/passwd then the contents
> of the .autoreply must sent back to the message originator, with
> a reply-to equivalent to the original recipient. If that recipient
> also has a .forward file the original inbound message must still
> be forwarded to the the location specified in that .forward.


Off the top of my head, nothing tested. Here's the transport that sends
the message:

auto_transport:
  driver = autoreply
  from = $local_part@$domain 
  to = $sender_address
  subject = some appropriate subject
  file = "${extract{6}{:}{\
    ${lookup{$local_part}lsearch{/monza/clients/${domain}/etc/passwd}}\
    /.autoreply"
  user = $local_part   


Maybe you don't want "user = $local_part" if the user has no account on
your system. You might have to have "user = exim". Unfortunately, the
current release doesn't have a "reply_to" keyword (the next one will
have), but you shouln't need a reply-to: header when you have from:.

Here's a director that calls the transport:

auto_director:
  driver = smartuser
  transport = auto_transport
  require_files = "\
    ${lookup{$local_part}lsearch{/monza/clients/${domain}/etc/passwd}}\  
    /.autoreply"
  condition = ${if eq{$sender_address}{}{no}{yes}}
  unseen


Because it has "unseen" set, the address will be passed on to subsequent
directors which can handle any .forward file in the normal way. You need
to put this director *before* the other directors. The "condition" stops
it trying to send autoreplies to null senders (i.e. in response to
bounce messages).

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



--
*** Exim information can be found at http://www.exim.org/ ***