×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Regex to block spoof in Header Checks

Regex to block spoof in Header Checks

Regex to block spoof in Header Checks

(OP)
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.

RE: Regex to block spoof in Header Checks

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close