1

Topic: Permission problems

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.1
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version:  ubuntu 18.04
- 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.
====

I did a fresh install (also fresh OS) and I get infinite logs like this in /var/log/dovecot/imap.log:


Feb 10 08:47:33 mail dovecot: imap-login: Login: user=<postmaster@example.ar>, method=LOGIN, rip=127.0.0.1, lip=127.0.0.1, mpid=12732, secured, session=<HtAJTjeesOB/AAAB>
Feb 10 08:47:33 mail dovecot: imap(postmaster@example.ar): Error: dict-client: Commit failed: net_connect_unix(/var/run/dovecot/dict) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +r perm: /var/run/dovecot/dict, we're not in group 1006(vmail), dir owned by 0:0 mode=0755) (reply took 0.000 secs)
Feb 10 08:47:33 mail dovecot: imap(postmaster@example.ar): Error: last_login_dict: Failed to write value for user postmaster@example.ar
Feb 10 08:47:33 mail dovecot: imap(postmaster@example.ar): Error: stats: open(/var/run/dovecot/stats-mail) failed: Permission denied
Feb 10 08:47:33 mail dovecot: imap(postmaster@example.ar): Error: dict-client: Iteration failed: net_connect_unix(/var/run/dovecot/dict) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +r perm: /var/run/dovecot/dict, we're not in group 1006(vmail), dir owned by 0:0 mode=0755) (reply took 0.000 secs (0.000 in dict wait, 0.000 in other ioloops, 0.000 in locks))
Feb 10 08:47:33 mail dovecot: imap(postmaster@example.ar): Error: dict-client: Iteration failed: net_connect_unix(/var/run/dovecot/dict) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +r perm: /var/run/dovecot/dict, we're not in group 1006(vmail), dir owned by 0:0 mode=0755) (reply took 0.000 secs (0.000 in dict wait, 0.000 in other ioloops, 0.000 in locks))
Feb 10 08:47:33 mail dovecot: imap(postmaster@example.ar): Logged out in=273 out=1469
Feb 10 08:47:44 mail dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=190.11.142.130, lip=181.230.160.212, TLS handshaking: SSL_accept() syscall failed: Success, session=<XeK7Tjee0J2+C46C>
Feb 10 08:48:33 mail dovecot: imap-login: Login: user=<postmaster@example.ar>, method=LOGIN, rip=127.0.0.1, lip=127.0.0.1, mpid=12888, secured, session=<8TadUTeeSuF/AAAB>
Feb 10 08:48:33 mail dovecot: imap(postmaster@example.ar): Error: dict-client: Commit failed: net_connect_unix(/var/run/dovecot/dict) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +r perm: /var/run/dovecot/dict, we're not in group 1006(vmail), dir owned by 0:0 mode=0755) (reply took 0.000 secs)
Feb 10 08:48:33 mail dovecot: imap(postmaster@example.ar): Error: last_login_dict: Failed to write value for user postmaster@example.ar
Feb 10 08:48:33 mail dovecot: imap(postmaster@example.ar): Error: stats: open(/var/run/dovecot/stats-mail) failed: Permission denied
Feb 10 08:48:33 mail dovecot: imap(postmaster@example.ar): Error: dict-client: Iteration failed: net_connect_unix(/var/run/dovecot/dict) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +r perm: /var/run/dovecot/dict, we're not in group 1006(vmail), dir owned by 0:0 mode=0755) (reply took 0.000 secs (0.000 in dict wait, 0.000 in other ioloops, 0.000 in locks))
Feb 10 08:48:33 mail dovecot: imap(postmaster@example.ar): Error: dict-client: Iteration failed: net_connect_unix(/var/run/dovecot/dict) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +r perm: /var/run/dovecot/dict, we're not in group 1006(vmail), dir owned by 0:0 mode=0755) (reply took 0.000 secs (0.000 in dict wait, 0.000 in other ioloops, 0.000 in locks))
Feb 10 08:48:33 mail dovecot: imap(postmaster@example.ar): Logged out in=273 out=1469

----

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

2

Re: Permission problems

did you restore backups of messages in the vmail store after your installation? Looks like a permissions issue.
Group and owner should be vmail and permissions of 0700

3

Re: Permission problems

