Posts Tagged ‘postfix’

Change the Maximum Message Size In OS X Mail Server

Wednesday, August 14th, 2013

The default size limit of new mail messages in OS X 10.8 Server is 10 MB. That’s small for many environments. To increase to 20 MB, open Terminal. Use serveradmin to increase the number, plugging it into mail:postfix:message_size_limit as follows:

serveradmin settings mail:postfix:message_size_limit = 20971520

To change it back, you would use:

serveradmin settings mail:postfix:message_size_limit = 10485760

BCC Mail In OS X Server

Thursday, April 4th, 2013

OS X Server has the ability to bcc mail that flows through it. This can be a good way to keep a copy of mail for the purposes of things like legal requirements. To enable this feature, once upon a time you could use the GUI in OS X Server. These days, the feature is still there but is now accessed through the command line as the always_bcc_enabled option within serveradmin’s mail settings. To enable this option, use the following command:

sudo serveradmin settings mail:postfix:always_bcc_enabled = yes

Once enabled, you will also need to supply an actual address to bcc mail to, which is done using always_bcc as follows:

sudo serveradmin settings mail:postfix:always_bcc = "

Next, you’ll want to

sudo serveradmin stop mail
sudo serveradmin start mail

Finally, if there are any issues, putting the postfix logging facility into debug mode can help you triangulate, done using the following command (and restarting the mail service again):

sudo serveradmin settings mail:postfix:log_level = "debug"

Mail Archival

Saturday, November 7th, 2009

There are a number of messaging solutions that allow for automated message archiving. Message archiving can save space, while freeing up valuable resources and can also help to maintain Sarbanes-Oxley compliance (as well as achieve a number of other objectives). But not all messaging solutions allow for automated archival. Enter Mail Archiva into the picture.

Mail Archiva is an open source project aimed at bringing messaging archival to Microsoft Exchange, Zimbra, Mac OS X Server, Postfix, SendMail, IpSwitch, Axigen and a number of other messaging servers.

If you are in need of mail archival then feel free to reach out to us for more information on Mail Archiva today!

Greylisting and Snow Leopard Server

Thursday, October 8th, 2009

10.6 has introduced the use of Greylisting as a spam prevention mechanism. In short, it denies the first attempt for an MTA to deliver a message, once the server tries a second time (after an acceptable amount of delay, proving it’s not an overeager spammer), it can be added to a temporary approval list so future emails are delivered without a delay.

The problem with this is many popular mail systems, including gmail, don’t exactly behave as expected, so the messages may take hours before they are delivered. To get around this, the people championing greylisting suggest maintaining a whitelist of these popular, but ‘non standard’ mail servers, allowing them to bypass the greylist process entirely and accepting the messages the first time around. The other problem is for companies that send mail through mxlogic and other similar services, the mail is sent from the first available server, potentially causing delayed because they were being sent by a different mxlogic box each time.

The problem with this under 10.6 is there is no gui or interface to inform you that greylisting is enabled (it gets turned on when you enable spam filtering), and so it just takes forever for messages to hit your inbox. You can start managing the whitelist / greylist system, or you can just turn it off:

cp /etc/postfix/ /etc/postfix/

vi /etc/postfix/

change line 667 from:

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

To the following (removing check_policy_service unix:private/policy):

smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks reject_unauth_destination permit

You can then run postfix with the reload verb to reload the config files, as follows:

postfix reload

Adding Alternate Listening Ports for Postfix in Mac OS X Server’s Mail Server

Thursday, October 19th, 2006

Many ISPs and hotels block outbound SMTP on port 25 in an effort to prevent spamming. This poses problems for mobile users who wish to send mail through their office’s mail server.

It is possible to add listening ports for SMTP in Postfix. There are two procedures that will work:

Adding port 587 for SMTP submission
Port 587 is the standard port that many ISPs and hotels allow for outbound SMTP. To enable this port:

Open up /etc/postfix/ (you will need to open as root or sudo)

Uncomment the following line:
submission inet n – n – - smtpd

Open up the submission port (587) on your firewall and if necessary, set up port forwarding to the mail server on 587.

Adding other ports for SMTP submission
318’s preferred alternate SMTP port is 443 because ISPs and hotels rarely block this port and SPI will usually not be scanning this port’s traffic because traffic on port 443 is usually encrypted and therefore not easily inspected. To enable this port:

Open up /etc/postfix/ (you will need to open as root or sudo)

Add the following line in along with the other services:

443 inet n – n – – smtpd

To use a different port number, change 443 to whatever port you wish to use.