Mail Services Update 1.0 killed SMTP/TLS, cannot send mail anymore

Apple yesterday released the Mail Services Update 1.0 Update for Mac OS X Server 10.6.2.

It seems the update somehow broke TLS/SSL and now I cannot send email anymore when SSL is enabled on the server for SMTP.

Apple's so called pathetic documentation of course gives no clue what the update really does. This is considered a normal failure by Apple now. I did inspect the contents manually though, and as I said, didn't find anything that could easily kill my setup (only to be proven wrong a bit later).


When having activated SSL on SMTP postfix cannot start up anymore and logs these error messages to mail.log about every minute.



Dec 18 13:31:23 prometheus postfix/tlsmgr[50317]: fatal: poll: Unknown error: 0
Dec 18 13:31:24 prometheus postfix/master[49551]: warning: process /usr/libexec/postfix/tlsmgr pid 50317 exit status 1
Dec 18 13:31:24 prometheus postfix/master[49551]: warning: /usr/libexec/postfix/tlsmgr: bad command startup -- throttling



One thing I have noticed that the update modifies the /etc/postfix/master.cf file and disables smtp-submission.

One needs to remove the comments on these two lines to have the system accept client connections on port 587 with encryption again.

Here's a diff:


13,14c13,14
< #submission inet n - n - - smtpd
< # -o smtpd tls_securitylevel=encrypt
---
submission inet n - n - - smtpd
-o smtpd tls_securitylevel=encrypt

Sadly uncommenting these lines does not help with the tlsmgr problem and having clients send authenticated mail without TLS/SSL is considered harmful and therefor not allowed for security reasons. When disabling SSL (which of course is an absolutely absolute not-possible no-go) SMTP works again.


Just for the usual mail-gurus in this forum… 🙂
My postconf is slightly modified from Apple's original and has been proven to work well, though I cannot tell if everything is set up perfectly.

$ postconf -n
alias_maps = hash:/etc/aliases,hash:/var/mailman/data/aliases
biff = no
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
disable vrfycommand = yes
enable serveroptions = yes
header_checks = pcre:/etc/postfix/custom headerchecks
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
local recipientmaps = proxy:unix:passwd.byname $alias_maps
mail_owner = _postfix
mailbox sizelimit = 0
mailbox_transport = dovecot
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
maps rbldomains =
message sizelimit = 23068672
mydestination = $myhostname, localhost.$mydomain, localhost, 127.0.0.1, $mydomain
mydomain = prometheus.maclemon.at
mydomain_fallback = localhost
mynetworks = 127.0.0.1/32,localhost
newaliases_path = /usr/bin/newaliases
owner requestspecial = no
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost =
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = _postdrop
smtpd clientrestrictions = hash:/etc/postfix/smtpdreject cidr:/etc/postfix/smtpdreject.cidr permit saslauthenticated permit_mynetworks reject rblclient zen.spamhaus.org reject rblclient ix.dnsbl.manitu.net permit
smtpd datarestrictions = permit_mynetworks reject unauthpipelining permit
smtpd enforcetls = no
smtpd helorequired = yes
smtpd helorestrictions = permit saslauthenticated permit_mynetworks check heloaccess hash:/etc/postfix/helo_access reject invalid_helohostname reject non_fqdn_helohostname reject non_fqdnhostname reject invalidhostname permit
smtpd pw_server_securityoptions = cram-md5,gssapi
smtpd recipientrestrictions = reject invalidhostname reject non_fqdnsender reject non_fqdnrecipient permit saslauthenticated permit_mynetworks reject unauthdestination reject rblclient zen.spamhaus.org reject rblclient ix.dnsbl.manitu.net check policyservice unix:private/policy permit
smtpd sasl_authenable = yes
smtpd senderrestrictions = permit saslauthenticated permit_mynetworks reject non_fqdnsender permit
smtpd tlsCAfile = /etc/certificates/prometheus.maclemon.at.502E049545F7A1F1ED985BE049FB03FB792F7E B8.chain.pem
smtpd tls_certfile = /etc/certificates/prometheus.maclemon.at.502E049545F7A1F1ED985BE049FB03FB792F7E B8.cert.pem
smtpd tls_excludeciphers = SSLv2, aNULL, ADH, eNULL
smtpd tls_keyfile = /etc/certificates/prometheus.maclemon.at.502E049545F7A1F1ED985BE049FB03FB792F7E B8.key.pem
smtpd tlsloglevel = 0
smtpd use_pwserver = yes
smtpd usetls = yes
tls randomsource = dev:/dev/urandom
unknown local_recipient_rejectcode = 550
virtual aliasdomains = $virtual aliasmaps hash:/etc/postfix/virtual_domains
virtual aliasmaps = hash:/etc/postfix/virtual_users, hash:/var/mailman/data/virtual-mailman


