Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regex to block spoof in Header Checks

Status
Not open for further replies.

scroome

Technical User
Jan 10, 2003
3
0
0
GB
Hi,

I have been trying to put together a PCRE format regular expression in the header_checks file to block senders spoofing our domain, but accepting a few addresses hosted by other companies that do spoof our domain to send mail in to our organisation. i.e.

We want to block allow spoofing of our domain @example.com, but allow a couple of exceptions like test1@example.com, and test2@example.com, test3@example.com.

The regex I have managed to write is working but very cumbersome and may be hard to manage in the future.

Could anyone suggest a better way of doing this instead ? we already have an entry in the sender_access file to block mail being spoofed as @exmaple.com but this does not always work and we are see a rise in the amount of address spoofed messages arriving in to the mail routers ?

Many thanks in advance.
 
We use a different technique to reject emails spoofing our domain/s. Greylisting.
It is very successful.
On CentOS the package is postgrey.
Simply, many spammers make up random usernames, and typically only make a single attempt to deliver their payloads.
So those emails are never accepted by postfix.
YMMV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top