Maniak
Verified User
Hi buddies,
I guess on this forum we are all against spam.
Many people know that even using the maximum security, it is each time possible to bypass the security, or simply to use a bad customer script to spam thru the mail() function of PHP including an outside script, or even a registered customer would decide to spam..
So far I was using a patch for PHP that was telling me which script was sending which mail, but it's boring to recompile it each time you upgrade PHP, so today i got a mail from a script using the cPanel, and he had headers like :
So, I was thinking that it can be nice to add it to my exim too, but I wasn't sure that this will work with PHP script using the mail() function, so I tried and I can say that it works.
So, if you also want to add a tag to your outgoing mail, such as I showed upper, simply change this in your /etc/exim.conf :
to this :
Restart exim. Now you have an easy way to check find the source in case someone will complain for mail abuse, or just for your fun.
I have noticed that the mails are a bit slower with this system.
I guess on this forum we are all against spam.
Many people know that even using the maximum security, it is each time possible to bypass the security, or simply to use a bad customer script to spam thru the mail() function of PHP including an outside script, or even a registered customer would decide to spam..
So far I was using a patch for PHP that was telling me which script was sending which mail, but it's boring to recompile it each time you upgrade PHP, so today i got a mail from a script using the cPanel, and he had headers like :
Code:
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - hostname.domain.net
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [26 6]
X-AntiAbuse: Sender Address Domain - domain.net
So, I was thinking that it can be nice to add it to my exim too, but I wasn't sure that this will work with PHP script using the mail() function, so I tried and I can say that it works.
So, if you also want to add a tag to your outgoing mail, such as I showed upper, simply change this in your /etc/exim.conf :
Code:
lookuphost:
driver = dnslookup
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
condition = "${perl{check_limits}}"
transport = remote_smtp
no_more
to this :
Code:
lookuphost:
driver = dnslookup
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
headers_add = "X-AntiAbuse: This header was added to track abuse, please include it with any abuse report\n\
X-AntiAbuse: Primary Hostname - $primary_hostname\n\
X-AntiAbuse: Original Domain - $original_domain\n\
X-AntiAbuse: Originator/Caller UID/GID - [$originator_uid $originator_gid] / [$caller_uid $caller_gid]\n\
X-AntiAbuse: Sender Address Domain - $sender_address_domain\n"
condition = "${perl{check_limits}}"
transport = remote_smtp
no_more
Restart exim. Now you have an easy way to check find the source in case someone will complain for mail abuse, or just for your fun.
I have noticed that the mails are a bit slower with this system.