[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Avoid not authenticated forged mail



Carlos Acedo wrote:
Hi,

Once in a while I receive spam "from my own" mail address, many users send mails to themselfs, so what I would like is to allow only authenticated mail to be able to send mails to themselfs. Is that possible?

Thank you in advance.

Create a file /etc/postfix/filters/sender_checks.pcre like this:
#check the From field
/^(.*)pangea\.org$/     550 please login first
/^(.*)smothersrealty\.com$/   554 known spammer domain

Edit smtpd_recipient_restrictions from /etc/postfix/main.cf  like this:
smtpd_recipient_restrictions =
   permit_mynetworks,
   permit_sasl_authenticated,
   reject_invalid_hostname,
   reject_non_fqdn_hostname,
   reject_non_fqdn_sender,
   reject_non_fqdn_recipient,
   reject_unknown_sender_domain,
   reject_unauth_destination,
   reject_unauth_pipelining,
#this is the LINE
   check_sender_access regexp:/etc/postfix/filters/sender_checks.pcre,
#RBL balcklists
   reject_rbl_client   zen.spamhaus.org

Also make sure that mynetworks is more restrictive.

--
Best regards,
Adrian Minta    MA3173-RIPE, MA314-ROTLD
tel. 0212.022.660 0726.110.369


Reply to: