Question about rejecting email

Markus Nilsson markus at
Fri Feb 4 07:39:13 GMT 2011

Hi David,

If you are using postfix, a rule with something like:

smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/check_sender_access ...

Where /etc/postfix/check_sender_access contains

.XX       5NN We do not accept mails from the tld .XX
default   OK

I have not tested this, but I guess something along this could achieve what you want! (If you really want it ...)

Just because the sender address has some tld does not mean the mail originates from that country! 


----- Original Message -----
From: "David Jourard" <davidj at>
To: mailscanner at
Sent: torsdag, 3 feb 2011 22:27:41
Subject: Question about rejecting email


I have mailscanner running for a while and haven't work with it for awhile.

Today a customer asked me to reject email for his email address coming from
email that ends in somename at somedomain.xx  where xx is a particular county
he is getting a lot of spam.

Could someone guide me on how to create a ruleset for this request.

David J.

MailScanner mailing list
mailscanner at

Before posting, read

Support MailScanner development - buy the book off the website! 

CronLab scanned this message. We don't think it was spam. If it was,
please report by copying this link into your browser:

This message has been scanned for viruses and dangerous content by CronLab
(, and is believed to be clean.

More information about the MailScanner mailing list