Thank you. I'll test this out. ____________________________ Matt Ausmus Network Administrator Chapman University 635 West Palm Street Orange, CA 92868 (714)628-2738 maus...@chapman.edu "You can lead a horse to water, but if you can get him to float on his back, you've got something." -HARTLEY'S FIRST LAW
-----Original Message----- From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] On Behalf Of Wietse Venema Sent: Thursday, May 28, 2009 12:41 PM To: Postfix users Subject: Re: Sender address rewrite Matt Ausmus: > > I'm using postfix 2.3.3 on some Centos 5.x boxes strictly to send mail > > for alerting purposes. I've got relaying setup to go to our main smtp > > server which is running FreeBSD 6.x and postfix. What I'm trying to do > > is for the outgoing messages to show the hostn...@chapman.edu so I can > > look at the incoming message and know what box the alert is coming from. > > The scripts I'm using are utilizing mailx to send the messages. > > > > I setup sender_canonical and the address rewriting is working properly. > > The problem that I'm having is that the mail is displayed in my mail > > client as just root. When I open the message it shows: > > > > Root [hostn...@chapman.edu] or "root" <hostn...@chapman.edu> > > > > Depending on the client. I checked the header of the message and it > > shows (this is an excerpt: From: kennedydhcp...@chapman.edu (root)). > > What I want to do is get rid of "Root[...]" and just have the rewritten > > email address displayed in the mailbox list. > > > > How can I accomplish this? The From: header of the email message has the following information: From: kennedydhcp...@chapman.edu (root) Mail clients change this information into: Root [kennedydhcp...@chapman.edu] or "root" <kennedydhcp...@chapman.edu> I think this is a silly request. To remove text, you can use a REPLACE action in a header_checks file that deletes the (root) portion, keeping in mind that ".", "(" and ")" are special characters in regular expression context. Here is an example that uses PCRE: /etc/postfix/main.cf: header_checks = pcre:/etc/postfix/header_checks.pcre /etc/postfix/header_checks.pcre: /^(From:\s+...@chapman\.edu)\s+\(root\)$/ REPLACE $1 Wietse