1 (edited by abudhabi 2018-06-09 04:30:54)

Topic: Cannot log in to web mail or from mail client (other things work)

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: 4.4.0-127-generic #153-Ubuntu
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

/var/log/maillog
Jun  9 04:03:28 mail roundcube: <gvj5mpgo> IMAP Error: Login failed for postmaster@<redacted> from <redacted>. LOGIN: Internal error occurred. Refer to server log for more information. in /opt/www/roundcubemail-1.3.6/program/lib/Roundcube/rcube_imap.php on line 196 (POST /mail/?_task=login&_action=login)
/var/log/mail.log
Jun  9 04:06:05 mail roundcube: <gvj5mpgo> IMAP Error: Login failed for postmaster@<redacted> from <redacted>. LOGIN: Internal error occurred. Refer to server log for more information. in /opt/www/roundcubemail-1.3.6/program/lib/Roundcube/rcube_imap.php on line 196 (POST /mail/?_task=login&_action=login)

So this is basically a new install of iRedMail. I've replaced the self-signed certs with symlinks to certbot-managed files, but otherwise have not touched the postfix/dovecot configs. Haven't touched roundcube at all.

I go to the roundcube webmail provided by iRedMail, write in the postmaster email, and the password (this combination works for netdata and iredadmin - those work fine as far as I can tell) but I get an error message: "Connection to storage server failed." No luck setting up the email account from thunderbird, either.

Not sure what's wrong.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Cannot log in to web mail or from mail client (other things work)

Any related error in Dovecot log files (/var/log/dovecot/)?

3 (edited by abudhabi 2018-06-10 00:30:36)

Re: Cannot log in to web mail or from mail client (other things work)

Yes.

/var/log/dovecot/dovecot.log
Jun  9 14:22:16 mail dovecot: imap: Error: Invalid user settings. Refer to server log for more information.
/var/log/dovecot/imap.log
Jun  9 14:22:16 mail dovecot: imap-login: Login: user=<postmaster@<redacted>>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19835, secured, session=<VvuziS9ulIN/AAAB>
Jun  9 14:22:16 mail dovecot: imap(postmaster@<redacted>): Error: chdir(/var/vmail/vmail1/<redacted>/p/o/s/postmaster//) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +x perm: /var/vmail/vmail1, dir owned by 5000:5000 mode=0700)
Jun  9 14:22:16 mail dovecot: imap(postmaster@<redacted>): Error: chdir(/var/vmail/vmail1/<redacted>/p/o/s/postmaster/) failed: Permission denied
Jun  9 14:22:16 mail dovecot: imap(postmaster@<redacted>): Error: stats: open(/var/run/dovecot/stats-mail) failed: Permission denied
Jun  9 14:22:16 mail dovecot: imap(postmaster@<redacted>): Error: User initialization failed: Namespace '': stat(/var/vmail/vmail1/<redacted>/p/o/s/postmaster//Maildir) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +x perm: /var/vmail/vmail1, dir owned by 5000:5000 mode=0700)
/var/log/dovecot/lda.log
Jun  9 14:25:43 mail dovecot: lda(postmaster@<redacted>): Fatal: setgid(2000 from mail_gid setting) failed with euid=5000(vmail), gid=5000(vmail), egid=5000(vmail): Operation not permitted (This binary should probably be called with process group set to 2000 instead of 5000(vmail))
Jun  9 14:25:43 mail dovecot: message repeated 3 times: [ lda(postmaster@<redacted>: Fatal: setgid(2000 from mail_gid setting) failed with euid=5000(vmail), gid=5000(vmail), egid=5000(vmail): Operation not permitted (This binary should probably be called with process group set to 2000 instead of 5000(vmail))]
Jun  9 14:25:43 mail dovecot: lda(postmaster@<redacted>): Fatal: setgid(2000 from mail_gid setting) failed with euid=5000(vmail), gid=5000(vmail), egid=5000(vmail): Operation not permitted (This binary should probably be called with process group set to 2000 instead of 5000(vmail))
Jun  9 14:25:43 mail dovecot: lda(postmaster@<redacted>): Fatal: setgid(2000 from mail_gid setting) failed with euid=5000(vmail), gid=5000(vmail), egid=5000(vmail): Operation not permitted (This binary should probably be called with process group set to 2000 instead of 5000(vmail))
Jun  9 14:25:43 mail dovecot: lda(postmaster@<redacted>): Fatal: setgid(2000 from mail_gid setting) failed with euid=5000(vmail), gid=5000(vmail), egid=5000(vmail): Operation not permitted (This binary should probably be called with process group set to 2000 instead of 5000(vmail))
Jun  9 14:25:43 mail dovecot: lda(postmaster@<redacted>): Fatal: setgid(2000 from mail_gid setting) failed with euid=5000(vmail), gid=5000(vmail), egid=5000(vmail): Operation not permitted (This binary should probably be called with process group set to 2000 instead of 5000(vmail))
Jun  9 14:25:43 mail dovecot: lda(postmaster@<redacted>): Fatal: setgid(2000 from mail_gid setting) failed with euid=5000(vmail), gid=5000(vmail), egid=5000(vmail): Operation not permitted (This binary should probably be called with process group set to 2000 instead of 5000(vmail))
Jun  9 14:25:43 mail dovecot: lda(postmaster@<redacted>: Fatal: setgid(2000 from mail_gid setting) failed with euid=5000(vmail), gid=5000(vmail), egid=5000(vmail): Operation not permitted (This binary should probably be called with process group set to 2000 instead of 5000(vmail))

4

Re: Cannot log in to web mail or from mail client (other things work)

Any ideas?

5 (edited by abudhabi 2018-06-12 23:45:09)

Re: Cannot log in to web mail or from mail client (other things work)

I have worked around this issue by giving /var/vmail/vmail1 more permissions.

I doubt this is a good solution, though, since there may be more difficulties of the same kind here.

6

Re: Cannot log in to web mail or from mail client (other things work)

abudhabi wrote:

I have worked around this issue by giving /var/vmail/vmail1 more permissions.

/var/vmail/vmail1 must be owned by "vmail:vmail" with permission 0700.

7 (edited by abudhabi 2018-06-13 02:44:42)

Re: Cannot log in to web mail or from mail client (other things work)

ZhangHuangbin wrote:
abudhabi wrote:

I have worked around this issue by giving /var/vmail/vmail1 more permissions.

/var/vmail/vmail1 must be owned by "vmail:vmail" with permission 0700.

It is owned by vmail:vmail. But permission 0700 leads to errors. Giving it 777 makes email work (I have also altered /etc/dovecot/dovecot.conf to make it use uid/gid 5000 instead of 2000). Do you have some idea how I could fix it properly? Because this isn't properly fixed the way I did it.

8

Re: Cannot log in to web mail or from mail client (other things work)

The owner/group must match the uid/gid set in dovecot.conf.

9 (edited by abudhabi 2018-06-13 03:04:42)

Re: Cannot log in to web mail or from mail client (other things work)

ZhangHuangbin wrote:

The owner/group must match the uid/gid set in dovecot.conf.

I think it does, now that I've changed it in dovecot.conf. From /etc/passwd:

vmail:x:5000:5000::/var/mail/vmail: