LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-01-2007, 04:55 PM   #1
CBMcArthur
LQ Newbie
 
Registered: Aug 2007
Location: Austin, TX
Distribution: Red Hat EL4
Posts: 5

Rep: Reputation: 0
How to prevent sendmail from delivering mail to other systems?


I am in the final stages of building a web server that will be used for a research project. We are desiring to have sendmail running so that services which use it (ie cron) can do so. However, we do not want e-mail to be sent outside of the server (local use only).

I have been unable to successfully find a way to do this. I've tried setting up iptables to block port 25 outbound. I've tried the suggestions in this thread:
http://www.linuxquestions.org/questi...t=77695&page=2.
But I'm still able to send mail to addresses outside of this box successfully.

Are there any thoughts out there?
 
Old 08-02-2007, 07:57 AM   #2
Vasili
LQ Newbie
 
Registered: Feb 2006
Location: At Home
Distribution: RHEL 4 AS
Posts: 23

Rep: Reputation: 15
tried this??

if u want all ur mails to be internal... well see to it that the dnl of the second line goes away...
from this:

dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback

to this:

dnl # The following causes sendmail to only listen on the IPv4 loopback address
127.0.0.1 and not on any other network devices. Remove the loopback


found in the /etc/mail/sendmail.mc

afterwards
# m4 sendmail.mc > ssendmail.cf

hit me back
 
Old 08-02-2007, 11:40 AM   #3
CBMcArthur
LQ Newbie
 
Registered: Aug 2007
Location: Austin, TX
Distribution: Red Hat EL4
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Vasili
if u want all ur mails to be internal... well see to it that the dnl of the second line goes away...

to this:

dnl # The following causes sendmail to only listen on the IPv4 loopback address
127.0.0.1 and not on any other network devices. Remove the loopback
This did nothing but cause an error while running `m4` because the line is unrecognized. As it is, from my understanding that line is simply a comment about the next uncommented line regarding deamon options.
 
Old 08-04-2007, 04:29 AM   #4
linuxjamil
Member
 
Registered: Dec 2005
Distribution: Fedora Core 5, Sun Solaris 8
Posts: 122

Rep: Reputation: 15
Question so what is the solution

SO what is the solution your ques plz anubody tell.
 
Old 08-05-2007, 11:37 AM   #5
CBMcArthur
LQ Newbie
 
Registered: Aug 2007
Location: Austin, TX
Distribution: Red Hat EL4
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by linuxjamil
SO what is the solution your ques plz anubody tell.
I'm still unsure how to prevent sendmail from delivering mail outside the server.

Our biggest concern with the box is since it will be a web server, on our network and not fully under the admins control, was to prevent it from being hijacked and used as a spam box. In that respect there were two solutions I found. First, activate safe_mode in PHP and make the mail() function a non-working function. The other was to modify the php.ini to change sendmail as the default mail utility to /dev/null.

So assuming the folks who will be using the box don't go putzing with these settings it'll work out. (Which means I'll have to keep an eye on the box to be sure the settings haven't been changed.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail 8.13.8 not delivering, logfile says otherwise TheEpitome Linux - Server 2 05-18-2007 02:26 AM
Qmail Not Delivering Mail antidelldude Linux - Software 0 07-17-2006 10:01 PM
qmail delivering mail but not to mailbox ServerStorm Linux - Software 9 01-13-2005 10:39 AM
postfix not delivering mail to root pbaumgar Linux - Software 1 06-25-2004 12:44 AM
postfix not delivering mail stir_frey Linux - Software 2 10-10-2003 07:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration