C
C
Cyril2015-11-30 19:00:00
linux
Cyril, 2015-11-30 19:00:00

How to set up Exim correctly?

I installed Exim, launched it with default settings, but letters do not reach recipients who use Google, Mail.Ru, Yandex, etc.
For my server, I specified a PTR record of the following form - 1.2.3.4 refers to mail.domain.ru
In turn, for the domain.ru domain, the mail subdomain is an MX record and points to my server 1.2.3.4 .
Have I configured everything correctly in terms of DNS and PTR?
The logs are as follows:
Tried to send an email

[email protected]:~# echo 'test' | mail -s test [email protected]

As a result, a log file appeared in /var/spool/exim4/msglog with the following content:
2015-11-30 19:09:02 Received from <> R=1a3R0f-0008Ee-Lh U=Debian-exim P=local S=1580
2015-11-30 19:09:02 routing failed for [email protected]: Unrouteable address
*** Frozen (delivery error message)
And there are two log files in /var/spool/exim4/input at once. One of them:
1a3Qwn-00082j-H5-D
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
[email protected]
SMTP error from remote mail server after end of data:
host mxs.mail.ru [94.100.180.150]: 550 spam message rejected. Please visit help.mail.ru/notspam-support/id?c=pG27cdILK44nvX22... or report details to [email protected] Below code error:
71BB6DA48E2B0BD2B67DBD272EF0D2B74E1D1D7126933B3ED65A730B0DDE7C8CD4935CCF4A1A4A4CE8B1DEF3C40F38A09BBDAA9B254818FC8D58F07C3782C027F561E7DA9D2EEDB72B00E0583BC10722B0E08F6A41E452FBA8E5A2A4A3C79EAD5F59669FB584B17F7E405F2109B8B52171FF81B3FEF8F8F5790EB8E61B6D9E05BD93DCEA4F599F01AC96312E9FDFFB2A1F9A99D68095B050DBA6DD872BA1FCD4F21149D5D954F5B3772E1A48EF1F1AA7F4643EA3B4E1975335B4F95F67A186AD1BC9FC31C791B9BBFDCBEF9
------ This is a copy-of the message, Including all the The headers. ------
Return-path:
Received: from user123by mail.domain.ru with local (Exim 4.80)
(envelope-from )
id 1a3Qwm-000828-RB
for [email protected]; Mon, 30 Nov 2015 19:05:01 +0300
To: [email protected]
Subject: test
Message-Id:
From: user123
Date: Mon, 30 Nov 2015 19:05:00 +0300
test

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2015-12-01
@belyaevcyrill

It has long been a rule - when starting any mail server that will work with the outside world:
1. Check that mail.domain.com points to the server address, make sure that the PTR of the server address points to mail.domain.com
2. primary_hostname = mail.domain.com(in Exim. This is how we introduce ourselves to the rest)
3. domainlist relay_to_domains = domain.com(this is how we enable mail relay for the main domain
4. SPF record in DNS - "v=spf1 a mx ip4:1.2.3.4 ~all"
5. Generate DKIM certificates for domain.com, configure DNS and Exim to work with this signature.
5a. In advanced cases - setting up SPF and DKIM for the mail.domain.com domain, for letters generated by the server itself
6. Test letter to a mailbox in Yandex to see a green sign that DKIM is configured correctly
7. I almost forgot - in/etc/aliasesthe string " root: [email protected]" (together with " webmaster: root"), then newaliasesto receive hit reports.
A minimum of actions - working mail.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question