Tagging forwarded mail?


#1

Does anyone know whether there’s a way to “tag” mail that comes through a Dreamhost forwarding address? E.g., all mail sent to "xxxx@domain.net" would carry a line such as

X-Forwarded-Through: xxxx@domain.net

Does anyone know how to do this?


#2

Not sure about tagging with your method, but the full headers of a message will show that it came through DreamHost in the Received: lines.

-Scott


#3

True, but the Received header only shows the first address that the message went “through.” I.e., if a message is received for xxxx@domain.net, forwarded to yyyy@domain.net, and then sent on to zzzz@anotherdomain.net, only the first address shows up in the headers. In my particular case, I’d like to be able to see "yyyy@domain.net" somewhere in the headers.


#4

As long as it’s not one of the mXXXXXX mailboxes, you can use procmail to add a header using the formail -A command.

-Scott


#5

Thanks, Scott. I’ve never used procmail before, but it looks like it’s time to learn!