Operating System - Linux
1827807 Members
2774 Online
109969 Solutions
New Discussion

Re: sendmail 8 start sm-client only

 
Jeff Hoevenaar
Frequent Advisor

sendmail 8 start sm-client only

Normally on my UNIX/Linux systems I turn off the sendmail daemon becuase I only have outgoing email. I have sendmail 8.12.10 runninng on a new Linux server and there is now a client sendmail daemon. How can I just start the client daemon for outgoing email and turn off the sendmail daemon so there will be no incoming email.

Thanks.
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: sendmail 8 start sm-client only

You are better off turning it all off. When mail needs to go outbound, any script referencing sendmail will work exactly as it did before.

If the system is exposed on the Internet, do secure any sendmail/cgi scripts as they can be used to relay spam and don't need a sendmail daemon running to work.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeff Hoevenaar
Frequent Advisor

Re: sendmail 8 start sm-client only

There are 2 processes started instead of just one. I tried stopping them both but the email will not go out. I am using Fedora 1.0.

service sendmail start
Starting sendmail: [ OK ]
Starting sm-client: [ OK ]

ps -ef | grep send
root 4738 1 0 12:51 ? 00:00:00 sendmail: accepting connections
smmsp 4747 1 0 12:51 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue

When I stop sendmail and try to send an email I get the following:
sendmail -v xxx@xxx.com
test email text
.
root... Connecting to [127.0.0.1] via relay...
root... Deferred: Connection refused by [127.0.0.1]

Steven E. Protter
Exalted Contributor

Re: sendmail 8 start sm-client only

Its rather shocking, but apparently you have your sendmail configuration so that it won't even relay mail from the localhost.

That does keep spammers from abusing you server, but can safely be openned up a bit.

/etc/mail/access

127.0.01 RELAY

Save the file

Make sure no external email addresses allow relay, while you look at that file.

Next you want to put that change into production. go to http://www.sendmail.org and make a m4 macro script.

This will build you a new sendmail.cf file and put it in production. You can cut and paste the code. I've posted a good script called buildmail that does the same thing.

Did you run my diagnostic?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeff Hoevenaar
Frequent Advisor

Re: sendmail 8 start sm-client only

/etc/mail/access already had and entry for the local host:

localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
Stuart Browne
Honored Contributor

Re: sendmail 8 start sm-client only

With sendmail started, what does 'netstat -ntlp' return?
One long-haired git at your service...
Steve Sullam
New Member

Re: sendmail 8 start sm-client only

This seems like a somewhat intelligent forum so I wanted to share the results of my solution after trying different things. In order for me to recieve mail from the outside world I had to set SMTP port options in the sendmail.conf file to my outward facing address like this:
Port=smtp,Addr=192.xxx.xxx.xxx, Name=MTA.
This is the address of the box hosting my mail server in the dmz.
With this conguration I would get relaying denied when any of the system logs tried to send me messages. So I experimented with sendmail.conf and added a line:
Port=smtp,Addr=127.0.0.1, Name=MTA
I stopped sendmail and restarted it with no error messages. Previously I got relaying denied
When I do this:
mail -v -s "test email" soandso@soandso.com < /dev/null
I get no longer get error messages.