On Mon, Apr 08, 2019 at 08:20:56AM +0200, Martijn van Duren wrote:
> Found this the hard way by playing with the new filter API.
> 
> When sending a plaintext message, which has an '|' in the text it would
> cut of the data at that point. The diff below pushes the parameter split
> to after handling the filter-dataline.
> 
> Fixes my usecase.
> 
> OK?
> 
> martijn@
> 

OK but oops, I stole your commit ...

I owe you one


> Index: lka_filter.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/smtpd/lka_filter.c,v
> retrieving revision 1.34
> diff -u -p -r1.34 lka_filter.c
> --- lka_filter.c      15 Jan 2019 04:49:50 -0000      1.34
> +++ lka_filter.c      8 Apr 2019 06:20:26 -0000
> @@ -458,14 +458,14 @@ lka_filter_process_response(const char *
>               return 0;
>  
>       response = ep+1;
> -     if ((ep = strchr(response, '|'))) {
> -             parameter = ep + 1;
> -             *ep = 0;
> -     }
> -
>       if (strcmp(kind, "filter-dataline") == 0) {
>               filter_data_next(token, reqid, response);
>               return 1;
> +     }
> +
> +     if ((ep = strchr(response, '|'))) {
> +             parameter = ep + 1;
> +             *ep = 0;
>       }
>  
>       if (strcmp(response, "proceed") != 0 &&
> 

-- 
Gilles Chehade                                                 @poolpOrg

https://www.poolp.org                 tip me: https://paypal.me/poolpOrg

Reply via email to