Closed rafaello9 closed 3 years ago
So, the HELO setting is for outbound mail only: when you send a message out for the specified domain, it will use the specified IP and it will send a HELO message to the other server with the specified host. That's all it does. There is no attempt at masking the identity of the host on incoming connections, as there is only one TLS certificate for incoming connections, so even if you make it a multi-host certificate to cover the other inbound hostnames, you cannot mask the fact that the domains are related on the inbound side.
With regard to the specifics of what you posted, there seem to be some inconsistencies, e.g. snd1.algapro.ru vs snd1.mydomain.com, and I'm uncertain of your MX records or reverse DNS. (Some systems use reverse DNS in their records, and one reason for allowing HELO customization is to allow matching it to the reverse DNS for the sending IP.)
there seem to be some inconsistencies, e.g. snd1.algapro.ru vs snd1.mydomain.com
This is really just a mechanical typo. Of course there will be snd1.mydomain.com
default:
helo: mx.mydomain.com
ip: 178.21.11.32
snd1.mydomain.com:
helo: snd1.mydomain.com
ip: 193.124.201.33
I guarantee that all DNS records are correct! Here is the output of the dig commands:
#dig -x 193.124.201.33
.........
;; ANSWER SECTION:
33.201.124.193.in-addr.arpa. 86400 IN PTR snd1.mydomain.com.
#dig snd1.mydomain.com MX
.........
;; ANSWER SECTION:
snd1.mydomain.com. 86400 IN MX 10 snd1.mydomain.com.
So, the HELO setting is for outbound mail only: when you send a message out for the specified domain, it will use the specified IP and it will send a HELO message to the other server with the specified host.
But the way you say it does not work for me. I am using mailwizz script to send messages. In mailwizz, I created a delivery server and specified the connection parameters snd1.mydomain.com there - 193.124.201.33. And if I send a message through the snd1.mydomain.com server, then the headers in the received message still contain smtp.helo = mx.mydomain.com
Delivered-To: tukxxxx@xxxxx.com
Return-path: <bounce@snd1.mydomain.com>
Authentication-Results: ....... smtp.helo=mx.mydomain.com;
Please tell me where did I go wrong? How can I make the helo match the one listed in /root/Data/outbound-hosts.yml for outbound messages?
The outbound IP and HELO is determined by the login domain of the user account that authorized the sending. It is not based on what IP you send mail into.
The outbound IP and HELO is determined by the login domain of the user account that authorized the sending.
I did everything as you say. In the script mailwizz created a delivery server with the following parameters:
hostname: 193.124.201.33
smtp user name: admin@snd1.mydomain.com
passwd: xxxxxxx
where admin@snd1.mydomain.com and xxxxxxx are the poste email account and password created in the admin panel. snd1.mydomain.com is a poste virtual domain created in the admin panel.
After that, I sent a test message. And here is the result, the headers of the received message:
Return-path: <bounce@snd1.mydomain.com>
Authentication-Results: mxs.mail.ru; spf=pass (mx231.i.mail.ru: domain of snd1.mydomain.com designates 193.124.201.33 as permitted sender) smtp.mailfrom=bounce@snd1.mydomain.com smtp.helo=mx.mydomain.com;
dkim=pass header.d=snd1.mydomain.com
Received-SPF: pass (mx231.i.mail.ru: domain of snd1.mydomain.com designates 193.124.201.33 as permitted sender) client-ip=193.124.201.33; envelope-from=bounce@snd1.mydomain.com; helo=mx.mydomain.com;
Received: from snd1.mydomain.com ([193.124.201.33]:36566 helo=mx.mydomain.com)
by mx231.i.mail.ru with esmtp (envelope-from <bounce@snd1.mydomain.com>)
id 1mYqGC-0002kQ-9A
for voxxxxx@bk.ru; Fri, 08 Oct 2021 16:50:04 +0300
.......
Received: from localhost (Unknown [127.0.0.1])
by mx.mydomain.com (Haraka) with ESMTPSA id AAE88C47-231B-4862-9A6C-02709E10E581.1
envelope-from <bounce@snd1.mydomain.com> (authenticated bits=0)
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256);
Fri, 08 Oct 2021 13:50:03 +0000
That is, helo = mx.mydomain.com is still present in the headers.
Tell me what am I doing wrong? How to make sure that for each domain specified in the /root/Data/outbound-hosts.yml list there is its own helo, which is registered there? How to remove helo = mx.mydomain.com if sending is not from the default domain?
So, it looks like the IP address is being selected at least. Can you check the haraka-smtp log for lines of the form Setting outbound HELO =
and see what they say? That should at least confirm my plugin is setting the values for haraka to use.
I searched but couldn't find. Where is the haraka-smtp log file located?
#cd /root/poste
#grep -rl 'Setting outbound HELO'
result is empty
You need to look in the container's data volume, under the log
directory.
Also, from checking my own logs, I see that it's haraka-submission that will show this line, not haraka-smtp. If that line is there then the server should be sending the appropriate HELO -- I can confirm it does this on my installation by checking Google's received headers, which show the helo after Received: from
, with the IP and reverse lookup in parentheses after it, and that it shows different data for different envelope-from domains.
I found the logs and found an error. Here is the error text:
2021-10-09 21:39:05.949630500 2021-10-09T18:39:05.949Z [DEBUG] [-] [outbound_ips] loading /data/outbound-hosts.yml
2021-10-09 21:39:05.950562500 2021-10-09T18:39:05.950Z [ERROR] [-] [outbound_ips] Error using /data/outbound-hosts.yml: ENOENT: no such file or directory, open '/data/outbound-hosts.yml'
2021-10-09 21:39:05.950758500 2021-10-09T18:39:05.950Z [INFO] [-] [outbound_ips] Setting outbound HELO = mx.mydomain.com, IP = 193.124.201.33 (default)
I specified the parameters of the docker-compose.yml file above. The outbound-hosts.yml file is located at /root/poste/data/outbound-hosts.yml Can't figure out why haraka doesn't see the outbound-hosts.yml file
Your volume configuration maps /root/poste
to /data
, so it should be /root/poste/outbound-hosts.yml
.
Now it works as it should! Thanks to!
Greetings!
I have not used poste.io before and now I am doing everything for the first time. Please answer my question.
Here are my configs
/etc/hostname
mx.mydomain.com
/etc/hosts
ip a
/root/docker-compose.yml
/root/Data/outbound-hosts.yml
If you telnet to snd1.mydomain.com (193.124.201.33), then mx.mydomain.com responds
Also, if you send a letter through the snd1.mydomain.com server (193.124.201.33), then you can see in the message headers what mx.mydomain.com receives, and then snd1.mydomain.com
My question is this. If I send via the snd1.mydomain.com server, then how do I get smtp.helo = snd1.mydomain.com in the email headers? Accordingly, to telnet, so that
but not so
thanks !!!