Exim relay

Exim relay
Hướng dẫn cập nhật cấu hình Exim để sử dụng MailChannels làm máy chủ chuyển tiếp được cung cấp trong bài viết này. Xác thực với MailChannels là bắt buộc và việc thiết lập tương đối đơn giản. 
Phiên bản Exim 4.5.7+
Tạo các tệp sau với nội dung như sau:
/etc/exim.routers.pre.conf

smart_route:
driver = manualroute
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
condition = "${perl{check_limits}}"
#use auth_relay if you do need to set the remote smtpauth
transport = auth_relay
route_list = * smtp.sieutocviet.com::25
no_more


 

/etc/exim.transports.pre.conf

auth_relay:
driver = smtp
headers_add = X-AuthUser: $authenticated_id
hosts_require_auth = $host_address
hosts_require_tls = $host_address


 

/etc/exim.authenticators.post.conf

auth_login:
driver = plaintext
public_name = LOGIN
#specify your mailchannels SMTP user and password below
hide client_send = : smtpusername : smtppassword

service exim restart

* smtpusername : smtppassword should be replaced with the SMTP Username/Password you created when signing up with MailChannels.

    Restart exim when done.

 

Exim versions prior to 4.5.7

With DirectAdmin, the exim configurations are stored in the /etc/exim.conf file on your server and the following changes should be added/modified in the /etc/exim.conf file.

Setting Up Authentication

    Add the following entries under the "begin authenticators" section.

begin authenticators
auth_login:
driver = plaintext
public_name = LOGIN
hide client_send = : smtpusername : smtppassword

* smtpusername : smtppassword should be replaced with the SMTP Username/Password you created when signing up with MailChannels.

    Add the following Send via MailChannels route to the top of the "begin routers" section.


    begin routers
    send_via_mailchannels:
    driver = manualroute
    domains = ! +local_domains
    senders = !*@domain1.to.exclude.com : !*@domain2.to.exclude.com
    ignore_target_hosts = 127.0.0.0/8
    condition = "${perl{check_limits}}"
    transport = auth_relay
    route_list = * smtp.mailchannels.net
    no_more


    In the example above, if you do not wish to exclude a domain or sender from the MailChannels relay, leave the senders = line blank. If you do wish to exclude senders or domains here, replace the bracketed sample text with the actual sender address or domain name.

     
    Note: Do not remove or comment-out the lookuphost: router in the begin routers section, this lookuphost route config will route excluded domain from MailChannels and relay via the DirectAdmin server itself.
    Example of default lookuphost: router section:

    lookuphost:
    driver = dnslookup
    domains = ! +local_domains
    ignore_target_hosts = 127.0.0.0/8
    condition = "${perl{check_limits}}"
    transport = remote_smtp
    no_more

 

    Add the following transport to the "begin transports" section.

begin transports
auth_relay:
driver = smtp
port = 25
hosts_require_auth = $host_address
hosts_require_tls = $host_address

 

Add Authentication Header

  An authenticated sender header is required to track sender reputation within the MailChannels system. This section provides instructions for adding the authenticated sender header to the outgoing emails.
  The authenticated sender header can be added by editing /etc/exim.conf

    Add the complete "headers_add" line to the file just below “driver = smtp” line as shown:

driver = smtp

headers_add = X-AuthUser: $authenticated_id

Warning: Versions of Exim prior to the current major release are considered obsolete. If you are using Exim 3.x or earlier it is suggested by the Exim development team that you upgrade to the current release.
CSKH 24/7
028.66828299
Kỹ thuật
0968592399
Tư vấn
0919383299
Gọi điện
SMS
 Sales
 Tech