[exim] Router / Transport not working

Etusivu
Poista viesti
Vastaa
Lähettäjä: Gary Stainburn
Päiväys:  
Vastaanottaja: exim-users
Aihe: [exim] Router / Transport not working
I need to be able to do auto attend / vacation emails for non-user
accounts.  I have copied the existing router and transport for the user
vacations and amended accordingly.

However it isn't working and I can't see why - it did work once on a
test email, but only the once.

It appears that the router is working, and the transport is getting
called. If I change the filename in the transport so that it doesn't
exist then I get an error. However, it never generates a response email.

Anyone got any ideas?

I have tried with a number of different aliases including aliases to
user accounts, black holes etc.
For some aliases the global_vacation_reply line appears in the log, for
others it doesn't.
In the transport I have used both $domain and $original_domain. Neither
work.

If I use the following command it shows the router working as expected,
and the transport is queued, but never shows the transport doing anything.

exim -f gary@??? -d+all -bt noreply@??? 2>&1|gvim -

Example

2020-09-25 14:51:11 1kLo7y-0000Wk-RI <= gary.stainburn@???
H=rwsys1.ringways.co.uk (eddie.ringways.co.uk) [10.1.1.105] P=esmtpsa
X=TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256 CV=no A=dovecot_plain:gary
S=129337 id=8e1612ab-9fe0-16bf-0090-f9407cf177e7@??? T="test 12"
2020-09-25 14:51:11 1kLo7y-0000Wk-RI => gary <abuse@???>
R=localuser T=local_delivery
2020-09-25 14:51:11 1kLo7y-0000Wk-RI => abuse <abuse@???>
R=global_vacation T=global_vacation_reply
2020-09-25 14:51:11 1kLo7y-0000Wk-RI Completed

Router

global_vacation:
     driver = accept
     # do not reply to errors or lists
     condition = ${if or { \
                               {match {$h_precedence:}
{(?i)junk|bulk|list}}  \
                     {eq {$sender_address} {}} \
                    } \
                   {no} {yes} \
           }
     no_expn
     require_files = /etc/exim/vacations/${local_part}_$domain.msg
     # do not reply to errors and bounces or lists
     senders = " ! ^.*-request@.*:\
                 ! ^.*-bounce@.*:\
                 ! ^owner-.*@.*:\
                 ! ^requests@???:\
                 ! ^requests-new@???:\
                 ! ^apache@???:\
                 ! ^proteus@???:\
                 ! ^postmaster@.*:\
                 ! ^listmaster@.*:\
                 ! ^mailer-daemon@.*:\
                 ! ^root@.*"
     transport = global_vacation_reply
     unseen
#    user = ${local_part}
     no_verify

Transport

global_vacation_reply:
     driver = autoreply
     file = /etc/exim/vacations/${local_part}_$original_domain.msg
     file_expand
     from = Autoreply System <${local_part}@$original_domain>
     log = /etc/exim/vacations/${local_part}_$original_domain.log
     once = /etc/exim/vacations/${local_part}_$original_domain.db
     once_repeat = 7d
     subject = "Re: ${rfc2047:${escape:${length_60:$h_subject:}}}
(Auto-reply)"
     text = "\
     Dear $h_from\n\n\
     "
     to = "$sender_address"