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.

I'm having trouble setting up the mail service correctly on my os x leopard server. In server admin, under Mail>General the domain is set to "mydomain.net.nz", and my host name "servername.mydomain.net.nz", yet whenever an account is created, the email address will be user@servername.mydomain.net.nz instead of just user@mydomain.net.nz.

Am I missing something, or is there somewhere I can change this? I have looked in the /etc/postfix/main.cf file, and mydomain is set to just mydomain.net.nz.

The user accounts can send and receive fine, but only to the accounts @servername.mydomain.net.nz.

Email sent externally to the domain are getting "Relay access denied (state 14)."

Where can I change this?

share|improve this question
    
should probably be tagged "postfix" –  Stobor Aug 18 '09 at 6:02
    
I've came across another gotcha - I was testing the sending from within the squirrelmail webmail. I was doing this at server.domain.net.nz/webmail and was getting frustrated that emails were coming from user@server.domain.net.nz Later on I was accessing it through server.local/webmail and then noticed that emails were coming from user@server.local Apparently squirrelmail gets the server name with PHP, so you have to edit the server settings in /etc/squirrelmail/config/config.php to $domain = "yourdomain.com"; to stop this from happening. –  Ryan Aug 19 '09 at 7:48
add comment

1 Answer

up vote 3 down vote accepted

in main.cf:
For outbound stuff:

myorigin = $mydomain

For inbound stuff:

mydestination = $myhostname localhost.$mydomain localhost $mydomain

see also: http://www.postfix.org/BASIC_CONFIGURATION_README.html

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.