Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to make Spamassassin process just outgoing not incoming emails

Posted on 2007-12-05
9
Medium Priority
?
2,045 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
ID: 20409988
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
ID: 20410314
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
ID: 20410743
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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

Author Comment

by:multisites
ID: 20411407
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
 
LVL 36

Expert Comment

by:grblades
ID: 20412122
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
ID: 20414321
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
ID: 20586777
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
ID: 20588647
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 375 total points
ID: 20642929
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

Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as high-speed processing of the cloud.

Question has a verified solution.

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

We aren’t perfect, just like everyone else.  Check out the email errors our community caught and learn the top errors every email marketer should avoid.
The main intent of this article is to make you aware of ‘Exchange fail to mount’ error, its effects, causes, and solution.
In this video we show how to create a Distribution Group 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 >>…
In this video we show how to create a mailbox database 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 Servers >> Data…
Suggested Courses

916 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