I discovered recently that my server has been attempting to send 1000 emails a day (my limit) because of the internal mail system, where it'd be attempting to send actual emails to @ rather then using the internal mail that linux has.

Since I don't use this feature at all, how can I completely (either system-wide or per-user) disable this internal mail system to prevent it from happening?

Running Debian 8 with EXIM4


Debian comes by default with exim mail server, you can configure how the mailserver should work with the command

dpkg-reconfigure exim4-config

if you don't want the server to send remote emails you can choose the setting

local delivery only; not on a network
  • will this allow functions such as PHPMailer continue to function? it sounds like the opposite (and I'm indeed using exim) – xorinzor Dec 7 '16 at 14:45
  • I believe PHPMailer allows you to send mails without a local smtp server so it should still work, unless you send your mail through the local exim mail server. the local mail also uses exim so if you just want the application mail to be gone you could just uninstall it, it's found in the package mailutils, so a apt-get remove mailutils should remove the mail app. – David Berkan Dec 8 '16 at 8:40
  • My hosting provider requires my VPS to mail via their mail servers, so I'm indeed using a local exim mail server to achieve that. I tried removing mailutils, but apparently that package isn't installed – xorinzor Dec 9 '16 at 10:33
  • I also just now tried removing bsd-mailx but that doesn't seem to have helped either – xorinzor Dec 9 '16 at 10:40

I managed to fix it by configuring EXIM4 as an internet site rather than smart host; no local mail (in the steps from dpkg-reconfigure exim4-config)

As well as removing localhost from the destinations for which mail is accepted

Your Answer

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

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