Sorry if this is a very basic question (I couldn't find any tutorial on google so asking here).

I want to setup an INCOMING ONLY mail server on Linux. (I have some websites, for which I wish to avoid google apps or some other solution). There are some reasons why I want my own incoming server (like ease of scripting, etc).

Anyways, so I couldn't find any tutorial on this. (There must be some out of the box solution also?).

Further - how to ensure it is secure? I have heard spammers can attack a not-so-well secured mail server to send spam (thats with outgoing mail server - are there too many risks associated with even an INCOMING mail server)?

Thanks much,


PS: I have average knowledge of linux administration but am totally a newbie with mail servers.

  • Just follow any of the thousands of mailserver tutorials out there and to ensure mail doesn't go out, disable all relaying (from localhost and otherwise) and then firewall off any traffic leaving your server with a destination port of 25 and 587. – EEAA Oct 16 '10 at 21:00

First suggestion: Setting up and approximately securing a web server is not that hard, but keeping it clean and secure is an ongoing effort. And cleaning up after something goes belly-up can be hard. There are services out there who will cheaply do the effort for you.

If you must: You have to read the documentation of the mailer of your choice, I would suggest you select the default mailer for your OS. (Else it is really a matter of taste: Sendmail is both the most feature-complete and seasoned mailer, but can be tricky to set up; Postfix is easier, but also very powerful. And there are also QMail, Exim and a couple of others.)

Ensure you do authentication, use LMTP (Port 587), and block any connection from your host to anywhere Port 25 and you'll be OK.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy