Thanks for the answers. About domain name - the thing is that right now i see exactly the next message (except ip address) "Received: from mail.localdomain ([ip.add.re.ss]) by mx.google.com..". And "mail.localdomain" is a local alias. So, it cant be resolved from external network. So, it cant depend from real ip address. So, only postfix can say to mx.google.com that postfixbox is "mail.localdomain". And i think postfix says it's $myhostname here. I understand that it is really not a big thing, but i just would like to use respective domain names for this, if there is a way.
About message id - i understood i can place message id in php. but we have several domain names. Sometimes several scripts at everyone (like forum, support ticket system, main script, etc). Sometimes it is third-party scripts. And every script can have more then one place where it sends email. I would prefer to change message-id at postfix side, if there is such way. if somebody has any ides how to do any of this things with postfix, please, let me know. thanks, Andrey. 2012/9/23 Noel Jones <njo...@megan.vbhcs.org> > > 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