1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

setting up OSX server email

Discussion in 'Mac OS X Server, Xserve, and Networking' started by aicul, Feb 19, 2013.

  1. macrumors 6502a


    I'm trying to setup the email for my OSX server.

    I have it send out emails correctly (but since I use a relay server that does not really use my server).

    Incomming emails are all bounced back with the following message : does not like recipient.
    Remote host said: 554 5.7.1 <user@mydomain.com>: Relay access denied
    Giving up on

    I did some digging and found that this may occur if the mx record for the domain points to the server running DirectAdmin and the domain isn't hosted on that server.

    Problem is I have no idea how to fix this, and where the MX records are stroed.

    Any advice welcome
  2. macrumors 68000

    Are you configured to accept mail for your domain? Quick google search show:

    Postfix: 554 Relay access denied
    Let's say you have a user who can't receive e-mail. Each time they send a message to the server, this pops up in the mail logs:

    postfix/smtpd[23897]: NOQUEUE: reject: RCPT from remotemailserver.com[]: 554 <user@domain.com>: Relay access denied; from=<user@otherdomain.com> to=<user@domain.com> proto=ESMTP helo=<remotemailserver.com>

    This is happening because Postfix is receiving e-mail for a domain for which it doesn't expect to handle mail. Add the domains to the mydestination parameter in /etc/postfix/main.cf:

    mydestination = domain.com, domain2.com, domain3.com
    If you have a lot of domains to add, create a mydomains hash file and change the mydestination parameter:

    mydestination = hash:/etc/postfix/mydomains
    Create /etc/postfix/mydomains:

    localhost OK
    localmailserver.com OK
    domain.com OK
    Then run:

    # postmap /etc/postfix/mydomains
    This will create the hash file (mydomains.db) within /etc/postfix. If you've just added the directive to the main.cf, run postfix reload. However, if the directive was already there, but you just adjusted the mydomains and ran postmap, then there is nothing left to do.
  3. macrumors 6502a

    I have to be honest Robvas, I read your response and sat down in front of my server.

    Here I noticed the log files were empty, so I checked the setting for the log files and noticed they were set to record "critical" only.

    I said to myself, set them to something less extreme, do a test and start from there.

    So I set the log to "Notice", saves and did a Stop/Start of the mail service. Then sent a test email.

    There big surprise the mail went thru. Crazy :confused:

    Anyway, must have been my mail service hung somehow.

    I did however check the setting you suggested and these are there insofar as the mydestination goes.

    So a big thankyou for the advice, it helped, and got me back operational. :p


    And come to think of it, I should have tried the Stop/Start before posting.

    Silly me

Share This Page