Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] Submitter DNS name resolution and forgery detection

2013-08-16 by Johann Klasek

On Thu, Aug 15, 2013 at 04:14:49PM +0200, manu@... wrote:
> Jim Klimov <jimklimov@...> wrote:
> 
> > # This is in wrong order by a couple of lines - you should first
> > set the priv->priv_hostname value with strncpy(), then fix it :)
> 
> Right.
> 
> > # Also, this is geared towards exactly resolving a bracketed name.
> > My code could also do resolution in the (theoretical) case that a
> > numeric IP address was passed without brackets. Then again, this
> > routine is called "unbracketing" for a reason ;)
> 
> I prefer to address real problems rather than potential ones.
>  
> > # In the routine itself you have an ifdef... I think it warrants
> > an #else to report that unbracketing was needed and requested, but
> > the program was configured and built without proper DNS support.
> 
> Updated version: http://ftp.espci.fr/shadow/manu/unbracket2.patch

Just want to note, that the bracketed version sendmail provides may look like

[IPv6:2a01:1b0:7999:446:0:2:8ed:2c78]

This is the form sendmail falls back to a hostname if the ip addr does not resolve.
In a MG log it looks like 

Aug 16 06:11:23 neelix milter-greylist: r7G4BN1J030057: skipping greylist because this is the default action, (from=<XXXXXX@...>, rcpt=<xxxxxxx@...>, addr=[IPv6:2a01:1b0:7999:446:0:2:8ed:2c78][2a01:1b0:7999:446:0:2:8ed:2c78]) ACL 614

as opposed to 

Aug 16 08:06:07 neelix milter-greylist: r7G667ba013248: skipping greylist because this is the default action, (from==netbsd.org@...>, rcpt=<xxx@...>, addr=mail.NetBSD.org[2001:4f8:3:7::25]) ACL 614


It would be interessting, what Oracle CommunicationServer defines ...

Maybe the function resolve_bracketed() should handle this case too.


Johann

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.