Interesting, did your server have user "vmail" created (with uid 1006) before installing iRedMail?

4

Re: Permission problems

ZhangHuangbin wrote:

Interesting, did your server have user "vmail" created (with uid 1006) before installing iRedMail?

Yes, that was the problem... don't know who create that user. I remove it and clean install all over again, and now it work. Thanks

5 (edited by francogp 2020-02-10 23:21:49)

Re: Permission problems

ZhangHuangbin wrote:

Interesting, did your server have user "vmail" created (with uid 1006) before installing iRedMail?

Now, I don't get erros in log, but all mail clients (phone gmail, thunderbird, etc) complains because there's no Sent, trash, spam, etc folders in the new account. That happen with all new accounts.  Logs says "folder created", but it seems to be created after the client fail, not before.

EDIT: also getting

Feb 10 10:07:14 mail dovecot: auth-worker(20321): Warning: mysql: Query failed, retrying: Lost connection to MySQL server during query (idled for 0 secs)
Feb 10 10:07:14 mail dovecot: auth-worker(20321): Error: mysql(127.0.0.1): Connect failed to database (vmail): Can't connect to MySQL server on '127.0.0.1' (111) - waiting for 1 seconds before retry
Feb 10 10:07:14 mail dovecot: dict(20333): Error: mysql(127.0.0.1): Connect failed to database (vmail): Can't connect to MySQL server on '127.0.0.1' (111) - waiting for 1 seconds before retry
Feb 10 10:07:14 mail dovecot: dict(20333): Error: mysql(127.0.0.1): Connect failed to database (vmail): Can't connect to MySQL server on '127.0.0.1' (111) - waiting for 1 seconds before retry
Feb 10 10:07:15 mail dovecot: auth-worker(20321): Error: mysql(127.0.0.1): Connect failed to database (vmail): Can't connect to MySQL server on '127.0.0.1' (111) - waiting for 5 seconds before retry
Feb 10 10:07:15 mail dovecot: dict(20333): Error: mysql(127.0.0.1): Connect failed to database (vmail): Can't connect to MySQL server on '127.0.0.1' (111) - waiting for 5 seconds before retry
Feb 10 10:07:15 mail dovecot: dict(20333): Error: mysql(127.0.0.1): Connect failed to database (vmail): Can't connect to MySQL server on '127.0.0.1' (111) - waiting for 5 seconds before retry
Feb 10 10:07:21 mail dovecot: dict(20333): Error: sql dict: commit failed: Deadlock found when trying to get lock; try restarting transaction
Feb 10 10:10:07 mail dovecot: master: Dovecot v2.2.33.2 (d6601f4ec) starting up for pop3, imap, sieve, lmtp (core dumps disabled)


also

Feb 10 12:18:06 mail postfix/qmgr[6036]: 48GV0G2tD6z3B6mT: from=<amavis@example.ar>, size=682, nrcpt=1 (queue active)
Feb 10 12:18:06 mail amavis[4731]: (04731-04) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
Feb 10 12:18:07 mail amavis[4731]: (04731-04) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
Feb 10 12:18:07 mail amavis[4731]: (04731-04) (!)clamav-socket: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)
Feb 10 12:18:13 mail amavis[4731]: (04731-04) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
Feb 10 12:18:13 mail amavis[4731]: (04731-04) (!)clamav-socket av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 113) line 659.\n
Feb 10 12:18:13 mail amavis[4731]: (04731-04) (!)WARN: all primary virus scanners failed, considering backups

6

Re: Permission problems

francogp wrote:

Feb 10 10:07:15 mail dovecot: dict(20333): Error: mysql(127.0.0.1): Connect failed to database (vmail): Can't connect to MySQL server on '127.0.0.1' (111) - waiting for 5 seconds before retry

Seems mysql service is not running?

7

Re: Permission problems

ZhangHuangbin wrote:
francogp wrote:

Feb 10 10:07:15 mail dovecot: dict(20333): Error: mysql(127.0.0.1): Connect failed to database (vmail): Can't connect to MySQL server on '127.0.0.1' (111) - waiting for 5 seconds before retry

Seems mysql service is not running?

Its running just fine

8

Re: Permission problems

hmm, no idea then. sad