Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

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

Can't connect to OS X Server SMTP?

Ive been trying to fix this for a couple of days now, i'm running OS X Server on an installation of Mountain Lion and am trying to get the Mail server part working.


I can connect to IMAP and login but not the SMTP, ive checked all the ports are forwarded and i'm just stumped at what to do now, my main.cf is:


queue_directory = /Library/Server/Mail/Data/spool

command_directory = /usr/sbin

daemon_directory = /usr/libexec/postfix

data_directory = /Library/Server/Mail/Data/mta

mail_owner = _postfix

unknown_local_recipient_reject_code = 550

debug_peer_level = 2

debugger_command =

PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin

xxgdb $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/sbin/sendmail

newaliases_path = /usr/bin/newaliases

mailq_path = /usr/bin/mailq

setgid_group = _postdrop

html_directory = /usr/share/doc/postfix/html

manpage_directory = /usr/share/man

sample_directory = /usr/share/doc/postfix/examples

readme_directory = /usr/share/doc/postfix

dovecot_destination_recipient_limit = 1

mailbox_size_limit = 0

smtpd_tls_exclude_ciphers = SSLv2, aNULL, ADH, eNULL

tls_random_source = dev:/dev/urandom

imap_submit_cred_file = /Library/Server/Mail/Config/postfix/submit.cred

use_sacl_cache = yes

mydomain_fallback = localhost

message_size_limit = 10485760

biff = no

mynetworks = 127.0.0.0/8, [::1]/128

smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated permit

recipient_delimiter = +

smtpd_tls_ciphers = medium

inet_protocols = all

inet_interfaces = all

config_directory = /Library/Server/Mail/Config/postfix

smtpd_enforce_tls = no

smtpd_use_pw_server = yes

relayhost =

smtpd_tls_cert_file = /etc/certificates/my.domain.com.CB71CACC46A9C512E4FE3B8986E6956558287A0F.cert.p em

mydomain = my.domain.com

smtpd_pw_server_security_options = cram-md5,gssapi,login,plain

smtpd_sasl_auth_enable = yes

smtpd_helo_required = yes

smtpd_tls_CAfile = /etc/certificates/my.domain.com.CB71CACC46A9C512E4FE3B8986E6956558287A0F.chain. pem

content_filter = smtp-amavis:[127.0.0.1]:10024

smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks reject_unauth_destination check_policy_service unix:private/policy permit

header_checks = pcre:/Library/Server/Mail/Config/postfix/custom_header_checks

myhostname = my.domain.com

smtpd_helo_restrictions = reject_non_fqdn_helo_hostname reject_invalid_helo_hostname

smtpd_use_tls = yes

smtpd_tls_key_file = /etc/certificates/my.domain.com.CB71CACC46A9C512E4FE3B8986E6956558287A0F.key.pe m

enable_server_options = yes

recipient_canonical_maps = hash:/Library/Server/Mail/Config/postfix/system_user_maps

virtual_alias_maps = $virtual_maps hash:/Library/Server/Mail/Config/postfix/virtual_users

smtpd_sasl_local_domain = my.domain.com

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

mailbox_transport = dovecot

virtual_alias_domains = hash:/Library/Server/Mail/Config/postfix/virtual_domains

alias_maps = hash:/Library/Server/Mail/Config/postfix/aliases



and Mail Server Log:

Oct 24 18:06:05 my.domain.com log[20676]: imap(pid 20765 user chloei): ID sent: name=iPhone Mail, version=10A405, os=iOS, os-version=6.0 (10A405)

Oct 24 18:06:06 my.domain.com log[20676]: imap(pid 20765 user chloei): Connection closed bytes=107/452


Sorry If i'm missing something obvious, i'm new to OS X Server

MacBook Pro, OS X Server

Posted on Oct 24, 2012 11:12 AM

Reply
23 replies

Oct 24, 2012 2:40 PM in response to Peter Jurg2

I tried telnet on my mac and tried using my iPhone mail app which just said that it failed to connect to the smtp server and i should check settings and try again later.


telnet does the following:


client$ telnet my.domain.com smtp

Trying my.domain.com...

Connected to my.domain.com.

Escape character is '^]'.

220 my.domain.com ESMTP Postfix

Oct 24, 2012 3:05 PM in response to cisowden

That's good. I think port 456 is not used by default by OS X server. You can probably use either port 25 or 587 (you can check that in master.cf, but it is how OS X server is configured out of the box), but unless you are sending a mail to an address hosted on your server, you will have to authenticate. This comes from the lines:


