Yahoo Groups archive

Milter-greylist

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

Thread

Bracket in email adres

Bracket in email adres

2006-10-23 by Rini van Zetten

Hello list,
Last week i installed milter-greylist and it worked as expected until i got an mail with an bracket ( in the email address.
After that mail al mails where greylisted while i had a lot mails in the whitelist.
When i restart the demaon he refuses to load the dumpfile and logs an error in the line with the bracket email adress.
I use milter-greylist version 2.0.2.
Is there a solution ?
Is the 3.0 rc stable enough to use ?
Regards,
Rini van Zetten

Re: [milter-greylist] Bracket in email adres

2006-10-23 by manu@netbsd.org

Rini van Zetten <Rini@...> wrote:

> I use milter-greylist version 2.0.2.
> 
> Is there a solution ?
> Is the 3.0 rc stable enough to use ?

I use 3.0rc in production. Can you give it a try?

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: Bracket in email adres

2006-10-24 by rdrvzet

--- In milter-greylist@yahoogroups.com, manu@... wrote:
>
> Rini van Zetten <Rini@...> wrote:
> 
> > I use milter-greylist version 2.0.2.
> > 
> > Is there a solution ?
> > Is the 3.0 rc stable enough to use ?
> 
> I use 3.0rc in production. Can you give it a try?
> 

Ok I will try, thanks for answering.

Rini
Show quoted textHide quoted text
> -- 
> Emmanuel Dreyfus
> http://hcpnet.free.fr/pubz
> manu@...
>

Re: Bracket in email adres

2006-10-26 by hwdahm

--- In milter-greylist@yahoogroups.com, "rdrvzet" <Rini@...> wrote:
>
> --- In milter-greylist@yahoogroups.com, manu@ wrote:
> >
> > Rini van Zetten <Rini@> wrote:
> > 
> > > I use milter-greylist version 2.0.2.
> > > 
> > > Is there a solution ?
> > > Is the 3.0 rc stable enough to use ?
> > 
> > I use 3.0rc in production. Can you give it a try?
> > 
> 
> Ok I will try, thanks for answering.
> 
> Rini
> 
> > -- 
> > Emmanuel Dreyfus
> > http://hcpnet.free.fr/pubz
> > manu@
> >
>

With 3.0rc5 I had the same problem today with a semicolon.
By the way: we use 3.0rc5 on two mailservers, with half a million
greylisted entries each day, no more trouble since upgrading from 2.02.

Hans

Re: [milter-greylist] Re: Bracket in email adres

2006-10-28 by AIDA Shinra

At Thu, 26 Oct 2006 16:07:25 -0000,
hwdahm wrote:
> 
> --- In milter-greylist@yahoogroups.com, "rdrvzet" <Rini@...> wrote:
> >
> > --- In milter-greylist@yahoogroups.com, manu@ wrote:
> > >
> > > Rini van Zetten <Rini@> wrote:
> > > 
> > > > I use milter-greylist version 2.0.2.
> > > > 
> > > > Is there a solution ?
> > > > Is the 3.0 rc stable enough to use ?
> > > 
> > > I use 3.0rc in production. Can you give it a try?
> > > 
> > 
> > Ok I will try, thanks for answering.
> > 
> > Rini
> > 
> > > -- 
> > > Emmanuel Dreyfus
> > > http://hcpnet.free.fr/pubz
> > > manu@
> > >
> >
> 
> With 3.0rc5 I had the same problem today with a semicolon.
> By the way: we use 3.0rc5 on two mailservers, with half a million
> greylisted entries each day, no more trouble since upgrading from 2.02.
> 

This bug should be considered as a DoS vulnerability. We must validate
email addresses and strip unnecessary parts.

http://www.j10n.org/files/milter-greylist-3.0rc6-dosfix.patch

If we reject rare addresses like <(comment) "Quoted" @[1.2.3.4]>, it
can be fixed in simpler manner.

Re: [milter-greylist] Re: Bracket in email adres

2006-10-28 by manu@netbsd.org

AIDA Shinra <shinra@...> wrote:

> http://www.j10n.org/files/milter-greylist-3.0rc6-dosfix.patch
-email          {mailbox}"\@"{domainname}
+domainliteral  "["([0-9.]+|IPv6:[0-9.:]+)"]"
+email          {mailbox}"\@"({domainname}|{domainliteral})

That's a big change. I used the email definition from RFC822. There is
no way to fix that without changing the email definition?
 
> If we reject rare addresses like <(comment) "Quoted" @[1.2.3.4]>, it
> can be fixed in simpler manner.

Is <(comment) "Quoted" @[1.2.3.4]> a valid address? 

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Re: Bracket in email adres

2006-10-29 by Hajimu UMEMOTO

Hi,

>>>>> On Sun, 29 Oct 2006 02:53:37 +0900
>>>>> AIDA Shinra <shinra@...> said:

shinra> +domainliteral	"["([0-9.]+|IPv6:[0-9.:]+)"]"
shinra> +email		{mailbox}"\@"({domainname}|{domainliteral}) 

The string form of IPv6 address is hexadecimal.

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@...  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/

Re: [milter-greylist] Re: Bracket in email adres

2006-10-29 by AIDA Shinra

At Sat, 28 Oct 2006 22:18:22 +0200,
manu@... wrote:
> 
> AIDA Shinra <shinra@...> wrote:
> 
> > http://www.j10n.org/files/milter-greylist-3.0rc6-dosfix.patch
> -email          {mailbox}"\@"{domainname}
> +domainliteral  "["([0-9.]+|IPv6:[0-9.:]+)"]"
> +email          {mailbox}"\@"({domainname}|{domainliteral})
> 
> That's a big change. I used the email definition from RFC822. There is
> no way to fix that without changing the email definition?

A possible workaround is to replace '[', ']' and ':' into '_'.

> > If we reject rare addresses like <(comment) "Quoted" @[1.2.3.4]>, it
> > can be fixed in simpler manner.
> 
> Is <(comment) "Quoted" @[1.2.3.4]> a valid address? 

Valid but RFC2822 reads:

  then the dot-atom form SHOULD be used and the
  quoted-string form SHOULD NOT be used. Comments and folding white
  space SHOULD NOT be used around the "@" in the addr-spec.

Therefore, we may assume that when a client includes comment or
quoted-string in MAIL FROM: or RCPT TO: the client will be a spammer.
In contrast, I can't find such a claim against domain-literal either
RFC2821 or RFC2822.

Re: [milter-greylist] Re: Bracket in email adres

2006-10-29 by manu@netbsd.org

AIDA Shinra <shinra@...> wrote:

> A possible workaround is to replace '[', ']' and ':' into '_'.

That looks less invasive, and we alreay do that for spaces. Do you see
any drawback?

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Re: Bracket in email adres

2006-10-29 by AIDA Shinra

At Sun, 29 Oct 2006 06:50:41 +0100,
manu@... wrote:
> 
> AIDA Shinra <shinra@...> wrote:
> 
> > A possible workaround is to replace '[', ']' and ':' into '_'.
> 
> That looks less invasive, and we alreay do that for spaces. Do you see
> any drawback?

Such a hack makes things more complicated and less intuitive. It is
important that validation/canonization code is the most invasive part
and cannot be removed. Even if we rejected quoted-string and comment,
and replaced '[', ']' and '_' into '_', canonize_mail_address() would
be still long and complicated. That is why I implemented full RFC2822.

You may worry about compatibility with existing versions. My answer is
simple: we must get rid of all existing versions. They are vulnerable.
They dumbly records given mail addresses and fails to parse
greylist.db. All efforts to keep compatibilitiy cannot change things
better. We only need to make sure that the new milter-greylist can
load existing greylist.db.

Re: [milter-greylist] Re: Bracket in email adres

2006-10-29 by manu@netbsd.org

AIDA Shinra <shinra@...> wrote:

> You may worry about compatibility with existing versions. My answer is
> simple: we must get rid of all existing versions. They are vulnerable.
> They dumbly records given mail addresses and fails to parse
> greylist.db. All efforts to keep compatibilitiy cannot change things
> better. We only need to make sure that the new milter-greylist can
> load existing greylist.db.

When I wrote it initially, my idea was that I didn't care about
unparsable addresses that could get into the database, because I could
just ignore them when reloading. 

So in my opinion, the problem is just that we bug on reloading bogus
addresses from the database, where we should just ignore them and skip
the line.

Do you see any problem with that approach?

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Re: Bracket in email adres

2006-10-29 by AIDA Shinra

At Sun, 29 Oct 2006 16:30:54 +0100,
manu@... wrote:
> 
> AIDA Shinra <shinra@...> wrote:
> 
> > You may worry about compatibility with existing versions. My answer is
> > simple: we must get rid of all existing versions. They are vulnerable.
> > They dumbly records given mail addresses and fails to parse
> > greylist.db. All efforts to keep compatibilitiy cannot change things
> > better. We only need to make sure that the new milter-greylist can
> > load existing greylist.db.
> 
> When I wrote it initially, my idea was that I didn't care about
> unparsable addresses that could get into the database, because I could
> just ignore them when reloading. 
> 
> So in my opinion, the problem is just that we bug on reloading bogus
> addresses from the database, where we should just ignore them and skip
> the line.
> 
> Do you see any problem with that approach?

Sounds reasonable. In this approach we only need to take care about
lex/yacc caveats and non-ASCII characters breaking ctype(3).

Re: [milter-greylist] Re: Bracket in email adres

2006-11-01 by AIDA Shinra

> > > You may worry about compatibility with existing versions. My answer is
> > > simple: we must get rid of all existing versions. They are vulnerable.
> > > They dumbly records given mail addresses and fails to parse
> > > greylist.db. All efforts to keep compatibilitiy cannot change things
> > > better. We only need to make sure that the new milter-greylist can
> > > load existing greylist.db.
> > 
> > When I wrote it initially, my idea was that I didn't care about
> > unparsable addresses that could get into the database, because I could
> > just ignore them when reloading. 
> > 
> > So in my opinion, the problem is just that we bug on reloading bogus
> > addresses from the database, where we should just ignore them and skip
> > the line.
> > 
> > Do you see any problem with that approach?
> 
> Sounds reasonable. In this approach we only need to take care about
> lex/yacc caveats and non-ASCII characters breaking ctype(3).

Is this patch sufficient? I'm new to lex/yacc...

http://www.j10n.org/files/milter-greylist-3.0rc6-dosfix2.patch

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.