Some possibly relevant version numbers:
$ postconf -d | grep mail_version
mail_version = 2.5.5

$ amavisd -V
amavisd-new-2.5.1 (20070531)

$ spamassassin -V
SpamAssassin version 3.2.1
running on Perl version 5.10.0

$ clamscan -V
ClamAV 0.95.2/10197/Fri Dec 18 02:59:38 2009





Best regards
Pepi
PS: Sorry this is so hard to read, Apple makes it impossible to properly format posts via BBCode as they mess up everything that is [QUOTE], [CODE], [TT] and even [NOPARSE]

MacBook Pro, Mac OS X (10.6.2), Recommended Reading: http://en.wikipedia.org/wiki/Netiquette

Posted on Dec 18, 2009 5:21 AM

Reply
21 replies

Dec 18, 2009 10:47 AM in response to bobaloo2

I've tried to set a different certificate, select back the original certificate but it didn't help. The only way to have incoming and outgoing SMTP work at the moment ist to turn off SSL on SMTP completely.

I guess other people got bitten by this, and yet still haven't noticed that they suffer from this problem as there is nothing indicating a problem unless you explicitly check for them.
Best regards
Pepi

Dec 18, 2009 12:50 PM in response to MacLemon

Applying Mail Services Update 1.0 nailed me too. I'm running from an image backup made before applying this update. sigh......

It used to be you could comfortably apply updates. Since Snow Leopard, I've made an image backup so I can roll back to a previous operational system when things like this happen.

I can't say enough good things about having SuperDuper and Carbon Copy Cloner available to make good image backups!

Message was edited by: Paul Derby

Dec 18, 2009 3:14 PM in response to bobaloo2

After reading the several posts reporting that the Apple "fix" caused others the same problem I was seeing in the logs, I just switched to the OS X Server image on my backup drive, rebooted, and then made an image backup over the updated drive. So I no longer have the config files of the updated "bad" version.

maclemon posted his postfix config file and the diff file showing the differences in an earlier posting today.

I'm using a self-signed certificate and about as vanilla an install as you can get. I didn't want to keep the bad version around, preferring instead to move to a stable system and have a backup of that stable system.

Dec 19, 2009 8:36 AM in response to MacLemon

OK, I think I've found a clue.

When 10.6 server was released, there was an Apple article to fix some log messages that were occurring. Here is an excerpt:

*The Mail Server mail.log may contain encryption warnings after upgrading to Mac OS X Server v10.6.
*For example, warnings such as these may appear in the mail.log:
*
* warning: no entropy source specified with parameter tls randomsource
* warning: encryption keys etc. may be predictable
*
*For improved encryption in Mac OS X Server v10.6, and to avoid this issue, open Terminal and execute this *command:
*
*sudo postconf -e tls randomsource=/dev/urandom


I've found that if you comment out this line in main.cf:

tls randomsource = /dev/urandom (at the very end of the file for me)

then TLS will start up OK. It will display the warning messages in the apple article above, but it starts up and handles TLS !!

Next step is to figure out what broke in the random source and fix the encryption warnings. Anyone want to take a stab at this?

Dec 19, 2009 8:53 AM in response to Chris Lewicki

I can also confirm that commenting out this line solved the issue for me.


It doesn't matter if you have

tls randomsource = /dev/urandom

or

tls randomsource = dev:/dev/urandom

in your main.cf, neither of them will work.

Interesting enough, postfix does not complain about missing entropy and predictable keys without this line and the MailService Update 1.0 applied.
Best regards
Pepi

Dec 21, 2009 8:11 AM in response to bobaloo2

I havent yet worked out whats going on to fix the root cause, but I have got myself going again by compiling tlsmgr from http://www.opensource.apple.com/tarballs/postfix/postfix-197.1.tar.gz
/usr/local/src/apple/postfix-197.1/postfix/src/tlsmgr
and copied the compiled tlsmgr to /usr/libexec/postfix Wise to backup the original even though it seems to break everything. Be nice to see the source this patch was build from but I dont see it.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mail Services Update 1.0 killed SMTP/TLS, cannot send mail anymore

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