import_environment = $import_environment DEBUG=1 where should this be logged?

Marc Roos M.Roos at
Wed Dec 30 19:10:15 EET 2020

You know by any chance how to limit this only for one user?

-----Original Message-----
From: Odhiambo Washington [mailto:odhiambo at] 
Sent: 30 December 2020 18:00
To: dovecot
Subject: Re: import_environment = $import_environment DEBUG=1 where 
should this be logged?

Hi Marc,

If you read the link keenly - Debugging/Rawlog - Dovecot Wiki 
<>  - you will realize that you need to do some stuff.
I have done them and they produced the results.

Edit /path/to/dovecot/conf.d/10-master.conf and add the following:

Under this block:

add executable = imap postlogin to the block that has  service imap { 

Then create another block in the same file as follows:

service postlogin {
  executable = script-login -d rawlog
  unix_listener postlogin {

Identify the user for whom you want the rawlogs:

doveadm user -u technical at
userdb: technical at
  user      : technical at
  home      : /var/spool/virtual/
  uid       : 26
  gid       : 26

Now do the following:
cd /var/spool/virtual/
mkdir dovecot.rawlog
chown -R 26:26 dovecot.rawlog

systemctl restart dovecot (or however you do it in CentOS)

Now login to imap as the user .. perform some operations.

Now look inside 

PS: Adapt as necessary. I tested this on FreeBSD with dovecot-

Ignore the /tmp/rawlog/%u portion of the HOWTO. I did it too, but there 
was nothing in /tmp/rawlog/ even though I created the directory and did 
chmod 1777 /tmp/rawlog.


On Wed, 30 Dec 2020 at 19:30, Marc Roos <M.Roos at> 

	You can also set DEBUG environment to have rawlog log an info 
	why it's not doing anything:
	import_environment = $import_environment DEBUG=1
	Where should this message appear, I also don't have this one.


Best regards,
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)

More information about the dovecot mailing list