Page 1 of 2

Can't login

Posted: Sun Feb 09, 2014 4:47 pm
by unek
Hello,

since a few days ago I can't login into my mail. Roundcube just says "Login Failed". This is what shows up in /var/log/dovecot.log every time I try to log in:

Code: Select all

Feb 09 17:32:54 auth: Error: passwd-file /etc/exim4/domains/mydomain/passwd:
stat(/etc/exim4/domains/mydomain/passwd) failed: Permission denied (euid=109(
dovecot) egid=114(dovecot) missing +w perm: /etc/exim4/domains/mydomain/passw
d stat(/etc/exim4/domains/mydomain/passwd) failed: Permission denied, dir own
ed by 0:0 mode=0775)
Feb 09 17:32:54 auth: Info: passwd-file(unek@mydomain,::1,<afGHxvvxUAAAAAAAAA
AAAAAAAAAAAAAB>): no passwd file: /etc/exim4/domains/mydomain/passwd
Feb 09 17:32:56 imap-login: Info: Disconnected (auth failed, 1 attempts in 2 sec
s): user=<unek@mydomain>, method=PLAIN, rip=::1, lip=::1, secured, session=<a
fGHxvvxUAAAAAAAAAAAAAAAAAAAAAAB>
I did some research and replaced /etc/exim4/domains/mydomain (which was a symlink apparently), with its target (/home/unek/conf/mail/mydomain), and I could log in normally, no errors appeared in the log.
A slightly different solution I've found was to create a folder for my domain in /etc/exim4/domains and using hardlinks to link domain configuration files from my home directory, like that:

Code: Select all

cd /etc/exim4/domains/
rm mydomain # removing the symlink pointing to /home/unek/conf/mail/mydomain/
mkdir mydomain
chown Debian-exim:mail mydomain/
cd mydomain/
ln /home/unek/conf/mail/mydomain/* ./
Symlinks seem to be faulty in my case. Dovecot can't read them for some reason.

How can I fix it? Hopefully my "hacky" solutions are not the only ones.

Running Debian GNU/Linux 7 (wheezy) with vesta 0.9.8 and dovecot 2.1.7. No SELinux.

Thanks in advance.

Re: Can't login

Posted: Tue Feb 11, 2014 1:49 pm
by skid
Try following command to rebuild the configuration

Code: Select all

v-rebuild-mail-domains unek

Re: Can't login

Posted: Tue Feb 11, 2014 3:12 pm
by unek
Still the same error.

Re: Can't login

Posted: Tue Feb 11, 2014 3:24 pm
by skid
What's the permissions on the passwd file?

Re: Can't login

Posted: Wed Feb 12, 2014 4:54 pm
by unek

Code: Select all

# ls -la
total 16
drwxrwx--x 2 Debian-exim mail 4096 Feb 11 16:09 ./
drwxrwx--x 6 root        root 4096 Feb  8 00:19 ../
-rw-rw---- 1 Debian-exim mail    0 Feb 11 16:09 aliases
-rw-rw---- 1 Debian-exim mail    0 Feb 11 16:09 antispam
-rw-rw---- 1 Debian-exim mail    0 Feb 11 16:09 antivirus
-rw-rw---- 1 Debian-exim mail  497 Feb 11 16:09 dkim.pem
-rw-rw---- 1 Debian-exim mail    0 Feb 11 16:09 fwd_only
-rw-rw---- 1 dovecot     mail   69 Feb 11 16:09 passwd
as I said, I'm pretty sure that the symlink is what causes the problem. Not even 777 worked.

Re: Can't login

Posted: Fri Feb 14, 2014 11:33 am
by skid
Do you still have normal directory with hardlinks in the /etc/exim4/domains/ folder?

Re: Can't login

Posted: Fri Feb 14, 2014 1:49 pm
by unek
I removed it before rebuilding.

Re: Can't login

Posted: Wed Feb 19, 2014 11:43 pm
by skid
I have completely removed directory and then rebuild configuration using v-rebuild-mail-domains. Everything works as expected:
root@adm:~# ls -all /etc/exim4/domains/adm.vestacp.com
lrwxrwxrwx 1 root root 37 Feb 19 23:38 /etc/exim4/domains/adm.vestacp.com -> /home/admin/conf/mail/adm.vestacp.com
root@adm:~# ls -all /home/admin/conf/mail/adm.vestacp.com
total 16
drwxrwx--x 2 Debian-exim mail 4096 Feb 19 23:38 .
drwxr-x--x 4 root root 4096 Feb 19 23:38 ..
-rw-rw---- 1 Debian-exim mail 0 Feb 19 23:38 aliases
-rw-rw---- 1 Debian-exim mail 0 Feb 19 23:38 antispam
-rw-rw---- 1 Debian-exim mail 0 Feb 19 23:38 antivirus
-rw-rw---- 1 Debian-exim mail 497 Feb 19 23:38 dkim.pem
-rw-rw---- 1 Debian-exim mail 0 Feb 19 23:38 fwd_only
-rw-rw---- 1 dovecot mail 71 Feb 19 23:38 passwd
Not sure how to reproduce this error. Error in the log is the same as before?

Re: Can't login

Posted: Thu Feb 20, 2014 2:12 pm
by unek
Doesn't work for me, the same error occurs.

The error came out of nowhere, I have no how to reproduce it.

Re: Can't login

Posted: Sat Mar 29, 2014 6:04 pm
by unek
So I guess it's unsolvable?