Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-29-2003, 11:04 PM   #1
Registered: Jun 2003
Distribution: Redhat
Posts: 87

Rep: Reputation: 15
POSTFIX how to block/delete mail from sender...

I recently receive a lot of junk mail from these two email address:

My question is: can I setup postfix auto delete all mail from these 2 address? If yes, how to do that?

Old 12-30-2003, 07:19 AM   #2
Registered: Nov 2002
Location: England
Distribution: Ubuntu 9.04
Posts: 631

Rep: Reputation: 30
One way is to use procmail as a backend mail processor to postfix, then tell procmail to delete all mail from these two accounts.
Old 12-30-2003, 08:30 AM   #3
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
This can help you out
Old 12-30-2003, 01:53 PM   #4
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
cat regexp_table

/^From: "MS / REJECT
/^From: "microsoft/ REJECT
/^From: "Microsoft/ REJECT


header_checks =

Last edited by DavidPhillips; 12-30-2003 at 01:56 PM.
Old 10-04-2009, 03:33 AM   #5
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
I'm recently frequently getting bad traffic to/from the same user such as


Is it possible to reject an email based on a sender AND recipient? From what I've got from the man page, the decisions are only based on one line at a time.

If that's the case, what are my options?
Old 12-29-2009, 11:11 PM   #6
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
See the regexp_table examples above.

It shows the contents of the file.

To: can also be used.

The file is where you define the file to use for header checks.

Last edited by DavidPhillips; 12-29-2009 at 11:37 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix Bounce Mail To sender when error is found heero82 Linux - Software 1 10-14-2005 04:46 PM
Postfix - Sender address includes localhost buskmann Linux - Software 1 05-04-2005 08:56 AM
Postfix: Sender address rejected when matching $mydestination [GOD]Anck Linux - Software 1 02-16-2005 06:42 AM
Postfix should do more than delete any incoming mail, right? icarus24 Linux - Networking 12 01-05-2004 10:11 PM
Mail Error: sender domain must exist ?? _TK_ Linux - Newbie 2 02-28-2001 10:49 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration