Thank you Ansgar, Does it mean I cannot use this method to block un desirable mails this way? At first I tried using the method explained on http://www.cyberciti.biz/faq/howto-blacklist-reject-sender-email-address/ but this could not allow postfix to restart. That is why I resort to this. Is there another way around this?
-- .................................................................. Seat of Wisdom ..........................Pray for us Cause of our Joy...........................Pray for us ................................................................... Mayengo Tom Kizito +256-752-602550 +256-782-062708 -----Original Message----- From: Ansgar Wiechers <li...@planetcobalt.net> To: postfix-users@postfix.org Subject: Re: Using Header_checks to stop specific incoming mails Date: Fri, 13 Apr 2012 18:54:50 +0200 On 2012-04-13 Kizito Thomas wrote: > I have been trying to block some incoming mails using header_checks but > I am failing to block them, they are still going through. > I have read and used info from > http://www.postfix.org/header_checks.5.html and specifically followed > the synopsis of: header_checks = regexp:/etc/postfix/header_checks. > I am using regexp because under "Table Format" regexp support is more > widely available and it is also the look up table for my installation. > I have also followed > http://www.techiepark.com/wp-content/uploads/2009/09/header_checks.txt > while designing my /etc/postfix/header_checks file, which looks like > below: > # more /etc/postfix/header_checks > /^From:t...@mayengo.or.ug/ REJECT > ###################### > For this am still testing with one email address to make sure the > implementation is safe. > I have also edited the /etc/postfix/main.cf to have a line: > header_checks = regexp:/etc/postfix/header_checks > I have restarted postfix but the mails from t...@mayengo.or.ug are still > going through. > I don't know what am doing wrong, may be people from here can help me. cobalt@iridium:~ $ man header_checks | grep "added by the cleanup" -A2 Message headers added by the cleanup(8) daemon itself are excluded from inspection. Examples of such message headers are From:, To:, Message- ID:, Date:. Regards Ansgar Wiechers