Solved

How to make Spamassassin process just outgoing not incoming emails

Posted on 2007-12-05
9
1,999 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
[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
  • 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
Industry Leaders: 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!

 

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 125 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

Industry Leaders: 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!

Question has a verified solution.

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

Suggested Solutions

Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …

752 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