Re: [exim] Bounce address tag validation support

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Tom Kistner
Dátum:  
Címzett: Tom Kistner
CC: exim-users, Lars Nordin
Tárgy: Re: [exim] Bounce address tag validation support
Tom Kistner wrote:

>> Are there any plans to modify the format to be compliant with the RFC?
>
> Now that you say it ... do me a favor and test the patch below, I'm too
> tired now. I'll commit it tomorrow if it works ...


One shouldn't use GNU diff "under the influence". The patch below is OK
but reversed. In the meantime I commited it to CVS.







> --- expand.c    2007-05-11 00:06:08.000000000 +0200
> +++ expand.c.orig       2007-05-11 00:04:48.000000000 +0200
> @@ -3699,11 +3699,11 @@
>         *domain++ = '\0';

>
>         yield = string_cat(yield,&size,&ptr,US"prvs=",5);
> +      string_cat(yield,&size,&ptr,sub_arg[0],Ustrlen(sub_arg[0]));
> +      string_cat(yield,&size,&ptr,US"/",1);
>         string_cat(yield,&size,&ptr,(sub_arg[2] != NULL) ? sub_arg[2] : 
> US"0", 1);
>         string_cat(yield,&size,&ptr,prvs_daystamp(7),3);
>         string_cat(yield,&size,&ptr,p,6);
> -      string_cat(yield,&size,&ptr,US"=",1);
> -      string_cat(yield,&size,&ptr,sub_arg[0],Ustrlen(sub_arg[0]));
>         string_cat(yield,&size,&ptr,US"@",1);
>         string_cat(yield,&size,&ptr,domain,Ustrlen(domain));

>
> @@ -3741,15 +3741,15 @@
>           case 3: goto EXPAND_FAILED;
>           }

>
> -      re = 
> regex_must_compile(US"^prvs\\=([0-9])([0-9]{3})([A-F0-9]{6})\\=(.+)\\@(.+)$",
> +      re = 
> regex_must_compile(US"^prvs\\=(.+)\\/([0-9])([0-9]{3})([A-F0-9]{6})\\@(.+)$",
>                                 TRUE,FALSE);

>
>         if (regex_match_and_setup(re,sub_arg[0],0,-1))
>           {
> -        uschar *local_part = 
> string_copyn(expand_nstring[4],expand_nlength[4]);
> -        uschar *key_num = 
> string_copyn(expand_nstring[1],expand_nlength[1]);
> -        uschar *daystamp = 
> string_copyn(expand_nstring[2],expand_nlength[2]);
> -        uschar *hash = string_copyn(expand_nstring[3],expand_nlength[3]);
> +        uschar *local_part = 
> string_copyn(expand_nstring[1],expand_nlength[1]);
> +        uschar *key_num = 
> string_copyn(expand_nstring[2],expand_nlength[2]);
> +        uschar *daystamp = 
> string_copyn(expand_nstring[3],expand_nlength[3]);
> +        uschar *hash = string_copyn(expand_nstring[4],expand_nlength[4]);
>           uschar *domain = 
> string_copyn(expand_nstring[5],expand_nlength[5]);

>
>           DEBUG(D_expand) debug_printf("prvscheck localpart: %s\n", 
> local_part);

>
>
>
>