Re: [Dovecot] Doveadm with a 2nd Instance
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? Chris
On 26.9.2013, at 16.11, Chris Lasater <vorgusa@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:
- Look at the “instances” in the built-in configured STATE_DIR (doveconf -d state_dir)
- Find the instance name from the file (2nd parameter) and the base_dir (3rd parameter)
- Get the base_dir/dovecot.conf symlink’s destination path
- Use that path as the config file
On 11/02/2013 08:32 AM, Timo Sirainen wrote:
On 26.9.2013, at 16.11, Chris Lasater <vorgusa@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:
- Look at the “instances” in the built-in configured STATE_DIR (doveconf -d state_dir)
- Find the instance name from the file (2nd parameter) and the base_dir (3rd parameter)
- Get the base_dir/dovecot.conf symlink’s destination path
- Use that path as the config file
I only have 1 doveadm binary, and I have an alias set up for it:
alias doveadm="sudo -E PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH /home/user/apps/dovecot/bin/doveadm"
I later found out that if I change the base_dir for both instances to a different folder, the problem went away, so it appeared to grab the default base_dir when I told it to use the Director instance.
participants (2)
-
Chris Lasater
-
Timo Sirainen