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
=================