I've got exim set up to deliver like this:

   

command = /usr/local/libexec/dovecot/dovecot-lda -a $original_local_part@$original_domain -d $local_part@$domain  -f $sender_address


If an email to is bob+sales@ish.com.au then we should have "-a bob+sales@subdomain.ish.com.au -d bob@ish.com.au".


Now in dovecot, only bob@ish.com.au is a real user but I want to be able to use both addresses in different places. For LDAP lookup I need to reference bob@ish.com.au. But in sieve, I need to see the original address with plus notation.

However, dovecot appears to get the "-a" address into %u and the "-d" address can't be accessed.

    https://doc.dovecot.org/configuration_manual/config_file/config_variables/


Is what is the point of dovecot-lda having both -a and -d options? Can I get at both bits of data?


Thanks

Ari