Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We use Google Apps, so the only way we use postfix is to send notification emails, like password restore, newsletters and etc. We have 3 domains, for example aaa.com, bbb.com and ccc.com.

Each service always sending email on behalf of info@aaa.com, info@bbb.com, etc.

How to configure postfix to set correct sender header?

Right now message header contains:

Received: from localhost (localhost [])
by freebsd.boxxy.de (Postfix) with ESMTP id A650F6882
for <cccc@hotmail.com>; Sat,  6 Nov 2010 05:29:12 +0300

If I set myhostname in main.cf to domain aaa.com, then messages sent from bbb.com would be from aaa.com, is it possible to retrieve domain from sender email and use that domain configuration?

share|improve this question
Which header are you referring to? I dont see aaa.com or bbb.com in the posted header. –  Rob Olmos Nov 6 '10 at 5:35
Configure postfix to use google servers as smart relay. –  Paulo Scardine Nov 6 '10 at 6:44
2Rob - i can set myhostname to aaa.com and "by freebsd.boxxy.de (Postfix)" will be "by aaa.com (Postfix)" but what about other domains? If i sent mail from bbb.com, their headers will contain aaa.com. –  user59382 Nov 6 '10 at 15:03
2Paulo We can't use google service cose google have limit - 500 emails per day :( –  user59382 Nov 6 '10 at 15:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.