Re: imap-sieve, question concerning "sieve_user_email" and variables, migration from 2.3 to 2.4

Claus-Justus Heine via dovecot <[email protected]> Fri, 17 Apr 2026 20:11:30 +0200
Newsgroups gmane.mail.imap.dovecot
Message-ID <[email protected]>
I'd like to renew this question in order to make sure that it doesn't 
get "lost". Does anyone reading this list know if variable substitutions 
in "sieve_user_email" are supported or even make sense, and how to 
achieve in >= v2.4 the equivalent of the v2.3 setting

sieve_user_email = %[email protected]

?

The attempt to set

sieve_user_email = %{user|username|lower}@some.concrete.domain

is not accepted by v2.4.

Kind thanks for any hints, best regards

Claus

Am 10.04.26 um 18:11 schrieb Claus-Justus Heine via dovecot:
> Hi there,
> 
> I have a question concerning the configuration setting
> 
> sieve_user_email
> 
> In a v2.3 setup I had it set to
> 
> sieve_user_email = %[email protected]
> 
> Now I am trying to migrate to v2.4 and thought the direct translation 
> from the old variable expansion scheme to the new scheme deployed in 
> v2.4 would be
> 
> sieve_user_email = %{user|username|lower}@some.concrete.domain
> 
> However, this does not work. Testing the documentation yields the 
> following error:
> 
> # dovecot -n -c dovecot.conf > /dev/null
> doveconf: Error: sieve: sieve settings: Failed to parse configuration: 
> Failed to expand sieve_user_email setting variables: Unknown variable 
> 'user'
> doveconf: Fatal: Error in configuration file dovecot.conf: Failed to 
> initialize Sieve
> 
> Setting "sieve_user_email" to something without variable expansion or 
> just commenting it out yields a configuration which is accepted by 
> "dovecot -n".
> 
> Now I wonder:
> 
> a) v2.3 did not complain. But perhaps just because it was using "%Ln" 
> literally?
> 
> b) In case it did work in v2.3, should it work in v2.4 also? And if so: 
> what would be the correct syntax / variable names?
> 
> c) Under which circumstances is this setting "sieve_user_email" used? 
> The documentation states:
> 
> https://doc.dovecot.org/main/core/summaries/settings.html#sieve_user_email
> 
>> The primary e-mail address for the user.
>>
>> This is used as a default when no other appropriate address is 
>> available for sending messages.
>>
>> If this setting is not configured, either the postmaster or null <> 
>> address is used as a sender, depending on the action involved.
>>
>> This setting is important when there is no message envelope to extract 
>> addresses from, such as when the script is executed in IMAP.
> 
> I thought that then it would make sense to use something which depends 
> on the login-name of the IMAP-user? Or was this "sieve_user_email" 
> intended to hold just one static email like 
> "[email protected]"?
> 
> Kind thanks for clarification, best regards
> 
> Claus
> 
> 
> _______________________________________________
> dovecot mailing list -- [email protected]
> To unsubscribe send an email to [email protected]

-- 
Claus-Justus Heine                      [email protected]
http://www.claus-justus-heine.de/

Schatzmeister der Camerata Academica Freiburg e.V.  ---  www.cafev.de

_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEYUKGGMEPm0+I+1edXytte5s7C8oFAmnid9MFAwAAAAAACgkQXytte5s7C8rV
GA//UI+yXI2LUb78MvJBFKp1xLmq4zFxas00SD/pPljmPNfXXDsNPV8ltLHAUMTui4xJ2DhgrT9C
fM73C9x3ZoV64oOtnBzfZi1jYQldv5Lykg5IVyRzjECUWwseYKdRppjy/ckLahPPHX+FDkIp1lYk
hIHDUITZhw5gMbUGZpILwHw86SE9mKuLrhPR4b7oquanYTaxUeSCpHFXDg4h5exrcBT92iyjHRbp
L5oezD4WwM7m6ztvo3BFyOyjFTqNOKeDu22AQ3kZ1y3XuOWMsFZvQAggHZZbxecXk8PORgZ84/r6
zDlkPMwSKEIaoT8dHixFH3Q2hKMSr0TfvccCjtW5g6YOK62V9whKgzNqcZfOwNXixO1RG7h2j2NG
+HFU56Y/Qi7TTKRC8QlfXmUOb30cvgMtye6jlZgT9h2VDasZUx2RAcoj8QXN61cQuJxxrEcG8hVJ
CCox9LycaRDfJveVDPxsEchuUJnd3D55NVW4SLhkBlGKLjvdg1mnwWpOamOzMwM+9vLI86W6o9mW
O9/AxIemoseozo6t04XkLQDogAw51dQAQv4+DSK0RF++lJzPiGPPL0vd8ctXTB+jGsDCDghMpjEB
eKkkEg+4+uH2Gl/naEq/0DXlxj13qiEkhp9OjIROh73hNXjMfDpBXUo9SHK4vwgcxUSzK373MC1K
g1M=
=N7Hp
-----END PGP SIGNATURE-----