Linode.com Forum Forum Index Linode.com Forum
Linode Community Forums
 


Sendmail: how do you send mail from localhost only ?

Click here to go to the original topic

 
       Linode.com Forum Forum Index -> Email/SMTP Related Forum
Author Message
caritos



Joined: 19 Oct 2005
Posts: 7

Posted: Mon Nov 21, 2005 3:29 pm    Post subject: Sendmail: how do you send mail from localhost only ?  

I want to prevent my sendmail app for being a spam agent. How do I configure sendmail so that I send mail only from localhost.
Back to top  
rjp



Joined: 15 Aug 2003
Posts: 102

Posted: Mon Nov 21, 2005 6:12 pm    Post subject:  

In your sendmail.mc file, you should add a line of the form:

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

then regenerate your sendmail.cf file. Beware of the use of backquotes in m4 files - that's a backquote before the "P" in "Port".

If you already have such a line, and you don't have any other lines binding to other addresses, then this has already been done for you.

You can use netstat -ap to see what processes are listening to which ports.
Back to top  
sednet



Joined: 17 Mar 2004
Posts: 106
Location: Europe

Posted: Tue Nov 22, 2005 3:00 pm    Post subject: Re: Sendmail: how do you send mail from localhost only ?  

caritos wrote: I want to prevent my sendmail app for being a spam agent. How do I configure sendmail so that I send mail only from localhost.

add:
RELAY_DOMAIN(`<your IP> <your hostname> localhost 127.0.0.1')

to sendmail.mc and rebuild sendmail.cf with something like:
m4 sendmail.mc >sendmail.cf


Take some time to make sure you have it right. There are scum out there who make a living out of abusing mail servers. You can find a decent sendmail tutorial at
http://www.feep.net/sendmail/tutorial/. Or get the oreilly book.
Back to top  
 
       Linode.com Forum Forum Index -> Email/SMTP Related Forum
Page 1 of 1