On 9/22/2012 9:41 AM, Андрей Клаус wrote: > 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
Set the message-id in your PHP script that generates the email. This is simple, probably a one-line change. > 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? Received: headers are added by the receiving system, not the sender. To change the appearance of the Received: header, you must send from a different IP that resolves to the hostname you want, then use postfix sender_dependent_transport_maps to deliver mail using the correct IP. Many people consider this more trouble than it's worth -- you need a separate IP for each domain, and it doesn't really matter. -- Noel Jones