patch to add queueid to pipe service

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

patch to add queueid to pipe service

A. Schulze

Hello,

looking in the archive there are multiple question like "howto access  
the queueid from pipe service"
(http://marc.info/?l=postfix-users&s=pipe+queueid)

I had the same problem some times ago and wrote a patch.
Now I have the possibility to use the pipe command in master.cf like  
described in
http://www.postfix.org/FILTER_README.html#simple_filter

filter unix - n n - 10 pipe
   flags=Rq user=filter null_sender=
   argv=/path/to/script -q ${queue_id} -f ${sender} -- ${recipient}

inside /path/to/script I could access the queueid (for logging  
purposes) like other daemon usually do also.
That make the logging more precise when messages are delivered to a filter.

Maybe the patch could included in future versions of postfix.

Andreas

pipe_knows_queue_id.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: patch to add queueid to pipe service

Wietse Venema
Andreas Schulze:

>
> Hello,
>
> looking in the archive there are multiple question like "howto access  
> the queueid from pipe service"
> (http://marc.info/?l=postfix-users&s=pipe+queueid)
>
> I had the same problem some times ago and wrote a patch.
> Now I have the possibility to use the pipe command in master.cf like  
> described in
> http://www.postfix.org/FILTER_README.html#simple_filter
>
> filter unix - n n - 10 pipe
>    flags=Rq user=filter null_sender=
>    argv=/path/to/script -q ${queue_id} -f ${sender} -- ${recipient}
>
> inside /path/to/script I could access the queueid (for logging  
> purposes) like other daemon usually do also.
> That make the logging more precise when messages are delivered to a filter.
>
> Maybe the patch could included in future versions of postfix.

The patch looks good.  It is consistent with other pipe(8) features
so it introduces no surprises.

Thanks for your contribution.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: patch to add queueid to pipe service

Wietse Venema
Wietse Venema:

> Andreas Schulze:
> >
> > Hello,
> >
> > looking in the archive there are multiple question like "howto access  
> > the queueid from pipe service"
> > (http://marc.info/?l=postfix-users&s=pipe+queueid)
> >
> > I had the same problem some times ago and wrote a patch.
> > Now I have the possibility to use the pipe command in master.cf like  
> > described in
> > http://www.postfix.org/FILTER_README.html#simple_filter
> >
> > filter unix - n n - 10 pipe
> >    flags=Rq user=filter null_sender=
> >    argv=/path/to/script -q ${queue_id} -f ${sender} -- ${recipient}
> >
> > inside /path/to/script I could access the queueid (for logging  
> > purposes) like other daemon usually do also.
> > That make the logging more precise when messages are delivered to a filter.
> >
> > Maybe the patch could included in future versions of postfix.
>
> The patch looks good.  It is consistent with other pipe(8) features
> so it introduces no surprises.
>
> Thanks for your contribution.

Released in postfix-2.11-20131105.

BTW I also cleaned up the \fB${\fBmacro-name\fR}\fR text in the
pipe(8) manpage. Those extraneous \fB and \fR were introduced early
1999.

        Wietse