Re: another mailrules quirk (databytes)
Bruce Guenter <[email protected]>
| Newsgroups | gmane.comp.sysutils.bgware |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jun 10, 2005 at 02:37:29PM +0200, Janos Farkas wrote: > I'm confused; debugging via a printf in apply_rule(): > - delivering to x1@x1 and then bb@bb > applies a databytes limit of 20. ok. rejects mail > - delivering to x1@x1 and then xx@xx > applies a databytes limit of 0. accepts mail (IMHO, not good) > - delivering to x1@x1 and then x1@x1 > seems to apply a databytes limit of 20 twice(?), but accepts the mail(?) The following patch should fix your problem. -- Bruce Guenter <[email protected]> http://em.ca/~bruceg/ http://untroubled.org/ OpenPGP key: 699980E8 / D0B7 C8DD 365D A395 29DA 2E2A E96F B2DC 6999 80E8 --- mailrules.c (revision 342) +++ mailrules.c (working copy) @@ -214,7 +214,8 @@ unsigned len; for (i = 0; i < s->len; i += len + 1) { len = strlen(s->s + i); - if (i > 0) str_catc(&envars, NUL); + if (envars.len > 0) + str_catc(&envars, NUL); str_catb(&envars, s->s + i, len); } }
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCqexj6W+y3GmZgOgRAs0kAKCJY4bquEUxU2s4cXJiKjyq9QXnEgCeOQ5R uF4GCqdHATi5JjKDZ/+mmts= =u8YY -----END PGP SIGNATURE-----