On 26.9.2013, at 16.11, Chris Lasater <vorg...@gmail.com> wrote:

> While testing some more I found out something else.  I have an alias set for 
> doveadm so it was running with sudo and that ended up being part of the 
> issue.  If doveadm is run as a regular user then the problem goes away
> 
> [user@server ~]$ doveadm -i Director log find
> Debug: /home/user/apps/logs/director/director_debug.log
> Info: /home/user/apps/logs/director/director_info.log
> Warning: /home/user/apps/logs/director/director.log
> Error: /home/user/apps/logs/director/director.log
> Fatal: /home/user/apps/logs/director/director.log
> 
> [user@server ~]$ sudo doveadm -i Director log find
> Debug: /home/user/apps/logs/dovecot_debug.log
> Info: /home/user/apps/logs/dovecot_info.log
> Warning: /home/user/apps/logs/dovecot.log
> Error: /home/user/apps/logs/dovecot.log
> Fatal: /home/user/apps/logs/dovecot.log
> 
> Also if I run "sudo doveadm stop" to stop the main instance, I now have the 
> ability to use the -i Director using sudo.  Unfortunately this makes it 
> difficult to manage two instances.  Does anyone have an idea of getting this 
> to work with sudo?

I don’t see why sudo should matter here. I can’t reproduce this, it always 
works no matter what I do. Do you have two different doveadm commands in 
different paths (sudo vs non-sudo path)? The way the -i parameter works is 
simply:

1. Look at the “instances” in the built-in configured STATE_DIR (doveconf -d 
state_dir)
2. Find the instance name from the file (2nd parameter) and the base_dir (3rd 
parameter)
3. Get the base_dir/dovecot.conf symlink’s destination path
4. Use that path as the config file

Reply via email to