[exim] system_filter where in which config file?

Etusivu
Poista viesti
Vastaa
Lähettäjä: Peter van Loon
Päiväys:  
Vastaanottaja: exim-users
Aihe: [exim] system_filter where in which config file?
Dear exim users,

On a NAS, that is the incoming server for mail for my hobby domain
"example.nl", I'm running the Debian version of exim 4.80 and want to
re-route or forward any mail comming in at "*@example.nl" to my personal
mail address at my ISP "me@???". I'm new to exim, but after reading
the information available on the internet, I think the easiest way to do
this is to use a system filter?

Exim now always routes back mail as-is to the SMTP server at my ISP, where
it gets rejected on relaying, because example.nl is not their domain.

2014-02-09 00:24:30 H=smtp-xxx.example.com [xxx.xxx.xxx.xxx]
F=<me@???> rejected RCPT <anyone@???>: relay not permitted

Other tests show that the SMTP server will allow delivery to
"me@???", because it is in the ISP domain. So I created a very
simple system filter file that I think should deliver it to my personal mail
address (so it doesn't get rejected on relaying):

# Exim filter
logfile /var/log/exim4/filter.log
logwrite "This should show up in filter.log"
deliver "me@???"

If I test it, it seems to be OK:

root@mynas:~# /usr/sbin/sendmail -v -bF /etc/exim4/system_filter.exim
<~/test.mail
Return-path copied from sender
Sender      = root@???
Recipient   = root@???
Testing Exim filter file "/etc/exim4/system_filter.exim"


Logfile /var/log/exim4/filter.log
Logwrite "This should show up in filter.log\n"
Deliver message to: me@???
Filtering set up at least one significant delivery or other action.
No other deliveries will occur.

But after triggering several mails towards "me@???", that all got
rejected, the log file is still 0 size, so no log write has been executed
yet. This tells me that the filter is probably not applied, so there must be
something wrong in my config files. In /etc/exim4/exim4.conf, the line for
"system_filter" was added:

.ifndef LOCAL_DELIVERY
# The default transport, set in /etc/exim4/update-exim4.conf.conf,
# defaulting to mail_spool. See CONFDIR/conf.d/transport/ for possibilities
LOCAL_DELIVERY=mail_spool
.endif
system_filter = /etc/exim4/system_filter.exim


Now for my questions:

- Is this the correct place to put the "system_filter" config line?
- Is this enough configuration to get the functionality of forwarding
everything to my personal e-mail address?
- Do I need to configure anything else?
- Any other reason why this fails?


Exim info:

root@mynas:~# exim4 --version
Exim version 4.80 #3 built 02-Jan-2013 18:59:25
Copyright (c) University of Cambridge, 1995 - 2012
(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 -
2012
Berkeley DB: Berkeley DB 5.1.29: (October 25, 2011)
Support for: crypteq iconv() IPv6 GnuTLS move_frozen_messages DKIM
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz
dbmnz dnsdb dsearch nis nis0 passwd
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
Configuration file is /etc/exim4/exim4.conf