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

aicul

macrumors 6502a
Original poster
Jun 20, 2007
809
7
no cars, only boats
Hi,

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 :

111.111.111.111 does not like recipient.
Remote host said: 554 5.7.1 <user@mydomain.com>: Relay access denied
Giving up on 111.111.111.111.

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
 

robvas

macrumors 68040
Mar 29, 2009
3,240
630
USA
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[10.0.0.2]: 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.
 

aicul

macrumors 6502a
Original poster
Jun 20, 2007
809
7
no cars, only boats
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.