1 |
Hi, |
2 |
|
3 |
The background: |
4 |
|
5 |
Long-time Gentoo user, newbie to mail server setup. I've got a Gentoo |
6 |
server (~amd64) and I set up Postfix and Dovecot following this guide: |
7 |
http://en.gentoo-wiki.com/wiki/Mail_server_using_Postfix_and_Dovecot |
8 |
|
9 |
I'm using postfix-2.8.4 and dovecot-2.0.13 |
10 |
|
11 |
So far, everything works as advertised. I've added a domain, created |
12 |
accounts, additionally I've set up sqlgrey, DKIM signing and SPF, |
13 |
sender-ID and all of that good stuff. My sent mail goes out |
14 |
successfully and incoming mail gets delivered to the virtual mailboxes |
15 |
and everything's working properly as far as I can tell. |
16 |
|
17 |
The problem: |
18 |
|
19 |
My existing (hosted) mail server has a catch-all account so any mail |
20 |
to the domains I own goes to me. I believe they use qmail. The |
21 |
delivered-to header on the messages retain the address of the original |
22 |
message, not the catch-all address to which it is forwarded. Why do I |
23 |
care? I basically use a different address for every site or person I |
24 |
interact with and then sort them out into folders based on the |
25 |
delivered-to address. (For example if I bought something from Sears I |
26 |
would use sears@×××××××.com as my email address). |
27 |
|
28 |
With postfix, it doesn't work that way. I set up a catchall, but the |
29 |
delivered-to: header becomes catchall@×××××××.com for all of the |
30 |
catchall mail. I can't change my rules to use use the To: address |
31 |
because it is not reliable (BCC, spam...). |
32 |
|
33 |
The idea: |
34 |
|
35 |
Assuming I can't do anything about how Postfix handles the |
36 |
Delivered-To header, I'd like to insert a new header entry |
37 |
(X-Originally-To: or something like that) into incoming mail before it |
38 |
hits the catchall forward, so I can know to whom the email was |
39 |
originally addressed... but i don't really know where to begin. |
40 |
|
41 |
The question: |
42 |
|
43 |
Are there any postfix gurus out there who can point me in the right |
44 |
direction? Thanks in advance for any tips or advice (or if you want to |
45 |
tell me that I'm doing it all wrong). |
46 |
|
47 |
Thanks, |
48 |
Paul |