On 11/19/2011 8:30 PM, Chaminda Indrajith wrote:
> Dear ALL,
> Is there a way of blocking mails from a top level domain? I have serious
> trouble with .info top level domain. Spamers send bulk mails from
> changing domain names under .info (Example: fakedomain1.info
> fakedomain2.info etc.)
> I tried to block it from sender restrictions, but it is not effective.

Using the EUSRR (everything under smtpd_recipient_restrictions) style of
main.cf, this will meet your needs.  I've been using it for a long time
with good results (but with a much longer list of TLDs than I included
here).


smtpd_recipient_restrictions =
     permit_mynetworks
     reject_unauth_destination
     ...
     check_reverse_client_hostname_access pcre:/etc/postfix/tld.pcre
     check_helo_access pcre:/etc/postfix/tld.pcre
     ...


/etc/postfix/tld.pcre

# reject mail from the following TLDs

/^.*?(cn|info|kr|my|ng|)$/i 550 We do not accept mail from .$1 domains



-- 
Stan

Reply via email to