mynetworks = 127.0.0.0/8, [::1]/128

smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated permit


So you have to see how your iPhone is configured. Do you have smtp with authentication set on your iPhone? And if so what is the authentication mechanism you use on the iphone?


On the server you can check /var/log/mail.log for errors.

Oct 24, 2012 3:12 PM in response to haykong

haykong:


smtp logs are emtpy, mail server logs just show that it successfully connected to IMAP, no errors.


Peter:


the only options i could see on the iphone when setting an email up on the outgoing server settings are the hostname which ive set as the same as incoming server, my username and my password, i believe it then automatically tries to setup ssl, and if that fails tries without ssl, but either way its not working


so i guess the answer is im using username and password 😝

Oct 24, 2012 3:49 PM in response to cisowden

ok, seems that for some reason there was no alias.db in /Library/Server/Mail/Config/postfix i've now created it and its letting me connect, however now when i try and send its not and im not recieving any emails either...here are the logs:


SMTP:


Oct 24 23:41:45 my.domain.com postfix/postscreen[29849]: CONNECT from [209.85.212.181]:60575 to [192.168.3.105]:25

Oct 24 23:41:51 my.domain.com postfix/postscreen[29849]: PASS NEW [209.85.212.181]:60575

Oct 24 23:41:51 my.domain.com postfix/smtpd[29851]: connect from mail-wi0-f181.google.com[209.85.212.181]

Oct 24 23:41:51 www /usr/libexec/postfix/greylist.pl[29858]: Temporary message rejection to: <user@my.domain.com> from: <me@gmail.com> sent from: [209.85.212.181] for: 60 seconds due to greylisting

Oct 24 23:41:52 my.domain.com postfix/smtpd[29851]: NOQUEUE: reject: RCPT from mail-wi0-f181.google.com[209.85.212.181]: 450 4.7.1 <user@my.domain.com>: Recipient address rejected: Service is unavailable; from=<me@gmail.com> to=<user@my.domain.com> proto=ESMTP helo=<mail-wi0-f181.google.com>

Oct 24 23:41:52 my.domain.com postfix/smtpd[29851]: disconnect from mail-wi0-f181.google.com[209.85.212.181]

Oct 24 23:44:19 my.domain.com postfix/smtpd[30384]: warning: hostname 94.197.127.104.threembb.co.uk does not resolve to address 94.197.127.104: nodename nor servname provided, or not known

Oct 24 23:44:19 my.domain.com postfix/smtpd[30384]: connect from unknown[94.197.127.104]

Oct 24 23:44:20 my.domain.com postfix/smtpd[30384]: 18940959F71: client=unknown[94.197.127.104], sasl_method=PLAIN, sasl_username=chloei

Oct 24 23:44:20 my.domain.com postfix/cleanup[30391]: 18940959F71: message-id=<A8546C57-3247-4E21-990D-2C030C377306@my.domain.com>

Oct 24 23:44:20 my.domain.com postfix/qmgr[29530]: 18940959F71: from=<user@my.domain.com>, size=549, nrcpt=1 (queue active)

Oct 24 23:44:20 my.domain.com postfix/smtpd[30394]: connect from localhost[127.0.0.1]

Oct 24 23:44:20 my.domain.com postfix/smtpd[30394]: 82C1C959F7C: client=localhost[127.0.0.1]

Oct 24 23:44:20 my.domain.com postfix/cleanup[30391]: 82C1C959F7C: message-id=<A8546C57-3247-4E21-990D-2C030C377306@my.domain.com>

Oct 24 23:44:20 my.domain.com postfix/qmgr[29530]: 82C1C959F7C: from=<user@my.domain.com>, size=1011, nrcpt=1 (queue active)

Oct 24 23:44:20 my.domain.com postfix/smtp[30392]: 18940959F71: to=<user@my.domain.com>, orig_to=<me@gmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.51, delays=0.24/0.01/0.01/0.26, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 82C1C959F7C)

Oct 24 23:44:20 my.domain.com postfix/qmgr[29530]: 18940959F71: removed

Oct 24 23:44:20 my.domain.com postfix/pipe[30396]: 82C1C959F7C: to=<user@my.domain.com>, relay=dovecot, delay=0.09, delays=0.01/0.01/0/0.07, dsn=2.0.0, status=sent (delivered via dovecot service)

Oct 24 23:44:20 my.domain.com postfix/qmgr[29530]: 82C1C959F7C: removed


IMAP logs show nothing

Can't connect to OS X Server SMTP?

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