NetAdminTools.com
 
SignalQ Sites:
NetAdminTools - Coprolite - NoNIC - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - MCJ - FixRambler
Categories:
GNU/Linux | Homebrew designs | Perl | Administration | Backup/Recovery | Bugs/Fixes | Certification | Database | Email | File/Print | Hardware | Information Grab Bag | Interoperability | GNU/Linux ABCs | Monitoring | Name Resolution | Network Services | Networking | Remote Control | Security | Desktop | Web | BSD | Solaris | GIAGD | REALbasic

Last 30 Days | Last 60 Days | Last 90 Days | All Articles | RSS | Hail Support


Categories:
·GNU/Linux
·Homebrew designs
·Perl
·Administration
·Backup/Recovery
·Bugs/Fixes
·Certification
·Database
·Email
·File/Print
·Hardware
·Information Grab Bag
·Interoperability
·GNU/Linux ABCs
·Monitoring
·Name Resolution
·Network Services
·Networking
·Remote Control
·Security
·Desktop
·Web
·BSD
·Solaris
·GIAGD
·REALbasic
·All Categories


Rejecting Email Based on Headers With Postfix
Topic: Email   Posted:2006-07-29
Printer Friendly: Print

spacerspacer
Postfix has the ability to reject mail based on regular expression matching in the header of the incoming mail message. To enable this, add these lines to main.cf:

header_checks = regexp:/etc/postfix/header_checks
header_checks = pcre:/etc/postfix/header_checks

We stuck these after the alias line. Add the header content matches and actions to header_checks (usually in /etc/postfix) and restart postfix. Here is an example match and action:

/badwordnotallowed/ REJECT No Spam Allowed

The logs will show the email being rejected:

Jul 29 09:18:38 main postfix/cleanup[3479]: E855A5555BA: reject: header Subject:
badwordnotallowed from host.example.com[200.0.1.8]; from=<> to=<host2@example.co
m> proto=ESMTP helo=<host.example.com>: No Spam Allowed





Please read our Terms of Use
Microsoft, Windows, Windows XP, Windows 2003, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. NetAdminTools.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds, and refers to the Linux kernel. The operating system of most distributions that contain the Linux kernel is GNU/Linux. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2008 NetAdminTools.com

Created by:
MCJ
MCJ CMS