listadecorreo a écrit :
> 
> Hello
> 
> in the last month I revived a lot of spam from user_non_ex...@mydomain
> to user_ex...@mydomain..... can I block all received externals mails
> from my domain to my domain...
> I use postfix with amavis (spamassassin/clamav)
> 


- to block mail from user_not_ex...@yourdomain, simply use
        reject_unlisted_sender
in your smtpd restrictions, or even more simply, set
smtpd_reject_unlisted_sender = yes
The latter applies to all mail.

- to block mail from user_ex...@yourdomain if it comes from external
clients and is not authenticated, then simply use

smtpd_recipient_restrictions =
        permit_mynetworks
        permit_sasl_authenticated
        reject_unauth_destination
        check_sender_access hash:/etc/postfix/access_sender
        ...

== access_sender
example.com     REJECT not allowed without authentication
.example.com    REJECT not allowed without authentication
...

This will reject all mail from j...@example.com or j...@sub.example.com
unless it comes from mynetworks or the user was authenticated.

note this applies to envelope addresses (MAIL FROM), not to headers
(From: or Reply-To:).

If you are about headers, first try zen as suggested before. for the
spam that slips, tune spamassassin.

Reply via email to