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