On 2022-12-11, Dengler, Gabriel via Exim-users <exim-users@exim.org> wrote: > Hey Heiko, > > in the meantime, I made great progress with the "transport_filter" tool. > That was exactly what I was looking for. > > In the current setup, I want to store a public and a private key for > each user, whereas the private key is encrypted by a password that is > only known by the user. For incoming messages, I use the public key to > encrypt them, for accessing those messages you need the private key, > respectively. > > As mentioned in the documentation [1], you can use expansion variables > to pass to the "transport_filter". Is there an easy way to access the > user name or do you have to filter it out of the headers, e.g. by > accessing "Envelope-to:"? I thought about $recipients [2], but this is > not available for "transport_filter".
You can save $recipients into an $acl_m_ variable in the data acl and thus have the value available when doing delivery, but how will that help? - recipients may be multiple... When encrypting you need a single. if it's handling a single recipinet you get you get $domain ansd $local_part which are probably what you want. They're tainted so use them in a lookup to find the public key (or the filename). some transports can handle muiltipe recipients in a single transaction. they'll need to be configured to not attempt that. -- Jasen. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/