On Tue, Apr 15, 2025 at 11:38:55AM -0400, Wietse Venema via Postfix-users wrote:

> > Wouldn't the below do the trick:
> > 
> >     foo unix ... pipe
> >         -o { export_environment = HOME=/some/where }
> >         ...
> > 
> > As it should for any Postfix service that forks subprocesses?
> 
> Unfortunately, that will destroy the default export_environment
> setting with MAIL_CONFIG and perhaps more that is needed to make
> pipe-to-command-to-sendmail content filters work.

Yes, of course, the complete setting would need to be:

    -o { export_environment = TZ MAIL_CONFIG LANG HOME=/some/where }

> Other approaches:
> 
> -o { export_environment ,= HOME=/some/where ...}

Support for appending to default values would of course be nice if that
can be made to work some day.

> Looks like adding a home= attribute has the least element of surprise.

Maybe worth it, but rather an edge case I expect.  The user can always
arrange for the invoked program to set its environment, via a wrapper
if needed.

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to