Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Unable to find primary relay for domain.com

Okay, I'm a total OSX 10.8 server noob.


I've been running OS X Server 10.3.9 for years now. I had the server configured so that it would:

a) only accept mail from inside my network

b) deliver mail from inside my network to "the outside world" (ie, other mail servers outside my domain.

I basically used the server to allow various machines on the network (printers, switches, etc) to send email alerts to me, my staff, or outside monitoring companies without the hassle of having to set up accounts for each machine on our Exchange server.


This setup has worked brilliantly for years now. However, during a recent planned downtime, the OSX 10.3.9 server refused to come back up. I had already been planning to retire it as it was getting a bit long-in-the-tooth, so I had bought a brand-spanking new Mac Mini Server running OS X 10.8.5.


So, I'm trying to configure the mail server to do basically the same thing as my previous mail server. But it will not deliver mail for love or money. I've managed to get things to a point where it seems to be accepting the mail for delivery but it keeps showing this in the log:

server.local postfix/smtp[8476]: EFBA9155163: to=<user@domain.com>, relay=none, delay-2412, delays=2412/0.01/0.01/0, dsn=4.4.4, status=deferred (unable to find primary relay for domain.com).


I've googled for the "unable to find primary relay" and not found anything that I can understand as it all seems to be related to people trying to do totally different things or it was so heavy in postfix-speak that I got lost.


There's probably some report or file I could give you the contents of that would explain my settings more succinctly but here's what I know:

DNS:

Forwarding servers: 192.168.58.128 <---this is the IP of our primary DNS server on our network

DNS is set to perform lookups for "This server itself" and "Clients on the local network"


Primary Zone: domain.com (has 3 entries)

pd.domain.com (machine)

pd.domain.com (nameserver)

mail.domain.com (mail exchanger)

server.domain.com (machine) <--- note this is the DNS name for the Mac Mini server

server.domain.com (mail exchanger

Reverse Zone: 58.168.192.in-addr.arpa

192.168.58.95 (reverse mapping) <--- note this is the IP of the Mac Mini server


Under the Mail settings:

Provide mail for 3 domains:

Domain Name: server.local

Virtual Domains: server.domain.com, server.domain.local

Authentication: Local Users

Relay outgoing mail through ISP is "off"

Limit mail to ___ MB per user is "off"

I'm not using any filter settings.


So, that's what I know. I hope someone here can help me with this. I'm at wit's end.

MAC MINI SERVER (LATE 2012), OS X Mountain Lion (10.8.5)

Posted on Apr 16, 2014 4:50 PM

Reply
5 replies

Apr 17, 2014 7:12 AM in response to Linc Davis

That's not very helpful, Linc. Again, remember, I'm trying to provide primarily a "relay" of mail with this server. The primary mail server is our Exchange server at "mail.domain.com". I simply want the MacMini to accept the mail from various machine accounts on our network and pass that mail to the primary mail server. Note that I am "aliasing" this secondary mail server (the MacMini) in the domain with "server.domain.com".


While your observation may be valid, you don't provide any explaination of what I should change to rectify the problem.

Apr 23, 2014 3:10 PM in response to Doug Starkey1

Okay, time for an update on the situation. After pondering Linc's observation that there might be something about the server name, I re-did some things. First, I renamed the server altogether to:

server.domain.local

I re-did the virtual domains in the Mail panel so that now the "Provide Mail for:" configuration window looks like this:

Provide mail for 2 domains:

Domain Name: domain.local

Virtual Domains: server.domain.com

Authentication: Local Users

Relay outgoing mail through ISP: off

Limit mail to ___ MB per user: off

No filter settings


I have revised the MacMini DNS so I'm only referencing the primary DNS server as the forwarding server. I have provided NO zone information at all. I think I will need to correct this later to provide mail delivery for the single mail account I want this machine to host. But for now I'm removing all of that because it does not seem to be having any effect on mail delivery (see below).


Note that the MacMini is still identified in DNS on the primary DNS server. I'm just not defining the MacMini or any other device explicitly in its own DNS records. I really only want it to be a "backup" DNS server, anyway. But that's really another topic, I think.


So, now the SMTP logs show that the mail is being "delivered" but it never comes in to the mailbox on the primary mail server. This an excerpt from the logs:

Apr 23 16:58:57 server.domain.local postfix/postscreen[28763]: CONNECT from [192.168.58.42]:48771 to [192.168.58.95]:25

Apr 23 16:58:57 server.domain.local postfix/postscreen[28763]: WHITELISTED [192.168.58.42]:48771

Apr 23 16:58:57 server.domain.local postfix/smtpd[28764]: connect from officecopier.domain.local[192.168.58.42]

Apr 23 16:58:57 server.domain.local postfix/smtpd[28764]: disconnect from officecopier.domain.local[192.168.58.42]

Apr 23 16:58:57 server.domain.local postfix/postscreen[28763]: CONNECT from [192.168.58.42]:48772 to [192.168.58.95]:25

Apr 23 16:58:57 server.domain.local postfix/postscreen[28763]: WHITELISTED [192.168.58.42]:48772

Apr 23 16:58:57 server.domain.local postfix/smtpd[28764]: connect from officecopier.domain.local[192.168.58.42]

Apr 23 16:58:59 server.domain.local postfix/smtpd[28764]: 0B2FB15CA59: client=officecopier.domain.local[192.168.58.42]

Apr 23 16:58:59 server.domain.local postfix/cleanup[28769]: sacl_check: mbr_user_name_to_uuid(nethead@server.domain.local) failed: No such file or directory

Apr 23 16:58:59 server.domain.local postfix/cleanup[28769]: 0B2FB15CA59: message-id=<20140423165834000f2d8b.SCANMASTER@domain.com>

Apr 23 16:58:59 server.domain.local postfix/qmgr[27260]: 0B2FB15CA59: from=<scanmaster@domain.com>, size=5611, nrcpt=1 (queue active)

Apr 23 16:58:59 server.domain.local postfix/smtpd[28764]: disconnect from officecopier.domain.local[192.168.58.42]

Apr 23 16:58:59 server.domain.local postfix/pipe[28771]: 0B2FB15CA59: to=<nethead@server.domain.local>, orig_to=<nethead@domain.com>, relay=dovecot, delay=1.2, delays=1.1/0.01/0/0.05, dsn=2.0.0, status=sent (delivered via dovecot service)

Apr 23 16:58:59 server.domain.local postfix/qmgr[27260]: 0B2FB15CA59: removed


Now, if I'm reading this correctly (and I may not be), it would appear that the server thinks it delivered the mail. But I do not the "sacl_check" shows "failed: No such file or directory". I also note this oddness in the next to last line, "to=<nethead@server.domain.local>, orig_to=<nethead@domain.com>". The original email was addressed to "nethead@domain.com"; why is it being changed to "nethead@server.domain.local"? And when it says that it was "delivered via dovecot service", what does that mean?


Hopefully someone will read this and it will make sense. I feel like I'm close but I'm just still missing something.

Apr 24, 2014 8:13 AM in response to Doug Starkey1

Not sure what happened. I left the configuration as noted above. I went home last night, came back in this morning and the server was passing mail again. I have tested several times and all the devices that normally communicate with this server are able to send email and it is being routed out to our primary mail server and then on to the users.


(Now all I have to do is figure out how to get it to let my mail client check the mail for the one account I want to be on this server)

Unable to find primary relay for domain.com

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.