Hi There, I used the postfix guide on the site which worked a charm! Only one little niggle, I've currently got a catchall, but I keep getting spam to a specific address - e.g. lots of spam, always going to [email protected]. Is there a way I can just block all emails to that address? Thanks Luke
*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
It can't work with bcc: fields, as there is no such fields in SMTP headers. header_checks do indeed check headers. Bcc recipient is entered by the protocol with RCPT-TO command, but otherwise bcc recipient is invisible.