Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 08-30-2010, 10:04 AM   #16
Eduardo Nunes
LQ Newbie
Registered: Aug 2010
Location: /root/SouthAmerica/Brazil/SaoPaulo/SP
Distribution: Slackware
Posts: 24

Rep: Reputation: 2

Originally Posted by Mr. C. View Post
It is standard and common practice for these two to be different, for example:

Return-Path: <apache @>
From: <forums @>
I have added an option (DOMAIN_PASS) that will verify they come from the same domain and deliver the email.

It works great to discard those hotmail accounts saying they are anyone else.
Old 09-05-2010, 10:08 PM   #17
Eduardo Nunes
LQ Newbie
Registered: Aug 2010
Location: /root/SouthAmerica/Brazil/SaoPaulo/SP
Distribution: Slackware
Posts: 24

Rep: Reputation: 2
Lightbulb mail_from_check.content_filter reaches version 1.8

I have improved the mail_from_check content_filter (which reaches version 1.8 today!), you can now chain with other filters and besides the domain checks (if the Return-Path and From: header have the same domain but different users) the script can also check if the Return-Path domain is a subdomain of the From: header. Like it happen on some maillists:

Return-Path: < www @ >
From: < forums @ >

Always you can whitelist pieces or full addresses of Return-Path (with RegEx), like ebay that has a Return-Path of:

The content_filter also does verify if the email is rfc2822 compliant (by having all the required headers).

This is beeing enjoyful! I also derived this content_filter to integrate 3 antivirus at once and fully scan the email before final delivery. You can find it over here

*Edit: Mail_From_Check.Content_Filter is now updated to 2.0, now it does many tricks including chaining to from outside Postfix!

My Best Regards,

Eduardo Nunes

Last edited by Eduardo Nunes; 09-09-2010 at 09:52 AM. Reason: mail_from_check.content_filter reaches version 2.0
Old 09-14-2010, 01:28 PM   #18
Eduardo Nunes
LQ Newbie
Registered: Aug 2010
Location: /root/SouthAmerica/Brazil/SaoPaulo/SP
Distribution: Slackware
Posts: 24

Rep: Reputation: 2
Now to conclude my trilogy of content_filters, beyond the sender with rfc2822 validations and the 3 antivirus scanner I also made one which will do the body_checks on a base64 encoded email


antispam, postfix

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SLES 10 - Postfix mailer config - Return Path overwritten HuffmanT Linux - Enterprise 1 05-26-2008 11:12 PM
Allow only local domain mails reject other mails sikkalgopal Linux - Server 0 04-03-2007 01:51 AM
fetchmail - How to delete mails with sendmail 451 reject MQMan Linux - Networking 4 02-05-2007 11:52 AM
how to configure postfix to reject spams xlh3110 Linux - Server 18 12-19-2006 09:08 AM
Postfix: why is 'Return-Path' of bounce message empty Chowroc Linux - Networking 1 12-28-2005 04:52 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:29 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration