Ed McLain wrote:
> David,
> I’ve been trying to find the code for the plugin resolve_sender_host but
> haven’t had any luck - is that a custom plugin or can you send me the link
> to it?
> 
> Just looking at the below:
> 
>>>> 100/2 [16025] dns lookup: Trying to resolve A: 127.0.0.1
>>>> 100/2 [16025] dns lookup: NS Query: 127.0.0.1 (60240)
>>>> DNS failure looking for 127.0.0.1 after 0 secs (looked for 1, got 0)
> 16025 (connect) running plugin: resolve_sender_host
> 16025 (connect) resolve_sender_host: DEBUG: ip=127.0.0.1 host=localhost
> domain=localhost
> 16025 Plugin resolve_sender_host, hook connect returned DECLINED,
> 
> 
> 
> It appears that resolve_sender_host is trying to do an A query for the IP
> 127.0.0.1 vs a PTR which is what it should be doing.
> 
> ―
> Edward McLain
> Director of Cloud Architecture
> Solutions Architect, VCP, CDCDP
> emcl...@teklinks.com
> d:205.314.6646 
>  <http://www.teklinks.com/>
> 
> Please direct all support questions to our support team at
> host...@teklinks.com <http://mailto:host...@teklinks.com/> or 205.314.6634.
> 
> 
> 
> 
> -----Original Message-----
> From: David Favor <da...@davidfavor.com>
> Date: Friday, July 18, 2014 at 9:07 AM
> To: Edward McLain <emcl...@teklinks.com>
> Cc: qpsmtpd <qpsmtpd@perl.org>
> Subject: Re: qpsmtpd-async weird ParaDNS lookup problem
> 
>> Ed McLain wrote:
>>> If using dig you can either do:
>>>
>>> dig -x 127.0.0.1
>>>
>>> OR
>>>
>>> dig 1.0.0.127.in-addr.arpa PTR
>>>
>>> That is going to query the primary name server listed in
>>> /etc/resolv.conf
>>> - so unless it has a reverse zone setup for the l27.x block you will not
>>> get an answer back or you will get an answer like the one you have
>>> below.
>> Same data on for both commands on both servers...
>>
>> biz-net2# dig -x 127.0.0.1 | egrep '^[a-z0-9]'
>> 1.0.0.127.in-addr.arpa.      604800  IN      PTR     localhost.
>> 127.in-addr.arpa.    604800  IN      NS      localhost.
>> localhost.           604800  IN      A       127.0.0.1
>> localhost.           604800  IN      AAAA    ::1
>>
>> biz-net2# dig 1.0.0.127.in-addr.arpa PTR | egrep '^[a-z0-9]'
>> 1.0.0.127.in-addr.arpa.      604800  IN      PTR     localhost.
>> 127.in-addr.arpa.    604800  IN      NS      localhost.
>> localhost.           604800  IN      A       127.0.0.1
>> localhost.           604800  IN      AAAA    ::1
>>
>>> What¹s the actual problem you are trying to solve though?
>> Problem is ParaDNS is failing on all lookups for this server.
>>
>> export PARADNS_DEBUG=100
>>
>> perl ./qpsmtpd-async -j 1 -v --user root --port 3000 --config-port=23000
>> 16024 Loaded Qpsmtpd::Plugin::logging::warn=HASH(0x1401988)
>> 16024 in config(plugins)
>> 16024 config(plugins): hook returned (0, )
>> 16024 trying to get config for plugins
>> 16024 setting _config_cache for plugins to [resolve_sender_host
>> dont_require_anglebrackets rcpt_simple t...@newswire.net
>> ch...@newswire.net d...@newswire.net supp...@newswire.net
>> account...@newswire.net sa...@newswire.net debr...@newswire.net maildir
>> /cluster/clients/ivan-budimir %d/users/%l/Maildir] from get_qmail_config
>> and returning it
>> 16024 in config(plugin_dirs)
>> 16024 config(plugin_dirs) returning () from cache
>> 16024 Loading resolve_sender_host from ./plugins/resolve_sender_host
>> 16024 resolve_sender_host hooking connect
>> 16024 in config(plugin_dirs)
>> 16024 config(plugin_dirs) returning () from cache
>> 16024 Loading dont_require_anglebrackets from
>> ./plugins/dont_require_anglebrackets
>> 16024 dont_require_anglebrackets hooking rcpt_pre
>> 16024 dont_require_anglebrackets hooking mail_pre
>> 16024 in config(plugin_dirs)
>> 16024 config(plugin_dirs) returning () from cache
>> 16024 Loading rcpt_simple t...@newswire.net ch...@newswire.net
>> d...@newswire.net supp...@newswire.net account...@newswire.net
>> sa...@newswire.net debr...@newswire.net from ./plugins/rcpt_simple
>> 16024 rcpt_simple hooking rcpt
>> 16024 in config(plugin_dirs)
>> 16024 config(plugin_dirs) returning () from cache
>> 16024 Loading maildir /cluster/clients/ivan-budimir %d/users/%l/Maildir
>>from ./plugins/maildir
>> 16024 maildir hooking queue
>> 16024 Running as user root, group root
>> 16024 Listening on 3000 with 1 children with poll()
>> Use of inherited AUTOLOAD for non-method Net::DNS::Resolver::MAX_ID() is
>> deprecated at ./qpsmtpd-async line 157.
>>
>> ... waiting for connection ...
>>
>> Generate a connection...
>>
>> swaks -s localhost -p 3000 -t t...@example.com
>>
>> Where -s $host can be anything, as nothing resolves.
>>
>> ... then when connection occurs...
>>
>> Listen child making a Qpsmtpd::PollServer for 7.
>> 16025 in config(plugins)
>> 16025 config(plugins) returning (resolve_sender_host
>> dont_require_anglebrackets rcpt_simple t...@newswire.net
>> ch...@newswire.net d...@newswire.net supp...@newswire.net
>> account...@newswire.net
>> sa...@newswire.net debr...@newswire.net maildir
>> /cluster/clients/ivan-budimir %d/users/%l/Maildir) from cache
>>>>> 100/2 [16025] dns lookup: Trying to resolve A: 127.0.0.1
>>>>> 100/2 [16025] dns lookup: NS Query: 127.0.0.1 (60240)
>>>>> DNS failure looking for 127.0.0.1 after 0 secs (looked for 1, got 0)
>> 16025 (connect) running plugin: resolve_sender_host
>> 16025 (connect) resolve_sender_host: DEBUG: ip=127.0.0.1 host=localhost
>> domain=localhost
>> 16025 Plugin resolve_sender_host, hook connect returned DECLINED,
>> 16025 in config(smtpgreeting)
>> 16025 config(smtpgreeting): hook returned (0, )
>> 16025 trying to get config for smtpgreeting
>> 16025 setting _config_cache for smtpgreeting to [Ready!] from
>> get_qmail_config and returning it
>>
>> Notice the there lines with prepended '>>>' which show ParaDNS failing.
>>
> 

