View Single Post
  #5  
Old 6th February 2008, 15:19
kule kule is offline
Junior Member
 
Join Date: Jan 2008
Posts: 14
Thanks: 0
Thanked 3 Times in 2 Posts
Default

*snip*
Hmm no it doesn't work for Bcc fields - I'll have to look into another method.

In case anyone wants to try this for blocking emails to a specific address in To: or Cc: fields:
*/snip*

I tried sending a bcc email to myself and received it so I assumed it didn't work. However I haven't had any spam mail since so this must be working with BCC fields too!

1) Add a line to your main.cf
Code:
header_checks = regexp:/etc/postfix/header_checks
2) Create a new file, /etc/postfix/header_checks
Code:
/addresstoblock@yourdomain\.com/    DISCARD
3) Restart postfix
Code:
/etc/init.d/postfix restart
This will silently accept the email but not deliver it - if you wish you can use REJECT instead of DISCARD and it will send an undelivered message back to the sender.

Cheers
Luke

Last edited by kule; 19th February 2008 at 18:28.
Reply With Quote