- Download send mail rpm from rpmfind.net
- Install the rpm
- Go to /etc/mail, here u will find sendmail related files
- Now send the configuration file sendmail.mc to sendmail.cf using m4 (macro processor) after backing up sendmail.mc and sendmail.cf
- Mail ] # m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
- Mail ] # m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
- Go to /etc/init.d for newaliases and restart send mail (service sendmail restart)
- Change permissions for sendmail.cf (chmod –R 700 sendmail.cf)
- Go to tmp (directory) to check if sendmail is running using following command
- tmp ] # pgrep sendmail
- It should return pid if it is running and return blank if it is not running
- To check the interface on which sendmail is listening using the following command
- tmp ] # netstat –an grep :25 grep tcp
- It should show a list of tcp listeners
- Go to /etc/mail/sendmail.mc and modify/edit the file as follows:
Comment DAEMON_OPTIONS to make sendmail listen to NIC
Comment “accept_unresolvable_domains” to avoid SPAM
Comment “relay_based_on_MTI” to avoid mails from other PC’s which are not configured on the domain. - Regenerate the sendmail.cf file as in step 4
- Configure the sendmail in /etc/hosts file
Ipaddress hostname.domainname
Example: 10.0.0.143 localhost.domainname.com localhost mail www - Now try sending mail as follows
Tmp ] # sendmail –v ****@domain.com
Test text
Test text
. (dot) - Now we can check the status or errors mail sent in /var/log/maillog
- If mail is sent status will be shown as stat=sent if not stat=deffered
Saturday, September 20, 2008
Send Mail option in RHEL ES 4.7
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment