Mailing List Archive

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@ringways.co.uk -d+all -bt noreply@ringways.co.uk 2>&1|gvim -

Example

2020-09-25 14:51:11 1kLo7y-0000Wk-RI <= gary.stainburn@ringways.co.uk
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@ringways.co.uk T="test 12"
2020-09-25 14:51:11 1kLo7y-0000Wk-RI => gary <abuse@ringways.co.uk>
R=localuser T=local_delivery
2020-09-25 14:51:11 1kLo7y-0000Wk-RI => abuse <abuse@ringways.co.uk>
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@ringways.co.uk:\
                 ! ^requests-new@ringways.co.uk:\
                 ! ^apache@ringways.co.uk:\
                 ! ^proteus@ringways.co.uk:\
                 ! ^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"



--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Router / Transport not working [ In reply to ]
On 25/09/2020 15:03, Gary Stainburn via Exim-users wrote:
> 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@ringways.co.uk -d+all -bt noreply@ringways.co.uk 2>&1|gvim -

and the debug output?
--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Router / Transport not working [ In reply to ]
Am 25.09.20 um 16:03 schrieb Gary Stainburn via Exim-users:

Which version are running ...

>
>            }
>      no_expn
>      require_files = /etc/exim/vacations/${local_part}_$domain.msg

.. and are you sure, it's not a tainted issue?

BTW: bad idea to use unsanatized input from emails in filenames or SQL
queries.

best regards,
Marius

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Router / Transport not working [ In reply to ]
On 25/09/2020 15:18, Jeremy Harris via Exim-users wrote:
> and the debug output?

https://www2.ringways.co.uk/exim.log

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Router / Transport not working [ In reply to ]
On 25/09/2020 15:03, Gary Stainburn via Exim-users wrote:
> 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@ringways.co.uk -d+all -bt noreply@ringways.co.uk 2>&1|gvim -

Doh, I should have realised before. "-bt" only tests routing. It
doesn't have a message to transport, so of course it doesn't show
transports being called.
--
Cheers,
Jeremy


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Router / Transport not working [ In reply to ]
On Fri, Sep 25, 2020 at 03:03:50PM +0100, Gary Stainburn via Exim-users wrote:
> However it isn't working and I can't see why - it did work once on a test
> email, but only the once.
...
> ???? log = /etc/exim/vacations/${local_part}_$original_domain.log
> ???? once = /etc/exim/vacations/${local_part}_$original_domain.db
> ???? once_repeat = 7d
_______^^^^^^^^^^^^^^^^

Isn't it configured to send report once in 7 days?
Did you look into mentioned log file?
--
Eugene Berdnikov

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Router / Transport not working [ In reply to ]
On 25/09/2020 18:36, Evgeniy Berdnikov via Exim-users wrote:
> On Fri, Sep 25, 2020 at 03:03:50PM +0100, Gary Stainburn via Exim-users wrote:
>> However it isn't working and I can't see why - it did work once on a test
>> email, but only the once.
> ...
>>      log = /etc/exim/vacations/${local_part}_$original_domain.log
>>      once = /etc/exim/vacations/${local_part}_$original_domain.db
>>      once_repeat = 7d
> _______^^^^^^^^^^^^^^^^
>
> Isn't it configured to send report once in 7 days?
> Did you look into mentioned log file?
On the one occassion that this transport worked, it created the log and
DB file.  On every other occasion, these files were not created.

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Router / Transport not working [ In reply to ]
On 25/09/2020 16:09, Jeremy Harris via Exim-users wrote:
> Doh, I should have realised before. "-bt" only tests routing. It
> doesn't have a message to transport, so of course it doesn't show
> transports being called.
Thanks for the info, I wasn't aware.  I'll investigate debugging transports

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Router / Transport not working [ In reply to ]
On 25/09/2020 15:45, Cyborg via Exim-users wrote:
> Am 25.09.20 um 16:03 schrieb Gary Stainburn via Exim-users:
>
> Which version are running ...

I'm running the latest version from the standard repo's. Centos 7 with epel.

[root@ollie2 ~]# exim -bV
Exim version 4.92.3 #3 built 30-Sep-2019 11:50:17
Copyright (c) University of Cambridge, 1995 - 2018
(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007
- 2018
Berkeley DB: Berkeley DB 5.3.21: (May 11, 2012)
Support for: crypteq iconv() IPv6 PAM Perl Expand_dlfunc OpenSSL
Content_Scanning DANE DKIM DNSSEC Event OCSP PRDR PROXY SOCKS TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm
dbmjz dbmnz dnsdb dsearch ldap ldapdn ldapm nis nis0 nisplus passwd sqlite
Authenticators: cram_md5 cyrus_sasl dovecot gsasl plaintext spa tls
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Malware: f-protd f-prot6d drweb fsecure sophie clamd avast sock cmdline
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
Configuration file is /etc/exim/exim.conf
[root@ollie2 ~]#

>>            }
>>      no_expn
>>      require_files = /etc/exim/vacations/${local_part}_$domain.msg
> .. and are you sure, it's not a tainted issue?
>
> BTW: bad idea to use unsanatized input from emails in filenames or SQL
> queries.

I will investigate sanitizing variables. How do I check if it is a
tainted issue?

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/