Environment
The machine was installed SendMail, but did not start. Mail server is on the other machine, and it has been added to the open relay list and can be sent through this mail server.
Download Address http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz
The code is as follows |
Copy Code |
#tar –ZXVF sendemail-v1.56.tar.gz #cd sendemail-v1.56 #cp Sendemail/usr/local/bin |
Then give confirmation that it has execute permissions
The code is as follows |
Copy Code |
Ll/usr/local/bin/sendemail -rwxr-xr-x 1 root root 77882 11-03 14:23/usr/local/bin/sendemail |
The procedure is as follows:
1. Install SENDMAIL-CF Package
2. Modify/ETC/MAIL/SUBMIT.MC
1 FEATURE (' MSP ', ' [127.0.0.1] ') DNL
2 amended to
3 FEATURE (' MSP ', ' [Your mail server IP] ') DNL
3. Execute make in/etc/mail/directory
Test
The code is as follows |
Copy Code |
Mail-s ' Hello www.111cn.net world! ' user1@chxbd.com |
Bin/mail will use the local sendmail to send mail by default, which requires local machines to install and start the SendMail service, is cumbersome to configure, and can result in unnecessary resource consumption.
If you don't, we can close sendmail.
Turn off the SendMail service
code is as follows |
copy code |
a.[ Root@sample ~]#/etc/rc.d/init.d/sendmail stop← close SendMail service or [root@sample ~]# service sendmail stop← closed sendmail suit Service Shutting down sendmail: [OK] shutting down sm-client: [OK] B.[root@sample ~]# chkconfig sendmail-off← Turn off SendMail c.[root@sample ~]# chkconfig--list sendmail← confirm that SendMail has been turned off since startup (all is OK) SendMail 0:off 1:off 2:o FF 3:off 4:off 5:off 6:off |