How to Use Exim4 to send emails In Debian

Source: Internet
Author: User

Use In DebianExim4Email sending is cumbersome. I will introduce you to the following two methods.

Use exim4 to send emails In Debian

Method 1: Send mail directly using SMTP

# Dpkg-reconfigure exim4-config

(1) split the configuration document into small files? No

(2) Select the first option and use SMTP to send emails directly.

(3) system email name (I wrote admin @ ip here)

(4) IP address of the inbound SMTP connection to be monitored:

127.0.0.1 (in this way, only the local machine can use exim4)

* (Applicable to all users)

192.168.0.0/24, which is applicable only to the IP Range

(5) other acceptable email destination addresses: (empty)

(6) forward emails to these hosts: (empty)

(7) Do I keep the minimum DNS query volume (Dial-on-Demand as needed )? No

Method 2: Use smarthost to send mail

(1) split the configuration document into small files? No

(2) Select "send with smarthost; no local mail"

(3) system email name (I wrote admin @ ip here)

(4) IP address of the inbound SMTP connection to be monitored:

127.0.0.1 (in this way, only the local machine can use exim4)

* (Applicable to all users)

192.168.0.0/24, which is applicable only to the IP Range

(5) other acceptable email destination addresses: (empty)

(6) forward emails to these hosts: (empty)

(7) Machines responsible for processing mails sent from the Local Machine (smarthost): the smtp address actually used for outgoing mails (smtp.gmail.com is used here)

(8) Do I keep the minimum DNS query volume (Dial-on-Demand as needed )? No

You also need to modify several configuration files:

(1)/etc/exim4/passwd. client, smtp account and password settings, add:

Help 12 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 the update-exim4.conf after configuration, and then restart the exim4 service.

Notes for sending emails using exim4 in web Services:

1. the user name for running the service is in the mail group, so that the mail permission is granted.

2. The mail log is under/var/mail/username /.

Through the above, we learned how to use Exim4 to send emails In Debian, hoping to help you.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.