[Exim] autoreply

Top Page
Delete this message
Reply to this message
Author: Ferenc Kiraly
Date:  
To: exim-users
Subject: [Exim] autoreply
    Hi!

I am trying to create an autoreply transport using the shadow_transport
and shadow_condition transport options.

As I do not have any user accounts on the mail server, I cannot have my
users use their .forward files to implement filters to use the
vacation program or something similar.

E-mail to users is delivered with the cyrus_delivery transport. The
users are known only to the Cyrus POP/IMAP daemons. The relevant part
of the transport is below.

The idea is to use shadow_condition to look up users in a file, for
which an automatic reply should be generated. However the
shadow_condition does not seem to work if I include a single-key
lookup in the string.

The transport works as expected, if I change the condition to
shadow_condition = "yes", sending an autoreply for any sucessfully
delivered message.

Can anybody help me out on this? Is there any other way to implement
automatic replies on a system where there are no local users?

In reality I would want use a more complicated condition, excluding
replies to mailing lists, etc....

Thanks,

    feri.


-----------------------------------------------------------

address_reply:
driver = autoreply
file = /var/spool/vacations/body-${local_part}
log = /var/spool/vacations/log-${local_part}
once = /var/spool/vacations/once-${local_part}
once_repeat = 1d
from = ${local_part}@${domain}
to = ${sender_address}
subject = "AUTOREPLY: $header_subject"


cyrus_delivery:
   driver = pipe
   command = "/usr/sbin/cyrdeliver ${local_part}"
   envelope_to_add = true
   return_path_add = true
   return_output
   prefix = ""
   user = cyrus
   shadow_transport = address_reply
   # shadow_condition = "yes"
   shadow_condition = "${lookup{$local_part} \
    lsearch {/var/spool/vacations/vacationeers}{yes}{no}}"