Email ServersEmail Servers

Information and howtos about email servers such as Postfix, Dovecot, Maildrop, Sendmail

Email was the first "killer app" of the early Internet and today millions of emails are sent every day using a variety of emails servers such as postfix and sendmail. This section looks at how to use and configure email servers for sending and receiving email, mail filtering with services such as maildrop and procmail, and POP and IMAP servers such as Courier IMAP and Dovecot.

Post sort order: Post Date (Newest First) | Post Date (Oldest First) | Alphabetical | Date Updated

Test validity of email address from the command line with eximTest validity of email address from the command line with exim

Posted June 17th, 2011 in Email Servers and Linux/Unix/BSD

While trying to troubleshoot why email wasn't being delivered to one of my mail aliases on a new server this morning, I discovered a nifty little trick for testing the deliverability of an email address using exim from the command line.

Read more »

Free POP/110 and IMAP/143 email providersFree POP/110 and IMAP/143 email providers

Posted December 7th, 2010 in Email Servers (Updated January 31st, 2011)

I have compiled a list of email providers here that support POP3 mail access on port 110 and IMAP mail access on 143, and also the big free webmail providers that do not just to round things off. If you know of any other reliable providers please add a comment or email me.

Read more »

Prevent sender header being added with EximPrevent sender header being added with Exim

Posted February 25th, 2009 in Email Servers

I changed the mail server on one of my machines from Postfix to Exim a couple of days ago and discovered it adds a "sender" header by default if the "from" header is not the same as the user that sent the email. This results in the "on behalf of" sort of from address in Outlook. This post looks at the setting to prevent the extra sender header from being added.

Read more »

Show the sendmail mail queueShow the sendmail mail queue

Posted November 2nd, 2008 in Email Servers

To check what is currently sitting in the sendmail mail queue use the sendmail -bp command or its alias mailq. This post looks at basic usage of this command and the output from viewing the mail queue.

Read more »

Show the exim mail queueShow the exim mail queue

Posted September 9th, 2008 in Email Servers

The exim mail server has a number of command line options including being able to see what's currently in the mail queue. Last week I looked at how to flush the exim mail queue and in this post look at how to view the exim mail queue.

Read more »

Flush the exim mail queueFlush the exim mail queue

Posted September 6th, 2008 in Email Servers

I have the exim mail server running on one of my customer's webservers. Their internal mail server hadn't been accepting mail overnight so they hadn't got a whole bunch of important emails from the webserver and I needed to flush the exim mail queue. A quick read of the exim man page answered my question about how to do this and I thought I'd write a quick post to show how to flush the exim mail queue.

Read more »

Changing the Postfix maximum email sizeChanging the Postfix maximum email size

Posted August 15th, 2008 in Email Servers

I've recently had some of my customers emailing me large image attachments and my Postfix mail server has been rejecting them. A quick look at the postfix configuration showed the message size limit was the default so I needed to increase it. This post looks at how to see what the current email message size limit is with Postfix and how to change it.

Read more »

logwatch "postdrop Illegal seek" and "sendmail queue file write error"logwatch "postdrop Illegal seek" and "sendmail queue file write error"

Posted May 4th, 2008 in Email Servers and Linux/Unix/BSD

logwatch is a daily process for reporting and analyzing log files and I recently started getting errors on one of the CentOS Linux machines I manage and no daily report. The particular machine gets thousands of bounced emails per day and the mail log files get very large. logwatch had been reporting to me every single bounced email message so the report emails had got very large before stopping altogether. This post looks at the error messages I got and what I did to fix the problem.

Read more »

Postfix "file too large" error messagePostfix "file too large" error message

Posted March 14th, 2008 in Email Servers

Running postfix on a CentOS mail server I got the following error message both in a returned email and also in the log file: "cannot update mailbox ... error writing message: File too large". This post looks at the erorr message in the bounce email, the log files, and the solution to the error. This error will also affect postfix mail servers on Red Hat Enterprise Linux and probably other default installs of Postfix as well.

Read more »

Dovecot "Cannot allocate memory" errorDovecot "Cannot allocate memory" error

Posted March 12th, 2008 in Email Servers

