LinuxQuestions.org
Visit Jeremy's Blog.
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 02-05-2010, 07:12 AM   #1
jnreddy
Member
 
Registered: May 2008
Location: INDIA
Distribution: RHEL
Posts: 171

Rep: Reputation: 15
Unhappy sendmail receiving prob


Hi,

Friends & Gurus,

previously i used to configure sendmail in minutes after a long i needed to configure sendmail i was unable to do i dont know why, know i configured the same as earlier eventhough its giving problem plz help
am proving all necessary files.

1)cat /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.15.1 server1.vipl.com server1

2) cat /etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=server1.vipl.com
DOMAINNAME=vipl.com

4) cat /etc/resolv.conf

search vipl.com
nameserver 192.168.15.1

#####nameserver is working fine.

cat /etc/mail/sendmail.cf
as you know this is a big file i tell you waht i did

1) firstly i commented the line no 116 dnlDAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1,Name=MTA')dnl

2) secondly i removed comment from line no 151
FEATURE(`accept_unresolvable_domains')dnl

those are the only two lines i modified.

5) cat /etc/dovecot.conf

here i modified only one line 17
protocols = imap ###########

thats all for simple sendmail i did the same last year it worked.

plz read my whole mail......

Thanks In Advance
JNreddy.
 
Old 02-06-2010, 06:01 AM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
Between steps 4 and 5 you mention the sendmail.cf file. However
the lines contain "dnl" which appears in the sendmail.mc file.

Did you install the sendmail-cf package and run "make -C /etc/mail"?
 
Old 02-10-2010, 03:18 AM   #3
jnreddy
Member
 
Registered: May 2008
Location: INDIA
Distribution: RHEL
Posts: 171

Original Poster
Rep: Reputation: 15
Thanks

Hi,
Thanks for your reply carltm. am extremely for delay response i was out of station for few days.

i did do what you mentioned, but i did
after modifying sendmail.mc i executed the below command

/etc/mail/sendmail.mc > /etc/mail/sendmail.cf

what i did is correct. plz let me know.

Thanks in Advance
JNReddy.
 
Old 02-10-2010, 07:06 PM   #4
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
Non that's not right.

Run this: yum install sendmail-cf

Then run this: make -C /etc/mail

If there were no errors, you can run: service sendmail restart
 
Old 02-12-2010, 11:25 PM   #5
jnreddy
Member
 
Registered: May 2008
Location: INDIA
Distribution: RHEL
Posts: 171

Original Poster
Rep: Reputation: 15
Thank You

hi,

Dear carltm sorry for delay reply we were shifting our office to another location am little busy in that once i finish that i get back to you
thanks once again to you.

jnreddy
 
Old 02-15-2010, 07:45 AM   #6
abhandari
LQ Newbie
 
Registered: Dec 2008
Location: NP
Posts: 28

Rep: Reputation: 1
Hi JNreddy,

You have well tried configuring Sendmail. But you have not specified on which OS + Sendmail version that your are configuring Sendmail. Whether you want to configure it for stand alone (locally testing) server or for your local network. So be clear first. As per your configuration you are going for Networked System.
===========
Following is the details that you need to configure for Networked Sendmail server and can be for your stand alone server.

you have tried to configure your mail server but it has to listen on 25 port(default) that is SMTP IN (mail receiving).
============
Please follow these steps (based on RHEL/CentOS 5).
Be sure that you have installed Sendmail related packages.
=========
# rpm -q sendmail sendmail-cf make m4 (--> For sendmail server port 25)

# rpm -q dovecot --> For POP/IMAP server (--> For POP/IMAP server port 110/143 default)

# rpm -q mozilla-mail evolution mutt (--> For client (any one))

=========
1. Configure sendmail to listen on any interface

# cd /etc/mail
# ls
# vi sendmail.mc
Search
/DAEMON_OPTIONS

dnl DAEMON_OPTIONS ('Port=smtp,Addr=127.0.0.1,Name=MTA')dnl (----> depricate new line =dnl simply mean comment/disable the line and this line makes your system to listen on every interfaces to receive emails. if you would like to receive on particular interface only then you can specify the IP address of the particular NIC card.)


:wq (----> save and quit)


Sendmail needs to be compiled with macro format so you have to run the following command so that sendmail could read the emails from the destination server and could send macro format encrypted emails to the other servers. Here "sendmail.mc" is normal file and needs to be converted to macro format file that is "sendmail.cf". One more things to be sure that other suggested command "make -C /etc/mail" actually works on compiled package version and for just the updated database files inside /etc/mail folder. That command will return some message like "make: Nothing to be done for `all'." when the files/databases have not changed/update. So just run the following command and make sure you have made a copy of backups of these files.

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

2. Specify the aliases of the mail server for which the mail has to be delivered locally

# vi /etc/mail/local-host-names

server1.vipl.com
vipl.com

3. Restart sendmail service

# service sendmail restart

Check Log information whether your sendmail service started or not.
=================
# tail -f /var/log/maillog
==================
Check for 25 (SMTP) port listening
=================
# netstat -antu | grep :25
=================

II.Control Relaying
---------------

a) Default
-------
. Deny relaying mails from remote hosts


