Hello

I have the next situation/configuration.
One dedicated web server with 2 domains on it: domain1.tld and domain2.tld.
Lets name it `webserver'. Posfix version is 2.6.6. It has CentOS 6.3
installed (in case it is important).
One dedicated postfix box with 2 domain names (2 A-records in DNS):
smtp.domain1.tld and smtp.domain2.tld. Lets name it `postfixbox'. Posfix
version is 2.6.6. CentOS 6.3 too.

Emails are sent by apache web-server (by php-scripts) from webserver box
using webserver's postfix. Webserver's postfix is configured to use
postfixbox as a relay to delivery outgoing emails. I need only outgoing
emails for domain1.tld and domain2.tld, i use addresses
noreply@domain1.tldand nore...@domain2.tld.and it works ok (with
almost default settings).

But  only I want to reveal little less information about my internal
infrastructure then it does with default settings. I have read
documentation (very good one, big thanks to the authors), and find some
tools for it. I have used header_checks with pcre to remove field
"Received" from headers. It is ok. But i want 2 things more if it is
possible.

1) At webserver postfix generates a message-id field. And it always has the
same hostname (hostname, which i defined in $myhostname). I would like to
have message id use domain which will depend on sender address. So, if
sender address is nore...@domain1.tld, message id should look like
"Message-Id: <20120921201403.E349360F3@*domain1.tld*>", and in case if
sender address is nore...@domain2.tld message id should look like
"Message-Id: <20120921201403.E349360F3@*domain2.tld*>". So, i need rewrite
message id depend from sender address. header_checks is doing rewriting by
string as i see.. Is there any way to perform message id rewriting as i
want?

2) The similar thing with postfixbox's postfix. I would like it to use
smtp.domain1.tld or smtp.domain2.tld as its own name depending from sender
address. So, when i have received message at my (for example) gmail account
i would like to see in original code something like "Received: from smtp.*
domain1.tld* ([ip.add.re.ss]) by mx.google.com.." and "Received: from smtp.*
domain2.tld* ([ip.add.re.ss]) by mx.google.com.." instead of "Received:
from *mail.localdomain* ([ip.add.re.ss]) by mx.google.com.." which i see
right now. Is it possible and what i need to do for it?


Thank you for your advises,
Andrey.

PS. I dont have big experience with postfix and with email at all. Also,
english is my second language. Sorry for any errors, hope email is
understandable.

Reply via email to