Send mail with exim4 under Debian
Mode one: Direct use of SMTP letter
#dpkg-reconfigure Exim4-config
(1) Split the configuration document into small files? Whether
(2) Select the first item and use SMTP to send a letter directly
(3) System mail name, random; (I wrote Admin@ip here)
(4) IP address of inbound SMTP connection to listen for:
127.0.0.1 (so that only the native can use EXIM4)
* (Everyone can use)
192.168.0.0/24, only this IP range can be used
(5) Other acceptable mail Destination address: (empty)
(6) Mail forwarding for these hosts: (empty)
(7) To maintain the minimum DNS query amount (On Demand dial number Dial-on-demand)? Whether
Mode two: Use Smarthost letter
(1) Split the configuration document into small files? Whether
(2) Select "Send a letter with smarthost; no local mail"
(3) System mail name, random; (I wrote Admin@ip here)
(4) IP address of inbound SMTP connection to listen for:
127.0.0.1 (so that only the native can use EXIM4)
* (Everyone can use)
192.168.0.0/24, only this IP range can be used
(5) Other acceptable mail Destination address: (empty)
(6) Mail forwarding for these hosts: (empty)
(7) The machine responsible for handling mail sent from this machine (smarthost): The SMTP address that is really used for outgoing mail (I use smtp.gmail.com here)
(8) To maintain the minimum DNS query amount (On Demand dial number Dial-on-demand)? Whether
There are also several configuration files to modify:
(1)/ETC/EXIM4/PASSWD.CLIENT,SMTP account password settings, add:
Help Stu.xjtu.edu.cn:flowaters@stu.xjtu.edu.cn:password Gmail-smtp.l.google.com:admin@vixp.net:password
(2)/etc/email-addresses, System email address, add:
User:admin@ip
Run update-exim4.conf after configuration, and then restart the EXIM4 service.
Considerations for using EXIM4 letters in Web services:
1. The name of the user running the service is in the mail group with mail permissions
2. Send the mail log under the/var/mail/username/
Through the above, we learned how to use Exim4 under Debian to send mail, hope to be helpful to everyone.