Solved

Postfix & spamassassin - how to whitelist smtp auth connections

Posted on 2004-08-13
7
2,981 Views
Last Modified: 2008-01-09
I am running postfix, amavis, apamassassin, and razor and it is working well.

However I do have a minor problem in that sometimes email from people outside the office is classed as spam because they are using dynamic IP addresses etc... They all use SMTP AUTH (no TLS) to our mail server.

I have had a look but postfix does not appear to add any custom headers when people send mail via SMTP AUTH.
Is there any way to configure postfix to add a custom header so that I can then look for it and whitelist these emails in spamassassin?
0
Comment
Question by:grblades
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 11795274
I don't know if you can generate a header for authenticated connections w/Postfix, but you can explictly whitelist those users in the SpamAssassin prefs.
0
 
LVL 36

Author Comment

by:grblades
ID: 11795313
The problem with whitelisting those users is that any spam pretending to be from them will get through which is not that uncommon.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11796836
Quite true, but the alternative is losing the mail by it being classified as spam. I'd accept a bit more spam to be sure that I didn't trash a legitimate email.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Expert Comment

by:pjedmond
ID: 11801536
The spamassassin whitelist format for local.cf examples:

whitelist_from      *rhn.redhat.com
whitelist_from      *@apple.com
whitelist_from  boss@yahool.com
whitelist_from  *@mycompany.com

Yes we know that they can be spoofed.........
0
 
LVL 9

Accepted Solution

by:
_GeG_ earned 500 total points
ID: 11801922
sorry, no fully featured solution, but maybe a hint ;):
check http://advosys.ca/papers/postfix-filtering.html
They have an interesting way to involve the filtering.
If you invoke spamassasin etc by a recipient map,
you can disable it for authenticated users, if you set

smtpd_recipient_restrictions = permit_sasl_authenticated
    check_recipient_access hash:/etc/postfix/filtered_domains
    ....

because the authenticated users are permitted in the first line, the rest must pass the filter. Of course this works only if you use sasl for authentication.
0
 
LVL 36

Author Comment

by:grblades
ID: 11802110
I'll have a look at that but I think it will be very difficult to implement with my configuration.

In postfix's master.cf file I have the normal smtp port defined as accepting email with a content filter to pass email onto amavis for virus checking. Amavis then passes the email back to postfix on a different port which then uses a content filter procmail:spamassassin to sent to spamd. Spamd then send the mail back to postfix using sendmail compatability and it gets delivered via procmail/lmtp.
This means each email goes through procmail 3 times.
I have to be carefull not to defing a default content filter etc... otherwise mail goes round in a continuous loop!
0
 
LVL 36

Author Comment

by:grblades
ID: 11882273
Thanks I haven't implemented anything in procmail. In the end I just reduced the score allocated to dynamic IP addresses as this has made very little difference to the spam we detect.

If we start getting lots of spam being sent from compromised home machines then I will need to look at this again.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question