Fighting SPAM with a Postfix relay server

2009-07-16 Thread Antonio Navarro Navarro
Hi all!

 

I have configured a Postfix server with amavisd and spammassassin as relay
server for several domains. All the mails sent to @example1.com and
@example2.com are received in the postfix server, and then redirected to the
real mail server for this domains.

 

We are receiving thousands of SPAM mails with headers similar to this ones:

 

From: randomt...@example1.com

To: realu...@example1.com

 

As this relay server only works receiving mails from external servers (all
the internal communications are handled by the real mail server for the
domains), is impossible to receive a real mail message with From: And To: in
the same domain.

 

How can I avoid this? I don’t want the postfix relay server to accept mails
with a from address in (@example1.com OR @example2.com) AND (to address in
@example1.com OR @example2.com).

 

Best regards,


 http://www.ticsconsulting.es/ 




Antes de imprimir este mensaje, asegúrese de que es necesario.
El medio ambiente es responsabilidad de todos. 

 

Este mensaje de correo electrónico y los ficheros adjuntos que pudiera
contener están dirigidos exclusivamente a los destinatarios especificados.
El mensaje y los documentos adjuntos pueden contener información
confidencial o legalmente protegida. No hay renuncia a la confidencialidad o
privilegio por cualquier transmisión errónea. Si usted no es el destinatario
indicado, le rogamos que lo elimine inmediatamente y se lo comunique al
remitente. No debe, directa o indirectamente, usar, revelar, distribuir,
imprimir o copiar ninguna de las partes de este mensaje. Si siendo
destinatario de este mensaje no consintiera el uso de correo electrónico,
rogamos nos lo comunique inmediatamente para su borrado para futuras
comunicaciones. El contenido de este mensaje y los ficheros adjuntos que
pudiera contener ha sido revisado para evitar la presencia de virus. 

 

image001.gifimage002.gif

Re: Fighting SPAM with a Postfix relay server

2009-07-16 Thread Noel Jones

Antonio Navarro Navarro wrote:

Hi all!

 

I have configured a Postfix server with amavisd and spammassassin as 
relay server for several domains. All the mails sent to @example1.com 
and @example2.com are received in the postfix server, and then 
redirected to the real mail server for this domains.


 


We are receiving thousands of SPAM mails with headers similar to this ones:

 


From: randomt...@example1.com mailto:randomt...@example1.com

To: realu...@example1.com mailto:realu...@example1.com

 

As this relay server only works receiving mails from external servers 
(all the internal communications are handled by the real mail server for 
the domains), is impossible to receive a real mail message with From: 
And To: in the same domain.


 

How can I avoid this? I don’t want the postfix relay server to accept 
mails with a from address in (@example1.com OR @example2.com) AND (to 
address in @example1.com OR @example2.com).


Using reject_rbl_client zen.spamhaus.org will likely get rid 
of the majority of these.


Postfix can't reject based on multiple header comparison; you 
need a content_filter such as SpamAssassin for that.


Postfix can reject an envelope sender in your own domain 
that's not from mynetworks or sasl authenticated.  See the 
archives if you need an example.


  -- Noel Jones



Re: Fighting SPAM with a Postfix relay server

2009-07-16 Thread Anthony Wong
The postfix add-on software smtpprox can do exactly what you want, with a
little modification.  Since smtpprox is written in perl it can adversely
affect system load, but it works very well for us and the affect on our
system load is negligible.