Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Does any one know of any good guides/tutorials on setting up mail on Debian 7 so the system can send emails but doesn't accept mail locally?

I've played with Postfix a little but I don't really know what I'm doing and people have said that it's overkill anyway. What about exim4? Or something else?

As I say, I don't want to accept mail locally, I just need to be able to send mail from the server (say from cron and other outputs, etc) to elsewhere and have something handling sending emails for PHP scripts (as there's a mailing list running on the VPS from Wordpress).

Something with a detailed guide to help a noob would be excellent. I never knew mail could be so confusing and hard to set up!

As always, any help/advice much appreciated, this has been bugging me for weeks! ;)

share|improve this question

Sendmail will provide basic mail forwarding functionality for the programs you want, to make sure it doesn't accept mail, just change /etc/aliases and set up external aliases for all system accounts. That should cover the cases you've stated so far.

share|improve this answer
Thanks for the tip. But do you know of anything a little more secure than Sendmail? I'd prefer not to use Sendmail if possible, hence playing with Postfix. And a step-by-step walkthrough for anything would be greatly appreciated too---as I say, I'm a massive noob to setting up mail. For example, something like this seems like it might be on the right track perhaps (I don't know), but in any event, it's for an older version of exim and the confs are all different now. So. Any ideas? Or different software suggestions? Many thanks – user197215 Nov 4 '13 at 17:00
Type which sendmail from your command line. That's the piece of code that is used to send mail from Cron jobs, from local scripts which send mail, etc. Most systems have it, or it can be installed very easily:… – NickW Nov 4 '13 at 17:08

Your Answer


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