[exim] Trying to install Vacation autoreplies.

Etusivu
Poista viesti
Vastaa
Lähettäjä: Ernie Dunbar
Päiväys:  
Vastaanottaja: exim-users
Aihe: [exim] Trying to install Vacation autoreplies.
I'm using Exim 4.69, and I'm trying to set up Vacation Autoreplies the <a
href="http://wiki.exim.org/EximAutoReply">nice way</a>, but I have one
important difference in my configuration.

We're using Postfix Admin for our user administration website, which will
allow our customers to do their vacation messages themselves. Postfix
Admin stores the Vacation message in MySQL, not in a .vacation file, so
I've modified the code from Example 2 of the above site.

The trouble I'm having is that while mail to the user with the vacation
message (gromm@???) gets delivered to his mailbox, the sender
(ernied@???) gets the following message back:

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  gromm#mocku.edu@???
    (ultimately generated from gromm@???)
    Unrouteable address



Here is my Router:

uservacation:
  driver = accept
#  domains = +local_domains
  domains = ${lookup mysql { \
    SELECT domain FROM vacation \
    WHERE email='${quote_mysql:$local_part@$domain}' \
    AND active=1 \
    }{$value}}


#  domains = mocku.edu
#  domains = ${lookup mysql{MYSQL_VACATIONEMAIL}}
  condition = ${if or { \
    { match {$h_precedence:} {(?i)junk|bulk|list} } \
    { eq {$sender_address} {} } \
    { def:header_X-Cron-Env: } \
    { def:header_Auto-Submitted: } \
    { def:header_List-Id: } \
    { def:header_List-Help: } \
    { def:header_List-Unsubscribe:} \
    { def:header_List-Subscribe: } \
    { def:header_List-Owner: } \
    { def:header_List-Post: } \
    { def:header_List-Archive: } \
    { def:header_Autorespond: } \
    { def:header_X-Autoresponse: } \
    { def:header_X-Autoreply-From: } \
    { def:header_X-eBay-MailTracker: } \
    { def:header_X-MaxCode-Template: } \
    { match {$h_X-Auto-Response-Suppress: } {OOF} } \
    { match {$h_X-OS:} {HP Onboard Administrator} } \
    { match {$h_X-MimeOLE:} {\N^Produced By phpBB2$\N} } \
    { match {$h_Subject:} {\N^Yahoo! Auto Response$\N} } \
    { match {$h_Subject:} {\N^ezmlm warning$\N} } \
    { match {$h_X-FC-MachineGenerated:} {true} } \
    { match {$message_body} {\N^Your \"cron\" job on\N} } \
    { match {$h_Subject:} {\N^Out of Office\N} } \
    { match {$h_Subject:} {\N^Auto-Reply:\N} } \
    { match {$h_Subject:} {\N^Autoresponse:\N} } \
    { match {$h_Subject:} {\N(Auto Reply)$\N} } \
    { match {$h_Subject:} {\N(Out of Office)$\N} } \
    { match {$h_Subject:} {\Nis out of the office.$\N} } \
    { match {$h_From:} {\N(via the vacation program)\N } } \
    { match {$h_X-Spam-Flag:} {\N^yes\N} } \
    } \
                       } {no} {yes} \
               }


# user = ${lc:$local_part}
# senders = !+noautoreply_senders
transport = vacation_transport
unseen
no_expn
no_verify


And here is my Transport:

vacation_transport:
driver = autoreply
once_repeat = 7d
once = /var/log/exim4/vacation/${local_part}@${domain}.once
log = /var/log/exim4/vacation/${local_part}@${domain}.log

# Errors-To: is deprecated
# There are arguments over whether this should send to the SMTP sender, or
# to a From:, Reply-To: or Resent-From: header
to = "${if def:h_Errors-To: {$h_Errors-To:} {$sender_address}}"
from = ${local_part}@${domain}
subject = "Re: $h_Subject"
text = ${lookup mysql {MYSQL_VACATIONMESSAGE} {$value} fail }
return_message
user = mail