LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-04-2018, 02:57 AM   #1
utnalove
LQ Newbie
 
Registered: Jul 2007
Distribution: CentOS 7
Posts: 24

Rep: Reputation: 0
Postfix - can't resolve rDNS


Hello,

PROBLEM
Postfix is not resolving rDNS... -> (unknown
See below the headers of an email.

However I can see that in journalctl -f, it translates some IP to name.
If I turn chroot for smtps ON, it stops translating in journalctl, and all the connections appear as unknown.

The problem is with received emails. All of them have (unknown before the IP address, no matter if smtpd has chroot on or off.




here is a header of an email sent from a website contact form IP 94.177.253.49.
The mail server is at IP 185.43.211.43.

Both of them have a rDNS assigned. (please don't post here the DNS name assigned to 94.177.253.49 for privacy reason, because it has name, and I want to avoid google to crawl and index it).

Chroot is OFF
Code:
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
submission inet n       -       -       -       -       smtpd
  -o smtpd_tls_security_level=encrypt
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
        -o smtp_fallback_relay=
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix  -       n       n       -       2       pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}
dovecot   unix  -       n       n       -       -       pipe flags=DRhu user=vmail:vmail argv=/usr/bin/spamc -4 -u vmail -e /usr/libexec/dovecot/deliver -d ${recipient} -f ${sender}

policy-spf  unix  -       n       n       -       -       spawn user=nobody argv=/usr/libexec/postfix/policyd-spf
And this is part of a header of an email sent from the website contact form to the email:
Code:
Delivered-To: xxx@glmr.in
Received: by mail.glmr.in (Postfix, from userid 994)
	id 4CDBC1373; Thu,  4 Oct 2018 09:37:52 +0200 (CEST)
Delivered-To: xxx@tantramassageamsterdam.net
Received: from www.tantramassageamsterdam.net (unknown [94.177.253.49])
	(Authenticated sender: xxx@tantramassageamsterdam.net)
	by mail.glmr.in (Postfix) with ESMTPSA id DA19E428
	for <xxx@tantramassageamsterdam.net>; Thu,  4 Oct 2018 09:37:31 +0200 (CEST)
Date: Thu, 4 Oct 2018 07:37:25 +0000
To: xxx@tantramassageamsterdam.net
From: 2342 <xxx@tantramassageamsterdam.net>
Reply-To: fsdfsa@sdfas.com

This is host from the mail server:
Code:
~]# host 94.177.253.49
49.253.177.94.in-addr.arpa domain name pointer se******o.com.
And here nslookup:
Code:
 ~]# nslookup  94.177.253.49
Server:         62.149.128.4
Address:        62.149.128.4#53

Non-authoritative answer:
49.253.177.94.in-addr.arpa      name = se******o.com.

Authoritative answers can be found from:

And here some more info:
Code:
 ~]# postconf | grep dns
disable_dns_lookups = no
dnsblog_reply_delay = 0s
dnsblog_service_name = dnsblog
lmtp_dns_resolver_options =
lmtp_host_lookup = dns
postscreen_dnsbl_action = ignore
postscreen_dnsbl_reply_map =
postscreen_dnsbl_sites =
postscreen_dnsbl_threshold = 1
postscreen_dnsbl_ttl = 1h
smtp_dns_resolver_options =
smtp_host_lookup = dns

Does anybody know what's wrong or what else I can check?

Last edited by utnalove; 10-05-2018 at 12:29 AM.
 
Old 10-04-2018, 08:26 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,738

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
What problem are you having? I see no errors or.problems in your post.
 
Old 10-05-2018, 12:30 AM   #3
utnalove
LQ Newbie
 
Registered: Jul 2007
Distribution: CentOS 7
Posts: 24

Original Poster
Rep: Reputation: 0
Ups, sorry, I forgot the most important part. Just added.
 
Old 10-05-2018, 02:43 AM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,738

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
Are you asking about this?
Code:
Received: from www.tantramassageamsterdam.net (unknown [94.177.253.49])
That's typical, in my experience. The from www.... part can be forged, but the IP address should be accurate.
I don't know postfix, but in qmail, the smtp server has to be configured to resolve the IP address. Usually, that's NOT what is wanted, because it causes more bandwith consumption and can slow down the processing of incoming mail.

What's important is which IP delivered the mail, 'cause if it's spam, that's who you want to report it to. The delivering domain is pretty much irrelevant.

Again, what problem are you trying to solve. I still am not following your actual question.

Sorry if I'm being dense...

Last edited by scasey; 10-05-2018 at 02:45 AM.
 
Old 10-05-2018, 02:49 AM   #5
utnalove
LQ Newbie
 
Registered: Jul 2007
Distribution: CentOS 7
Posts: 24

Original Poster
Rep: Reputation: 0
Yes the problem is
Code:
(unknown [94.177.253.49])
If it doesn't resolve, then I can't configure well Spamassassin, so it's crucial for me to have postfix to resolve those names and let unknown disappear and instead have the right host name.
 
Old 10-05-2018, 03:20 PM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,738

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
Quote:
Originally Posted by utnalove View Post
Yes the problem is
Code:
(unknown [94.177.253.49])
If it doesn't resolve, then I can't configure well Spamassassin, so it's crucial for me to have postfix to resolve those names and let unknown disappear and instead have the right host name.
OK Now we're getting to it.
What are you trying to configure spamassassin to do that you need the domain name?
Spamassassin has a test that will add score if there is no rDNS for the delivering IP address, so it can check that even if the mail server doesn't.

As I said, I don't know postfix, but I'm sure there's probably a way to make it do the rDNS lookups. Check the documentation.
I don't recommend it, but it your server
 
Old 10-06-2018, 12:56 AM   #7
utnalove
LQ Newbie
 
Registered: Jul 2007
Distribution: CentOS 7
Posts: 24

Original Poster
Rep: Reputation: 0
What I am trying to do is to configure whitelist_from_rcvd. But it needs postfix to get the name from IP. And if that doesn't work, so also whitelist_from_rcvd doesn't work.
 
  


Reply

Tags
postfix, rdns



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Steps to take after my ISP added custom rDNS (PTR) record for an IP address that I use for my Postfix mail server grigory Linux - Server 1 06-29-2017 03:03 PM
How I can resolve the error Postfix? warning: hostname does not resolve to address kanzer Linux - Server 1 03-22-2013 08:56 AM
Postfix Issue mails goes to spam. Have A, MX and rDNS record casoe84dk Linux - Server 13 11-24-2010 05:14 PM
DNS (and Postfix) Issue ('Domain doesn't resolve') zokken Linux - Networking 2 10-29-2008 01:10 PM
postfix can't resolve localhost yapp Linux - Networking 2 12-02-2003 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration