Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 1st February 2008, 19:23
kule kule is offline
Junior Member
 
Join Date: Jan 2008
Posts: 14
Thanks: 0
Thanked 3 Times in 2 Posts
Default PostFix drop mail to specific account

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 abc@mydomain.com.

Is there a way I can just block all emails to that address?

Thanks
Luke
Reply With Quote
Sponsored Links
  #2  
Old 2nd February 2008, 20:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

Take a look here: http://www.postfix.org/header_checks.5.html
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 2nd February 2008, 20:23
kule kule is offline
Junior Member
 
Join Date: Jan 2008
Posts: 14
Thanks: 0
Thanked 3 Times in 2 Posts
Default

Cheers Falco, I'll take a look - will that work for BCC fields as well?
Reply With Quote
  #4  
Old 3rd February 2008, 20:18
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

I'm not sure...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 6th February 2008, 16: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 19:28.
Reply With Quote
The Following 2 Users Say Thank You to kule For This Useful Post:
falko (7th February 2008), minskog (12th March 2008)
  #6  
Old 5th September 2012, 01:01
jarif jarif is offline
Junior Member
 
Join Date: Sep 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

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.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
procmail can't write Hellbound General 27 8th June 2009 22:51
Postfix problem: lost connection after CONNECT from unknown fernando_torrez Server Operation 5 30th November 2007 15:17
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 16:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 16:36
Core 4: Error Messages on Fresh Install re CTX/SSL jjw Installation/Configuration 30 6th September 2006 13:16


All times are GMT +2. The time now is 19:39.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.