Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I configured postfix & mutt to read mails being sent by applications locally, but I just found out that they are going out on the internet too. Sometimes they reach my inbox and many times get marked as spam.

How do I configure postfix to not send mail outside my machine? I only want to be able to read emails through mutt.

Right now, I have this in /etc/postfix/main.cf:

myorigin = localhost
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
relayhost =
share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Try setting the relayhost to an nonexistent host. That way it would bounce (after some timeout) anything destined for outside your localhost.

share|improve this answer
    
You mean relayhost = randomstring will work? –  Ashfame Feb 4 '13 at 13:33
    
I wouldn't put any random string, but I might put something like "nohost.local" and have "nohost.local" in your hosts file pointing to some local LAN IP that does not exist (do not use 127.0.0.x) –  J. Chin Feb 4 '13 at 15:20
    
Thanks! That seems to have done it. –  Ashfame Feb 4 '13 at 19:28
add comment

Your Answer

 
discard

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.