I’ve been using SpamControl (http://www.fehcom.de/qmail/spamcontrol.html) in Qmail for a long time. But recently I came across a feature that’s just awesome. When you have SpamControl patch applied to your Qmail you can use some Control files to Control the flow of emails. Such a Control file is badmailfrom which normally resides in /var/qmail/control. Using this file we can reject any envelope sender. Very recently I found out that we can Reject email having From email address of your own domain but Originated from different source which is called Mail address spoofing. Normally it’s used to send Virus / Trojan / Ransomware. When you use this feature Mails having From@yourdomain.tld and having Relay entries in /etc/tcp.smtp will only be delivered and others will be Rejected. So Any Mail from Other IP’s which are not mentioned in the /etc/tcp.smtp and having From@yourdomain.tld will be rejected. I have implemented this and working for over a month now. Hope this will help someone else as well.
Sample badmailfrom file :
*@abc.net
!info@abc.net
@mydomain.tld+
This will reject all mail from abc.net except from info@abc.net.
@mydomain.tld+ , the address is appended with a ‘+’. If RELAYCLIENT (/etc/tcp.smtp) is not set and the sender address matches a corresponding entry (@mydomain.tld).
Recent Comments