Solved

How to make Spamassassin process just outgoing not incoming emails

Posted on 2007-12-05
9
1,973 Views
Last Modified: 2013-11-30
I have a Linux Server (let's call it Server-1), running Spamassassin, Sendmail, which works as POP and SMTP Server for hundreds of Domains. Normally it processes incoming as well as outgoing emails.

But now, all the incoming emails comes from and through another Server (let's call it Server-2) which works like a gateway. This Server-2 runs Postfix with MailScanner, Amavis and Spamassassin, so my Server-1 doesn't need anymore to again scan incoming emails, just outgoing emails.I want to lower its load.

Question: how to accomplish it? Is it possible to configure this just at its parameters?

Thanks.

Mario./


0
Comment
Question by:multisites
  • 4
  • 4
9 Comments
 
LVL 36

Expert Comment

by:grblades
Comment Utility
Is spamassassin accepting the mail? It would be unusual.
Normally Sendmail would accept the incoming mail and then there would be a filter (something like spamassass-milt) which acts as a filter and passes the mail to spamassassin.
0
 

Author Comment

by:multisites
Comment Utility
Sorry, as I am just an intermediate user, not a technician, I don't know exactly what the sequence is, maybe it is this way you mention.

Anyway, what I need is to scan with Spamassassin just the outgoing emails, not the incoming ones because these ones are already scanned and cleaned at the gateway Server.  So, how to accomplish it?

Thanks.
0
 
LVL 36

Expert Comment

by:grblades
Comment Utility
Spamassassin itself does not have that functionality. It just scans everything it is given.
You have to configure whatever mail software you are running not to pass the mail to spamassassin if you dont want it checked.

The way in which you do this will vary according to whatever mail software you are running (sendmail, qmail, exim, postfix etc...)
0
 

Author Comment

by:multisites
Comment Utility
Ok, I understood. In this case, I found out the it is procmail which pass the email on to Spamassassin. So, how could I configure it at procmail?
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 36

Expert Comment

by:grblades
Comment Utility
Probably configuring it so that only if the senders email address is in one of your domains would be sufficient.
Sorry but I dont know procmail filters so I will need to leave this to someone else to answer.
0
 

Author Comment

by:multisites
Comment Utility
Well, I was thinking that, as all the incoming emails come already cleaned from a gateway Server, which has an specific IP address and host name, may be this could be the test to be done. But I don't know where and how to configure this test.
0
 

Author Comment

by:multisites
Comment Utility
Hi,

As a matter of fact I didn't receive a real solution to my question. What I need to know is how to configure Procmail so that it can recognize that the incoming email comes from the gateway server (by the IP address), so, as it comes already cleaned, it should not be scanned twice. Please, see my previous comment. And if there's no solution I suggest that someone in community closes the question for me. Thanks.

Mario./
0
 
LVL 36

Expert Comment

by:grblades
Comment Utility
I would suggest you post in the support area and request this question be closed.
Then post a new question specifically asking about how to write the procmail filter.
0
 
LVL 7

Accepted Solution

by:
Bibliophage earned 125 total points
Comment Utility
This might help.

You can do a whitelist_from in your spamassassin local.cf file that states that if it comes _from_ a local address (@domain.org), which will bypass the spam checks on any email that says it comes from a local address.   The downside is that if someone sends you a spam with a spoofed from, it goes through clean.

http://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Conf.html#whitelist_and_blacklist_options

You probably don't even need to get procmail involved in the process at all (the process of bypassing SpamAssassin).  

The _best_ way to handle something like this is by having multiple SMTP processes.  You have your standard SMTP on port 25, which only handles incoming mail, and doesn't allow mail to be relayed, at all.

You then set up a second SMTP process, that requires authentication OR only allows from trusted IP addresses (local network, for example), on port 456 (preferably encrypted).

The second SMTP process doesn't bother using SpamAssassin at all.  It simply passes the mail through.  The first SMTP process passes everything through SpamAssassin.  

Using Qmail, this can be done pretty easily, especially by using the information from John Simpson's page at qmail.jms1.net.   I'm not certain how to do it under sendmail, because I haven't used sendmail in years.  

Here's a guy that modified procmail to use a whitelist set - http://impressive.net/people/gerald/2000/12/spam-filtering.html

This might also help a little - http://handsonhowto.com/pmail101.html

Good luck!
0

Featured Post

Do email signature updates give you a headache?

Do you feel like all of your time is spent managing email signatures? Too busy to visit every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

Join & Write a Comment

New-MailboxSearch Powershell Command and step by step approach to Search and Extract Emails form Exchange 2013 Journaling server.
Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
In this video we show how to create a User Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Mailb…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now