Installing the Dovecot IMAP/POP server onto a CentOS 5.1 x86_64 machine I was unable to log in via POP or IMAP and got the error message "imap-login: imap-login: error while loading shared libraries: libsepol.so.1: failed to map segment from shared object: Cannot allocate memory" in the mail log file when Dovecot started up. This post looks at the error messages reported and the solution.

Read more »

Updating Postfix's virtual alias mapsUpdating Postfix's virtual alias maps

Posted November 18th, 2007 in Email Servers

Postfix allows you to store virtual alias maps in a text file, which tells postfix how to route virtual email addresses to real users on the system. This setting and the file location is determined in the postfix configuration file /etc/postfix/main.cf like so:

virtual_alias_maps = hash:/etc/postfix/virtual

Read more »

Postfix SMTP Auth Error "no SASL authentication mechanisms"Postfix SMTP Auth Error "no SASL authentication mechanisms"

Posted November 3rd, 2007 in Email Servers

I have been setting up a new mail server recently with Postfix and SMTP Auth, and got the error message "no SASL authentication mechanisms".

Read more »

Spamassassion connection refusedSpamassassion connection refused

Posted October 28th, 2007 in Email Servers (Updated October 28th, 2007)

If you get a message like the one following, then you are filtering emails through spamassasin using /usr/bin/spamc but the spamassassin service is not running. connect(AF_INET) to spamd at 127.0.0.1 failed, retrying (#1 of 3): Connection refused.

Read more »

Dovecot dead but subsys locked errorDovecot dead but subsys locked error

Posted October 26th, 2007 in Email Servers

When you restart dovecot, if it won't start up again it's likely the process crashed on startup but left the subsys lockfile in place. This prevents dovecot from starting up again. If you run /etc/init.d/dovecot status and get the error message "dovecot dead but subsys locked" then you have this problem.

Read more »

Configure postfix to accept mail from external connectionsConfigure postfix to accept mail from external connections

Posted October 25th, 2007 in Email Servers

Postfix by default on CentOS 5 and Red Hat Enterprise Linux is configured to only receive mail on the local network interface. This is good if you are not intending your server to run as a mail server but is one additional step to getting your mail server running when setting up Postfix.

Read more »

Installing maildrop on CentOS 5Installing maildrop on CentOS 5

Posted October 20th, 2007 in Email Servers and Linux/Unix/BSD

I have been in the process of migrating my websites from a couple of dedicated machines to a VPS (Virtual Private Server) which has a fairly minimal base install of CentOS 5 on it. My existing mailserver runs on Gentoo Linux, running Postfix, courier-imap, maildrop, Spamassassin and ClamAV, with the mail accounts and aliases handled by MySQL.

I would have liked to have run only packages available from the CentOS distribution (plus the addons etc) but neither courier-imap nor maildrop are available in the CentOS package trees. Instead I would need to use either cyrus-imapd or dovecot and maildrop was not available at all.

Read more »

Starting and Stopping Sendmail with FreeBSDStarting and Stopping Sendmail with FreeBSD

Posted December 17th, 2004 in Email Servers and Linux/Unix/BSD (Updated May 24th, 2005)

Management of sendmail is done on FreeBSD by changing to sendmail's directory (/etc/mail) and running "make" followed by the appropriate command. This either needs to be done as root or using sudo.

Read more »

Opening port 25 for mail servers with iptablesOpening port 25 for mail servers with iptables

Posted November 30th, 2003 in Email Servers (Updated October 24th, 2007)

If you cannot connect remotely to sendmail, postfix or other mail servers on port 25 make sure you have the port opened on your firewall. This article deals with opening port 25 with iptables on RedHat Linux.

Read more »

Sendmail Connection Refused on localhostSendmail Connection Refused on localhost

Posted November 30th, 2003 in Email Servers (Updated July 11th, 2010)

RedHat often misconfigures the /etc/hosts file when setting the system up and sendmail is unable to send messages, leaving log file messages like "Connection refused by localhost.co.nz".

Read more »

Sendmail remote connection refusedSendmail remote connection refused

Posted November 30th, 2003 in Email Servers (Updated May 24th, 2005)

How to enable sendmail to accept remote connections. By default most distributions (or when compiling sendmail yourself) will only allow local connections for security reasons.

Read more »