Top Nav

Archive | Email

Alternate SMTP Port

Here’s a quick IPTables rule to setup an alternate non-standard SMTP port without reconfiguring the mail server software:

0

Export Zimbra mailbox

To export the mailbox for user@acme.com as a zip file use this command:

/opt/zimbra/bin/zmmailbox -z -m user@acme.com getRestURL \
‘//?fmt=zip&query=is:anywhere’ > user_at_acme_com.zip

Here is the same as a tgz file:

/opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL \
“//?fmt=tgz” > /tmp/account.tgz

And here’s a restore of the tgz file:

/opt/zimbra/bin/zmmailbox -z -m user@domain.com postRestURL \
“//?fmt=tgz&resolve=reset” /tmp/account.tgz

11

Zimbra Mailbox Size

Here’s a simple script that will provide a report on mailbox size for every mailbox on a Zimbra server. The report is sorted by box size in descending order:

1

Courier – Disable weak SSL ciphers

You can disable SSLv2 in Courier by adding the following line to both /etc/courier-imap/imapd-ssl and /etc/courier-imap/pop3d-ssl:

After restarting Courier you should test with openssl to verify SSLv2 has been disabled properly:

You can test that weak ciphers have been disabled with the following:

0

Postfix Mailtrap

Recently we needed to setup a postfix server that would route all email to a local mailbox regardless of original destination. Here’s the solution:

1) Add this line to /etc/postfix/main.cf (if it’s not already present):

recipient_canonical_maps = regexp:/etc/postfix/canonical

2) Add the following line to /etc/postfix/canonical (replace “username”):

/.*/ username@localhost

3) Run “postfix reload”

That should make it deliver all mail to the specificed local user. Make sure localhost is in the mydomains file (or the mydomains setting in main.cf, if it doesn’t use a seperate file), or just use any valid local domain.

0