block all emails having same address in To and From

David Jones djones at ena.com
Sun Oct 13 22:15:07 UTC 2019


I wouldn’t recommend that.  There is legitimate emails that is sent using Bcc with the same from/to address.  Also, the visible From/To address could be different from the envelope-from/envelope-to addresses which may be a better indicator of spam.

I solve this problem using postfwd and adding headers for the envelope recipient count at the Postfix MTA level so I can detect abuse of the Bcc with the envelope-to.  The problem with this is inbound email will be split up by the sending MTA so you will only see recipients in the envelope-to that are destined for your mail server based on the MX lookup.

More than likely, there is a better way to detect and block the email you are seeing with the same From and To address.  If you post a lightly redacted version in pastebin.com and reply back with the link, then we may be able to help with some ideas.

Dave

From: MailScanner <mailscanner-bounces+djones=ena.com at lists.mailscanner.info> on behalf of Bilal Ahmad via MailScanner <mailscanner at lists.mailscanner.info>
Reply-To: MailScanner Discussion <mailscanner at lists.mailscanner.info>
Date: Sunday, October 13, 2019 at 1:12 PM
To: "mailscanner at lists.mailscanner.info" <mailscanner at lists.mailscanner.info>
Cc: Bilal Ahmad <bilal.ahmed at kfueit.edu.pk>
Subject: block all emails having same address in To and From


Dear All,
I want to block all emails having same address in To and From header .
Any solution plz



Sent from my Samsung Galaxy smartphone.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mailscanner.info/pipermail/mailscanner/attachments/20191013/d52e2821/attachment.html>


More information about the MailScanner mailing list