6 Replies Latest reply: Dec 21, 2009 10:05 PM by Douggo
randomlogic Level 1 Level 1 (0 points)
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
debugpeerlevel = 2
enableserveroptions = yes
html_directory = no
inet_interfaces = all
localrecipientmaps =
luser_relay = admin
mail_owner = _postfix
mailboxsizelimit = 0
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
messagesizelimit = 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
smtpsasl_authenable = yes
smtpsasl_passwordmaps = hash:/etc/postfix/sasl/passwd
smtpdpw_server_securityoptions = cram-md5
smtpdrecipientrestrictions = permitsasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
smtpdsasl_authenable = yes
smtpduse_pwserver = yes
unknownlocal_recipient_rejectcode = 550
virtualmailboxdomains = hash:/etc/postfix/virtual_domains
virtual_transport = lmtp:unix:/var/imap/socket/lmtp

Mac Mini, Mac OS X (10.5.8), OS X Server
  • Douggo Level 4 Level 4 (2,740 points)
    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
  • randomlogic Level 1 Level 1 (0 points)
    As far as I know my mail settings are correct. What setting would I change to get the $mydomain added to the destination? I have selected the mail server in the od user as well.
  • randomlogic Level 1 Level 1 (0 points)
    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
  • Douggo Level 4 Level 4 (2,740 points)
    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
  • randomlogic Level 1 Level 1 (0 points)
    Thanks for the help... that seemed to have done it. I'm waiting for a few confirmation emails, but everything that I can test looks good.
  • Douggo Level 4 Level 4 (2,740 points)
    Thanks for the help... that seemed to have done it.

    Glad to have helped.

    -Doug