It's been a long time coming, but due to impending and worsening hardware failure, I migrated the mail server, and the "home" directory section of the file server to a Dell PowerEdge 2450 w/~50Gb of Raid5 storage. I also switched from RedHat9 to Fedora Core 6. In the move, I went from UW-IMAP 2000 to UW-IMAP 2006, and from Sendmail to Postfix; which brings my environment closer to what I work on at work, making it more applicable to my daily life, and easier to learn, IMHO. After I finally got the mail server working (9am Saturday - 3am Sunday) I set to work on ripping out the X-Headers of all mails passing out through my SMTP server. This is something I've wanted to do for years, but until yesterday didn't have Postfix installed, and while I might have been able to find a way to do it with Sendmail before, it no doubt would have been UGLY!
I added the following line to /etc/postfix/main.cf
header_checks = regexp:/etc/postfix/maps/header_checks
Then made the /etc/postfix/maps/header_checks file
Then populated it with...
# Sample For Dropping Headers:
#/^Header: IfContains/ IGNORE
/^Received: from 127.0.0.1/ IGNORE
/^User-Agent:/ IGNORE
/^X-Mailer:/ IGNORE
/^X-Originating-IP:/ IGNORE
/^X-MimeOLE:/ IGNORE
/^X-MSMail-Priority:/ IGNORE
I cobbled the above together after reviewing several web sites, it's a lot of copy & paste with a little tweaking.
This will effectively delete all the above mentioned attributes from any mail leaving the box, shrouding what mail client I'm using internally, and making passive network monitoring only slightly more difficult.
No comments:
Post a Comment