I like exim's built-in vacation reply feature, but it doesn't seem to be
working as advertised. Well, it's either the ${if {}{}{}} construct, or
the 'condition =', or something else that isn't mentioned in any
examples I've seen in mailing lists and web pages I've searched.
I've been told to *not* reply with vacation messages to messages that
are mail-bounce errors (like those caused by NetSky or MyDoom), nor
messages delivered to group aliases (/etc/aliases:"team: bob, ted,
alice"), nor mailing lists nor messages tagged as spam.
I have this configuration, which I think should work, but I get a
vacation autoreply for every message despite what the "condition =" is
set to. Since it depends on headers and variables like $sender_address,
I can't just feed it into exim -be. Could someone have a look and tell
me what I'm doing wrong?
---begin quote
### Started with http://www.afp548.com/Articles/Jaguar/eximvacation.html
user_vacation:
driver = smartuser
no_expn
no_verify
unseen
require_files = /var/www/vacation/user/${local_part}/vacation.msg
# do not reply to errors or SPAM-tagged messages or alias lists
# or junkmail
condition = " \
${if or { \
{ eq {$sender_address}{} } \
{ def:header_x-spam-flag: } \
{ !match {$header_to:}{(?i)$local_part} } \
{ match {$h_precedence:}{(?i)junk|bulk|list} } \
}{no}{yes} \
} "
#condition = "${if or {{match {$h_precedence:} {(?i)junk|bulk|list}} \
# {eq {$sender_address} {}}} {no} {yes}}"
# do not reply to errors and bounces or lists
senders = " ! ^.*-request@.*: \
! ^owner-.*@.*: \
! ^postmaster@.*: \
! ^listmaster@.*: \
! ^mailer-daemon@.*: \
! ^root@.*"
user = ${local_part}
transport = vacation_reply
---end quote