I've removed this this plugin, as it has no relation to problem.

As mentioned, the exact same qpsmtpd setup works with prefork, which is what I'm
running till this is resolved. The problem looks to be how ParaDNS is 
interacting
with this setup.

Listen child making a Qpsmtpd::PollServer for 7.
25500 in config(plugins)
25500 config(plugins) returning (dont_require_anglebrackets rcpt_simple 
t...@newswire.net ch...@newswire.net d...@newswire.net supp...@newswire.net 
account...@newswire.net sa...@newswire.net
debr...@newswire.net maildir /cluster/clients/ivan-budimir %d/users/%l/Maildir) 
from cache
100/2 [25500] dns lookup: Trying to resolve A: 127.0.0.1
100/2 [25500] dns lookup: NS Query: 127.0.0.1 (49469)
DNS failure looking for 127.0.0.1 after 0 secs (looked for 1, got 0)
25500 in config(smtpgreeting)
25500 config(smtpgreeting): hook returned (0, )
25500 trying to get config for smtpgreeting
25500 setting _config_cache for smtpgreeting to [Ready!] from get_qmail_config 
and returning it

And I do see what you mean... The line above...

    100/2 [25500] dns lookup: Trying to resolve A: 127.0.0.1

does seem rather odd... I'll run the same test on a working qpsmtpd-async
system + see what ParaDNS debug spews...

100/2 [15241] dns lookup: Using nameserver 127.0.0.1:53
100/2 [15241] dns lookup: Using nameserver 68.233.248.187:53
100/2 [15241] dns lookup: Using nameserver 68.233.248.204:53
100/2 [15241] dns lookup: Trying to resolve A: 127.0.0.1
100/2 [15241] dns lookup: NS Query: 127.0.0.1 (29444)
100/1 [15241] dns lookup: Query mismatch for id: 29444. 127.0.0.1 ne 
1.0.0.127.in-addr.arpa
 DNS failure looking for 127.0.0.1 after 0 secs (looked for 1, got 0)

Well... records still look very odd... even on working server... How
ParaDNS + Danga::Socket is being called seems wrong.

The only difference I noticed between the two servers was an entry
for 127.0.0.1 in /etc/resolv.conf so I added this in the broken server.

Same behavior.

Also check ParaDNS + Danga::Socket versions. Same on both servers.

A head scratcher. Guess I'll add some debug code to Danga::Socket to
see if that helps.

Reply via email to