Need some help with Exim config and Exin filters...
We use an antispam appliance to filter incoming mail. BUT some spammers send directly to the mailserver, ignoring the MX records. The antispam appliance adds a header to mail it has seen, so my first thought is to use an Exim filter to check for mail that does not have that special header:
This works great. BUT, it also catches valid mail sent from another domain on the same server, which is listed in local domains and hence does not go through the antispam appliance.
So my question is: can I check in my filter whether the sender domain is local?
Another thought I had was to check in the headers for
X-AntiAbuse: Primary Hostname - server-name.maindomain.com
which is added by Exim to outgoing mail. BUT, this header is not added to mail sent to another local domain. Aaargh! Is there a way of telling Exim to add a certain header to *all* mail, including that to local domains?
Cheers!
We use an antispam appliance to filter incoming mail. BUT some spammers send directly to the mailserver, ignoring the MX records. The antispam appliance adds a header to mail it has seen, so my first thought is to use an Exim filter to check for mail that does not have that special header:
Code:
# Exim filter
if not first_delivery and error_message then finish endif
if $header_X-My-Special-Header: is "" then
deliver <[email protected]>
endif
So my question is: can I check in my filter whether the sender domain is local?
Another thought I had was to check in the headers for
X-AntiAbuse: Primary Hostname - server-name.maindomain.com
which is added by Exim to outgoing mail. BUT, this header is not added to mail sent to another local domain. Aaargh! Is there a way of telling Exim to add a certain header to *all* mail, including that to local domains?
Cheers!