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

postfix will send mail to user@host.example.com but not to user@example.com

I have an admin user that is a local user on the server and a single user in the Open Directory shared directory. The admin user can receive mail to admin@exmple.com but the Open Directory user can only receive mail at user@host.example.com

postconf -n output:

admin$ postconf -n
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug peerlevel = 2
enable serveroptions = yes
html_directory = no
inet_interfaces = all
local recipientmaps =
luser_relay = admin
mail_owner = _postfix
mailbox sizelimit = 0
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message sizelimit = 10485760
mydestination = $myhostname,localhost.$mydomain,localhost
mydomain = example.com
mydomain_fallback = localhost
myhostname = mail.example.com
mynetworks = 127.0.0.0/8,10.0.1.0/24
newaliases_path = /usr/bin/newaliases
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
relayhost =
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = _postdrop
smtp sasl_authenable = yes
smtp sasl_passwordmaps = hash:/etc/postfix/sasl/passwd
smtpd pw_server_securityoptions = cram-md5
smtpd recipientrestrictions = permit sasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
smtpd sasl_authenable = yes
smtpd use_pwserver = yes
unknown local_recipient_rejectcode = 550
virtual mailboxdomains = hash:/etc/postfix/virtual_domains
virtual_transport = lmtp:unix:/var/imap/socket/lmtp

Mac Mini, Mac OS X (10.5.8), OS X Server

Posted on Dec 21, 2009 4:52 PM

Reply
Question marked as Best reply

Posted on Dec 21, 2009 6:33 PM

One thing that I noticed that's different in your config from my config is this line:
yours = mydestination = $myhostname,localhost.$mydomain,localhost
mine = mydestination = $myhostname,localhost.$mydomain,localhost,*$mydomain*

You've checked your Mail settings and have the domains entered properly and have selected the mail server for the OD users in Workgroup Manager as well?

-Doug
6 replies
Question marked as Best reply

Dec 21, 2009 6:33 PM in response to randomlogic

One thing that I noticed that's different in your config from my config is this line:
yours = mydestination = $myhostname,localhost.$mydomain,localhost
mine = mydestination = $myhostname,localhost.$mydomain,localhost,*$mydomain*

You've checked your Mail settings and have the domains entered properly and have selected the mail server for the OD users in Workgroup Manager as well?

-Doug

Dec 21, 2009 7:04 PM in response to Douggo

Here is the smtp log for some messages

Dec 21 20:47:13 hal postfix/smtpd[9021]: connect from localhost[127.0.0.1]
Dec 21 20:47:14 hal postfix/smtpd[9021]: 24B2889FB3: client=localhost[127.0.0.1]
Dec 21 20:47:14 hal postfix/cleanup[9017]: 24B2889FB3: message-id=<C7803B75-642A-4B4E-92F0-494E5764FD56@example.com>
Dec 21 20:47:14 hal postfix/smtpd[9021]: disconnect from localhost[127.0.0.1]
Dec 21 20:47:14 hal postfix/qmgr[8931]: 24B2889FB3: from=<admin@example.com>, size=922, nrcpt=1 (queue active)
Dec 21 20:47:14 hal postfix/smtp[9018]: AFC3289F99: to=<user@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.71, delays=0.01/0.01/0.01/0.67, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 24B2889FB3)
Dec 21 20:47:14 hal postfix/qmgr[8931]: AFC3289F99: removed
Dec 21 20:47:14 hal postfix/lmtp[9022]: 24B2889FB3: to=<user@example.com>, relay=mail.example.com[/var/imap/socket/lmtp], delay=0.73, delays=0.49/0.02/0.2/0.03, dsn=2.1.5, status=sent (250 2.1.5 Ok)
Dec 21 20:47:14 hal postfix/qmgr[8931]: 24B2889FB3: removed
Dec 21 20:49:52 hal postfix/smtpd[9013]: connect from hal.example.com[10.0.1.3]
Dec 21 20:49:52 hal postfix/smtpd[9013]: DDADC8A182: client=hal.example.com[10.0.1.3], sasl_method=CRAM-MD5, sasl_username=admin
Dec 21 20:49:52 hal postfix/cleanup[9053]: DDADC8A182: message-id=<98BDFF10-E63B-422A-ABFF-516C3545EE54@example.com>
Dec 21 20:49:52 hal postfix/qmgr[8931]: DDADC8A182: from=<admin@example.com>, size=542, nrcpt=1 (queue active)
Dec 21 20:49:53 hal postfix/smtpd[9058]: connect from localhost[127.0.0.1]
Dec 21 20:49:53 hal postfix/smtpd[9058]: 154C28A19C: client=localhost[127.0.0.1]
Dec 21 20:49:53 hal postfix/cleanup[9053]: 154C28A19C: message-id=<98BDFF10-E63B-422A-ABFF-516C3545EE54@example.com>
Dec 21 20:49:53 hal postfix/qmgr[8931]: 154C28A19C: from=<admin@example.com>, size=969, nrcpt=1 (queue active)
Dec 21 20:49:53 hal postfix/smtpd[9058]: disconnect from localhost[127.0.0.1]
Dec 21 20:49:53 hal postfix/smtp[9054]: DDADC8A182: to=<user@mail.example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.23, delays=0.04/0.02/0.01/0.17, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 154C28A19C)
Dec 21 20:49:53 hal postfix/qmgr[8931]: DDADC8A182: removed
Dec 21 20:49:53 hal postfix/pipe[9060]: 154C28A19C: to=<user@mail.example.com>, relay=cyrus, delay=0.18, delays=0/0.01/0/0.17, dsn=2.0.0, status=sent (delivered via cyrus service)
Dec 21 20:49:53 hal postfix/qmgr[8931]: 154C28A19C: removed
Dec 21 20:50:53 hal postfix/smtpd[9013]: disconnect from hal.example.com[10.0.1.3]

The message to user@mail.example.com goes through, the message to user@example.com gets bounced to my admin account, that's where I have undeliverable mail set to go at the moment.

Message was edited by: randomlogic

Dec 21, 2009 8:09 PM in response to randomlogic

In Server Admin, Mail -> Settings -> General:
Make sure you have:
"Domain name: example.com"
"Host name: host.example.com"

Then go to the Advanced tab ->Hosting, and in the Local Host Aliases listing you should have:
"localhost"
Add an entry for:
"$mydomain" (minus the quotes)
and save the changes, then restart the Mail service. See if mail delivers to the OD user.

-Doug

postfix will send mail to user@host.example.com but not to user@example.com

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