Operating System - HP-UX
1753850 Members
7597 Online
108807 Solutions
New Discussion юеВ

required no inbound mails

 
Kurtkarl
Frequent Advisor

required no inbound mails

Hi,

We need to setup one of our server here not to accept inbound mails from anywhere but can send outbound mails locally and thru internet.

As temp solution we disabled the sendmail process inorder for us not to accept any inbound mails. But without this sendmail process running we cant even send outbound mails locally or anywhere. We have an apps that needs to send outbound mails locally and thru internet. BTW, this machine is running client DNS.

Any help would be greatly appreciated.
Thanks
Joey
Just starting to learn thru this forum
10 REPLIES 10
Uday_S_Ankolekar
Honored Contributor

Re: required no inbound mails

Hi,

If you stop sendmail process that should stop receiveing inbound mails. Your outbound mails should work even if sendmail is not running.
-USA..
Good Luck..
Christopher Caldwell
Honored Contributor

Re: required no inbound mails

Remove -bd from sendmail daemon startup options but keep -q15m (or whatever) so sendmail will retry message delivery if the first attempt fails.
Tom Geudens
Honored Contributor

Re: required no inbound mails

Hi,
There's probably a simple solution for this (I'm far from a sendmail specialist :-) but
have you looked at the "Anti-spamming"-parameters of sendmail ? You can "lockout"
certain IP's (if there aren't too many that
can reach the server) that way.

Hope it helps,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
Joseph Chakkery
Valued Contributor

Re: required no inbound mails

Hello,

(1) Stop sendmail by
# /sbin/init.d/sendmail stop
(2) edit /etc/rc.config.d/mailservs file
change SENDMAIL_SERVER=0 and then save the file. This will disable sendmail daemon starting during startup.

Regards
Joe.
Knowledge is wealth
Craig Rants
Honored Contributor

Re: required no inbound mails

If like you said you have stopped sendmail and you are not able to send mail, then you have another problem, recieving and sending mail are total independent of each other. You need the daemon running to receive, not to send.

Try sending a message in verbose mode

sendmail -v user@hostname.com < /etc/hosts

The detailed output should help in your troubleshooting.

Good Luck,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Kurtkarl
Frequent Advisor

Re: required no inbound mails

Thanks for the immediate reply.

Actually, we already stoped our sendmail by disabling it thru /sbin/init.d and killing the process. It works with us because we can no longer receive inbound mails. But the thing is, we wanted to send mails outside our box (meaning locally and thru internet). We cant have this thing work. I know that disabling sendmail will still allow us to send mails outside but this time it does not allow us. Any suggestions?

Also I'm using reflection on our unix box but I'm having problem with my "@" char mapping. Everytime I press this key it acts as carriage return. thanks again joey
Just starting to learn thru this forum
Bernie Vande Griend
Respected Contributor

Re: required no inbound mails

Joey,
Have you tried doing what Christoper suggests? I agree that normally you should be able to send mail out without the daemon running, but depending on your configuration, it may help to have the sendmail daemon running, but only in a mode for sending out requests, not receiving. To do this remove the "-bd" from /sbin/init.d/sendmail but keep the "-q15m" (or whatever) option. Then run this script and see if you can send out mail. With sendmail running this way, you will NOT receive incoming message and it may resolve your problem.
Ye who thinks he has a lot to say, probably shouldn't.
Kurtkarl
Frequent Advisor

Re: required no inbound mails

Whenever I try to send mail with our sendmail process disabled I always received this error and I didn't received my test mail as well.

$mailx -s "test" username@domain < /etc/hosts
$ mail: can't send to username@domain
Mail saved in /homedir/dead.letter

thanks
joey
Just starting to learn thru this forum
Christopher Caldwell
Honored Contributor

Re: required no inbound mails

#/sbin/init.d/sendmail stop
to stop sendmail

#/usr/sbin/sendmail -q15m

will start sendmail (not in daemon mode) so that sendmail runs the queue every fifteen minutes without accepting inbound connections.

If you're satisfied with the way that works,
change
/usr/sbin/sendmail -bd -q30m
to
/usr/sbin/sendmail -q15m

in /sbin/init.d/sendmail

The stop command (/sbin/init.d/sendmail stop or killsm) won't work anymore, but you can figure out the ps command you need to use to find sendmail and kill it.