Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

All I really need is a catch-all address, which receives the email and pipes it to a script on the server (will use a PHP script).

Whats the simplest mail server which has small footprint and serves the purpose I need?

The server will be installed on CentOS 5

share|improve this question
up vote 2 down vote accepted

Sendmail and Postfix are both available on CentOS and are fairly easy to configure. The builtin sendmail needs to have the configuration file modified to allow incoming connections and you can add a wildcard alias to catch all of the mail. A quick google search should provide all the info you need to get it up and running. You will only have to install the backend for the configuration file, run "yum install sendmail-cf" and you will be ready to get it going.
There may be "easier" apps out there, but the online resources for sendmail on RHEL type systems are far and away the most prevalent in my opinion. Sendmail used to be difficult to manage but it is now very easy by editing the /etc/mail/ file.

share|improve this answer
isn't sendmail for outgoing email? i don't need the outgoing facility, just incoming. What do you think about dovecot? – Sabeen Malik Jun 13 '11 at 13:59
The sendmail client is used for outgoing email but Sendmail itself is a standard MTA and is used all over the internet to send and receive mail. If you look at your /etc/mail/ file, you will see a lline that looks like this: DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA')dnl This tells sendmail to listen on the localhost address only. You can change this IP to your regulat IP and sendmail will listen for incoming connections. Just do a google search on setting up sendmail on CentOS or RHEL and you should be fine. – Chris Jun 13 '11 at 14:02
Chris that is just awesome. Thanks a lot for the quick and to the point help. I will look into this and hopefully wont have to bug you again :) – Sabeen Malik Jun 13 '11 at 14:08

I did this with qpsmtpd... it is a qmail SMTP frontend replacement written in Perl. It has a bunch of plugins you can experiment with, but the most helpful is a maildir delivery plugin that can send all of the mail into a directory, or subdirectories by recipient address.

Just install qpsmptd and run as a daemon, no other mail application is required if you just want the mails to get dumped into a directory.

share|improve this answer

CentOS ships Postfix, it should be easy enough. Here's doc to setup catch-all account with Postfix:

Another choice is iRedMail, a free and open source mail server solution for CentOS 5.x (supports other distros too). Easy to install, full-featured, easy to maintain.

share|improve this answer

This sounds almost exactly like the test mail server I setup for our developers. Essentially, any email that hits this box gets dumped into a local mailbox which they can access via SquirrelMail. The primary SMTP servers (that all of our internal processes send email to for relaying) send anything with "" to this test box and our development web environment uses the test email server as it's default.

So anything at the development level will allow the devs to use whatever email addresses they want without actually sending email to the outside world and anything above that level they can simply use and it'l land in the same place.

This is almost what you're asking for, but rather than piping it to a local mailbox, you could just send the email to a piped alias instead.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.