b) Allow Relaying Mails From Remote Selected Hosts
-----------------------------------------------

# cd /etc/mail
========================
Here is the access list for your network (you just can do first 2 RELAY lines)
========================
# vi access
192.168.15 RELAY
vipl.com RELAY
server.abc.com RELAY
192.168.15.1 REJECT
nasty@vipl.com DISCARD
cracker@ ERROR:550 "Crackers are not allowed"

# make --> updates changes into 'access.db'

# service sendmail restart
=======================

Now you can configure your POP/IMAP (Dovecot) server to enable 110/143 ports listening
======================
#vi /etc/dovecot.conf
Search /protocols and uncomment the line like below

protocols = imap imaps pop3 pop3s
(----> you can just enable pop3 and imap like protocols = imap pop3)

:wq (save and quit)
======================
Start the dovecot service
================
# service dovecot restart
==============
check the listening ports for dovecot server
================
# netstat -antu |grep :110
# netstat -antu |grep :143
================

Now you are done you can send email to different local user.
========================
#mail user1@server1.vipl.com
type subject: hello test
content of the message
content of the message
to end the message just simply type "." (only dot) on a blank line then enter. you can have Carbon Copy CC: to user2
=================
Then check
# tail -f /var/log/maillog (----> mail processing )
================
you can locally deliver your email till now from one user to another user.
================
If you have internet access then you can receive you emails from outer world sent from other domains if your Server is fully qualified domain name (FQDN). So be sure that you have pointed you MX (Mail Exchange) to this server "server1.vipl.com" at DNS Zone/database file. That's why DNS plays even more important role in mail receiving. Don't worry even you don't have DNS configured then your /etc/hosts file works for you. What you did is correct. So your sendmail receive/deliver emails within your 192.168.15.0/24 network.

Now last thing you have to think which could block your emails packets coming to your server from other computers i:e firewall or you can allow the network to use SMTP and Dovecot as well. You can stop iptables in linux systems.

# iptables flush
# service iptables stop
# chkconfig iptables off

OR
# iptables -A INPUT -s 192.168.10.0/24 --dport 25 -j ACCEPT
# iptables -A INPUT -s 192.168.10.0/24 --dport 110 -j ACCEPT
# iptables -A INPUT -s 192.168.10.0/24 --dport 143 -j ACCEPT
# service iptables save
# service iptables restart
# iptables -L
================
I think u got the point.
Enjoy Guys.
http://www.ispexperts.com.np
=================
 
Old 02-16-2010, 07:33 AM   #7
jnreddy
Member
 
Registered: May 2008
Location: INDIA
Distribution: RHEL
Posts: 171

Original Poster
Rep: Reputation: 15
Thanks a lot.................

hi, abhandari

Thanks a lot for your mail we are shifting our office to other location
so am unble to follow your instruction. on sunday 21-2-10 ist i will check and let tou know.

Thanks for your great help.

Thanks & Regards
JNReddy
 
  


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 Not Receiving Mail davidedwardgill Linux - Server 7 07-08-2008 02:05 PM
Sendmail not receiving mail Raidmax Slackware 4 08-20-2007 03:00 PM
Sendmail not receiving mail please help Raidmax Slackware 19 07-26-2006 05:03 PM
Sendmail not receiving messages theret79 Linux - Software 1 06-21-2006 10:02 AM
Receiving mails using sendmail mageshbabu.m Linux - Networking 2 01-19-2006 03:00 PM

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

All times are GMT -5. The time now is 07:45 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