How to make Spamassassin process just outgoing not incoming emails

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./


multisitesAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
BibliophageConnect With a Mentor Commented:
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
 
grbladesCommented:
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
 
multisitesAuthor Commented:
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
Worried about phishing attacks?

90% of attacks start with a phish. It’s critical that IT admins and MSSPs have the right security in place to protect their end users from these phishing attacks. Check out our latest feature brief for tips and tricks to keep your employees off a hackers line!

 
grbladesCommented:
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
 
multisitesAuthor Commented:
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
 
grbladesCommented:
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
 
multisitesAuthor Commented:
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
 
multisitesAuthor Commented:
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
 
grbladesCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.