Trong bài viết này vHost sẽ hướng dẫn Quý khách cấu hình Relay toàn bộ email của DirectAdmin gửi thông qua một SMTP và chứng thực bằng IP Based
vi /etc/exim.conf
Sau begin routers thêm đoạn code sau:
spamexperts_smarthost_router:
driver = manualroute
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
condition = "${perl{check_limits}}"
# Exclude null sender messages from relaying via the smarthost
condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}
headers_add = ${if !eq{$original_domain}{$domain}{X-Forwarded-For: $original_local_part@$original_domain}}
headers_add = X-AuthUser: $authenticated_id
transport = spamexperts_smarthost_transport
route_list = $domain mta.vhost.vn::587
no_more
Sau begin transports bổ sung đoạn code sau:
spamexperts_smarthost_transport:
driver = smtp
# In-case your server continues to send outbound over port 25 please add the below line
port = 587
hosts_require_tls = mta.vhost.vn
Restart exim và kiểm tra lại.
service exim restart