Re: Untaint $local_part, $domain and other variables

Ian Z via Exim-users <[email protected]>
Newsgroups gmane.mail.exim.user
Message-ID <[email protected]>
On Sun, Sep 14, 2025 at 01:09:08PM -0400, Emilio Augusto Lazo Zaia via Exim-users wrote:

> I'm seeking assistance with passing sanitized variables to a script
> at the transport level. Specifically, I need to pass
> $local_part@$domain, $sender_address, $sender_host_address, and
> $sender_address_domain to the script.

I believe sender_host_address is not tainted.

As for the others: you can use the envelope_to_add and return_path_add
options on the transport. Then the information you are trying to
obtain from the variables will be available in the email header. Your
script can parse the header.

Since I have run into this problem (and the solution) more than once,
I think it may be a bit of a FAQ.

-- 
Ian

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   [email protected]
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.