public inbox for gentoo-server@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-server] Postfix: Can I insert a custom header to incoming mail?
@ 2011-07-07 21:50 Paul Hartman
  2011-07-07 22:25 ` kashani
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Hartman @ 2011-07-07 21:50 UTC (permalink / raw
  To: gentoo-server

Hi,

The background:

Long-time Gentoo user, newbie to mail server setup. I've got a Gentoo
server (~amd64) and I set up Postfix and Dovecot following this guide:
http://en.gentoo-wiki.com/wiki/Mail_server_using_Postfix_and_Dovecot

I'm using postfix-2.8.4 and dovecot-2.0.13

So far, everything works as advertised. I've added a domain, created
accounts, additionally I've set up sqlgrey, DKIM signing and SPF,
sender-ID and all of that good stuff. My sent mail goes out
successfully and incoming mail gets delivered to the virtual mailboxes
and everything's working properly as far as I can tell.

The problem:

My existing (hosted) mail server has a catch-all account so any mail
to the domains I own goes to me. I believe they use qmail. The
delivered-to header on the messages retain the address of the original
message, not the catch-all address to which it is forwarded. Why do I
care? I basically use a different address for every site or person I
interact with and then sort them out into folders based on the
delivered-to address. (For example if I bought something from Sears I
would use sears@example.com as my email address).

With postfix, it doesn't work that way. I set up a catchall, but the
delivered-to: header becomes catchall@example.com for all of the
catchall mail. I can't change my rules to use use the To: address
because it is not reliable (BCC, spam...).

The idea:

Assuming I can't do anything about how Postfix handles the
Delivered-To header, I'd like to insert a new header entry
(X-Originally-To: or something like that) into incoming mail before it
hits the catchall forward, so I can know to whom the email was
originally addressed... but i don't really know where to begin.

The question:

Are there any postfix gurus out there who can point me in the right
direction? Thanks in advance for any tips or advice (or if you want to
tell me that I'm doing it all wrong).

Thanks,
Paul



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-15 17:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-07 21:50 [gentoo-server] Postfix: Can I insert a custom header to incoming mail? Paul Hartman
2011-07-07 22:25 ` kashani
2011-07-07 23:59   ` Paul Hartman
2011-07-08  0:41     ` kashani
2011-07-08  2:35       ` Paul Hartman
2011-07-15 17:18       ` Paul Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox