Postfix and PTR record issues

arnaud gaboury arnaud.gaboury at gmail.com
Tue Feb 9 13:14:49 UTC 2016


I am setting up a mail server with Postfix and bump my head about an
issue since a few days.

Issue:

Testing with Telnet:
------------------------------------
% telnet mail.thetradinghall.com 587
Trying MyPublicIp...
Connected to mail.thetradinghall.com.
Escape character is '^]'.
220 poppy.thetradinghall.com ESMTP Postfix (3.0.3)
mail from:arnaud.gaboury at thetradinghall.com
503 5.5.1 Error: send HELO/EHLO first
HELO thetradinghall.com
250 poppy.thetradinghall.com
mail from:arnaud.gaboury at thetradinghall.com
250 2.1.0 Ok
rcpt to:arnaud.gaboury at thetradinghall.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
.
250 2.0.0 Ok: queued as 17E4224F2B
quit
221 2.0.0 Bye
Connection closed by foreign host.
----------------------------

This is a virtual user, he is recognized. fine. I can see the emails
in the virtual mailbox.

$ journactl --unit postfix -r
--------------------------------------------
Feb 09 12:00:19 poppy postfix/smtpd[347]: disconnect from unknown
[MyPublicIp] helo=1 mail=1
Feb 09 12:00:16 poppy postfix/qmgr[204]: 17E4224F2B:
MyPublicIpfrom=<arnaud.gaboury at thetradinghall.com>,
Feb 09 12:00:16 poppy postfix/cleanup[363]: 17E4224F2B: message-id=<>
Feb 09 12:00:09 poppy postfix/smtpd[347]: 17E4224F2B: client=unknown[MyPublicIp]
Feb 09 11:59:19 poppy postfix/smtpd[347]: connect from unknown[MyPublicIp]
Feb 09 11:59:19 poppy postfix/smtpd[347]: warning: hostname
dsldevice.lan does not resolve to a
Feb 09 11:57:36 poppy systemd[1]: Started Postfix Mail Transport Agent.
---------------------------------------------

***************
Now trying to an external user:

% telnet mail.thetradinghall.com 587
----------------------------------------
..............
email from:arnaud.gaboury at thetradinghall.com
502 5.5.2 Error: command not recognized
mail from:arnaud.gaboury at thetradinghall.com
250 2.1.0 Ok
rcpt to:arnaud.gaboury at gmail.com
454 4.7.1 <arnaud.gaboury at gmail.com>: Relay access denied
---------------------------------------------------------------------------

$ journactl --unit postfix -r
----------------------------------------
Feb 09 13:47:05 poppy postfix/smtpd[1518]: NOQUEUE: reject: RCPT from
unknown[MyPublicIp]: 454 4.7.1 <arnaud.gaboury at gmail.com>: Relay
access denied; from=<arnaud.gaboury at thetradinghall.com
Feb 09 13:46:02 poppy postfix/smtpd[1518]: connect from unknown[MyPublicIp]
Feb 09 13:46:02 poppy postfix/smtpd[1518]: warning: hostname
dsldevice.lan does not resolve to address MyPublicIp

***********************

After some reading, I came to the conclusion I did not setup any PTR
record. hostname dsldevice.lan is in fact my gateway (168.192.1.254).


Some debugging commands:

-----------------------------------
% host MyPublicIp
MyPublicIp.in-addr.arpa domain name pointer dsldevice.lan. <<<< here I
should see thetradinghall.com ??

% host thetradinghall.com
thetradinghall.com has address MyPublicIp

% dig thetradinghall.com
............................
;; ANSWER SECTION:
mail.thetradinghall.com. 6632    IN    A    MyPublicIp

;; AUTHORITY SECTION:
thetradinghall.com.    85556    IN    NS    ns4.he.net.
thetradinghall.com.    85556    IN    NS    ns3.he.net.
thetradinghall.com.    85556    IN    NS    ns5.he.net.

% dig -x thetradinghall.com
.....................
;; AUTHORITY SECTION:
in-addr.arpa.        3600    IN    SOA    b.in-addr-servers.arpa.
nstld.iana.org. 2015072880 1800 900 604800 3600


% dig -x MyPublicIp
;; Warning: Message parser reports malformed message packet. <<<<
Problem here ?
--------------------------------------

***********************

About the setup: a router, one Linux distro as host (no server at all,
 inet 192.168.1.87/24 brd 192.168.1.255 scope global br0) with a
virtual bridge to a container, another linux distro with all internet
services (http, ftp, mail etc) as 192.168.1.94/24


some netwrok parameters:

----------------------------------------------
gateway 192.168.1.254
$ ip a
-----------------
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
.................................
2: host0 at if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP group default qlen 1000
    link/ether 0e:7f:c3:fb:25:b1 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.1.94/24 brd 192.168.1.255 scope global host0

***********************************************

When looking at my DNS provider (Hurricane Electric), I effectively
have no PTR record. I must set one but honestly, I am far from
understanding everything about PTR.

Thank you for help and hints.





-- 

google.com/+arnaudgabourygabx


More information about the users mailing list