Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Prodo123

macrumors 68020
Original poster
Nov 18, 2010
2,326
10
Hello,

I've been having a heck of a time trying to set up postfix. I want it to send an email from a certain address, but it doesn't really work no matter what I do.

I own a domain bar.com. I have www.bar.com as a valid subdomain and the server's hostname. The main administrator account is named foo.

I'm trying to send an email from the address foobar@gmail.com. I've set up the SMTP relay (using this as reference), generic aliases, SASL passwords, the -F parameter in sendmail, and none of them are working. LS3 shows no connection whatsoever to any Gmail server, and the mail always comes from foo@www.bar.com. Even when I set mydomain, myorigin and myhostname as "server.bar.com" it still sends from foo@www.bar.com. I've opened ports 25, 465 and 587 for the appropriate processes as well.

What am I doing wrong here?
 

Prodo123

macrumors 68020
Original poster
Nov 18, 2010
2,326
10
I tested whether it was a borked config or not. I made a fresh VM, edited main.cf's myorigin as bar.com and that VM sends the email fine from foo@bar.com. I copied that exact same configuration to my server and it sends from foo@www.bar.com.

All I want is to get rid of the www. prefix, or just use Gmail SMTP. I don't understand why this is not working.
 

Prodo123

macrumors 68020
Original poster
Nov 18, 2010
2,326
10
Solved. Postfix was not using /etc/postfix/main.cf. Serveradmin apparently creates its own main.cf once you enable the mail service even once, so you have to change main.cf settings using serveradmin under mail:postfix.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.