Pigeonhole Sieve Config Warning

dovecot at ptld.com dovecot at ptld.com
Mon Aug 9 16:57:54 EEST 2021


> On 08-09-2021 12:55 am, Aki Tuomi wrote:
> 
>> In the sieve plugin settings i have
>>    plugin {
>>      ...
>>      sieve_user_email = %u
>>    }
>> 
>> Variables pages says
>>    %u = full username (e.g. user at domain)
>> 
>> This config seems to work in practice, the email is from: the users
>> email address.
>> 
>> However on starting dovecot im getting a warning twice:
>>    dovecot[35893]: managesieve: Warning: sieve: Invalid address value 
>> for
>> setting `sieve_user_email': Missing domain
>>    dovecot[35893]: master: Dovecot v2.3.8 (9df20d2db) starting up for
>> imap, lmtp, sieve
>>    dovecot[35897]: managesieve: Warning: sieve: Invalid address value 
>> for
>> setting `sieve_user_email': Missing domain
> 
> Maybe some of your users do not have domain in the username? %u will
> only expand into user at domain if the username has domain. It won't
> magic up the domain value there.


Im not getting my head around what you are saying. This happens on 
dovecot startup. To my knowledge there isn't any username being 
evaluated. Where would dovecot be pulling a username from? I assumed it 
was just testing the syntax of the config not grabbing random user data.

As far as maybe some users don't have domains in their username, still 
having trouble getting my head around that idea. I didn't know a 
maildir/ location had a "username" embedded into it. Isn't mail access 
determined by login verification and where mail_location tells dovecot 
where to find the maildir/ files for that login? I mean if i just change 
mail_location then doesn't that completely change the correlation 
between "username" and ones email?

For my situation im using sql to lookup login info.

   mail_home = /email/%d/%2n/%n/_dovecot
   mail_location = 
maildir:/email/%d/%2n/%n/_folders:INDEX=/email/%d/%2n/%n/_dovecot:CONTROL=/email/%d/%2n/%n/_dovecot
   password_query = SELECT inbox AS userdb_user, passwd AS password, 
CONCAT('*:storage=', diskQuota, 'm') AS userdb_quota_rule FROM accounts 
WHERE email = '%u'

Sql Columns 'email' and 'inbox' both store the same full 
"user at domain.com". The 'email' column acts as login username and the 
'inbox' column acts as maildir/ location.
Other relevant configuration...

   protocol lmtp {
     mail_plugins = $mail_plugins sieve
   }
   plugin {
     ...
     sieve = file:~/../_sieve;active=~/../_sieve/.active_sieve
     sieve_user_email = %u
   }

Where is my misunderstanding on this and/or what is dovecot looking at 
on startup to determine there isn't a domain in usernames for sieve when 
no one has logged in yet? Or should i trick sieve by putting %n@%d 
instead of %u for sieve_user_email?


More information about the dovecot mailing list