1

Topic: Dovecot Failed: setgid(2000(vmail) from mail_gid setting)

==== Required information ====
- iRedMail version: 0.9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6.6
- Related log if you're reporting an issue: /var/log/dovecot-sieve.log
====

Hi,

I'm running into a problem with a stock installation of iRedMail.  I installed a CentOS 6.6 minimal installation into a VM.  I then ran the iRedMail V0.9.0 installation script.  I logged into the management interface and created a user for just myself (phealy).

This is where things star

----

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

2

Re: Dovecot Failed: setgid(2000(vmail) from mail_gid setting)

it's not clear what issue it is. Could you please describe your issue clearly and show us detailed log (not just the log line you think it's enough)?

3 (edited by pjhealy 2015-02-14 23:45:23)

Re: Dovecot Failed: setgid(2000(vmail) from mail_gid setting)

Sorry - I'll try to explain.

I installed v0.9.0 on a fresh CentOS 6.6 machine.  I created a user for myself (phealy) using the iRedMail admin tool.  When I try to send e-mail to that user I get the following error in /var/log/dovecot-sieve.log:

Feb 14 10:46:21 lda(phealy): Fatal: setgid(2000(vmail) from mail_gid setting) failed with euid=2004(phealy), gid=2004(phealy), egid=2004(phealy): Operation not permitted (This binary should probably be called with process group set to 2000(vmail) instead of 2004(phealy))

I've  verified that /var/vmail is owned by vmail:vmail and that both /etc/passwd and /etc/group has vmail listed with a uid/gid of 2000:2000.  I'm not sure where to check next...

Thanks!

Patrick

4

Re: Dovecot Failed: setgid(2000(vmail) from mail_gid setting)

According to pasted log, you sent an email to 'system_user'@[server_hostname], not virtual mail account. What's the full email address you created? try to send an email to the full email address.

5

Re: Dovecot Failed: setgid(2000(vmail) from mail_gid setting)

I didn't explicitly create the phealy system account.  I got the impression that it was created when I created the virtual user (possibly when I made 'phealy' an admin?).

Here's what's showing under the villagehamburg.com domain.  I wasn't sure if I could post a screen shot, but this is the copy/paste of the text in that screen:

Users under domain: villagehamburg.com (1-2/2)
    Display Name     Mail Address     User ID     Quota
    Patrick Healy     phealy _at_ villagehamburg.com     phealy     Unlimited
    postmaster     postmaster _at_ villagehamburg.com         100 MB

Thanks!

6

Re: Dovecot Failed: setgid(2000(vmail) from mail_gid setting)

Does it work if you send email to "phealy _at_ villagehamburg.com" instead of just "phealy"?

By the way, don't post full email address in original format, otherwise you will receive many spams.

7

Re: Dovecot Failed: setgid(2000(vmail) from mail_gid setting)

That worked when I sent the e-mail from the iredmail machine.  I think I see what the problem is, but now I'm confused.  I currently am running a MailScanner-based e-mail server on the same network.  The system supports around 30 users.  I wanted to get the iRedMail server configured and working first, copy all their old e-mail over and then cut over to the iredmail system.

Perhaps I can skip the testing of inbound mail now that I can send a message to myself.  Can I use the imapsync tool to copy from the old server's imap store to the new server with virtual users?

Thanks for your help!

Pat

8

Re: Dovecot Failed: setgid(2000(vmail) from mail_gid setting)

I ran into the same problem today with version 0.9.0.  Evidently the setup creates the vmail user using the UID and GID assigned by the system.  In my case it was 503 and 504.  But it also sets up the Dovecot.config file to use UID 2000 and GID 2000.   So, what I did to fix the issue is I used:

> usermod -u 2000 vmail
> groupmod -g 2000 vmail.

Then i went to the /var/log directory and did chown vmail:vmail for any logs that say Dovecot in them.

Then I went to the /var directory and issued the command:

chown -R vmail:vmail /var/vmail

Then I restarted dovecot.

After that things worked much better. Except that every minute my postmaster email gets the following email message in it :-(

2015-02-23 03:25:01.336 sogo-ealarms-notify[20319] No local time zone specified.
2015-02-23 03:25:01.337 sogo-ealarms-notify[20319] Using time zone with absolute offset 0.


pjhealy wrote:

==== Required information ====
- iRedMail version: 0.9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6.6
- Related log if you're reporting an issue: /var/log/dovecot-sieve.log
====

Hi,

I'm running into a problem with a stock installation of iRedMail.  I installed a CentOS 6.6 minimal installation into a VM.  I then ran the iRedMail V0.9.0 installation script.  I logged into the management interface and created a user for just myself (phealy).

This is where things star

9

Re: Dovecot Failed: setgid(2000(vmail) from mail_gid setting)

steveo wrote:

I ran into the same problem today with version 0.9.0.  Evidently the setup creates the vmail user using the UID and GID assigned by the system.  In my case it was 503 and 504.

which Linux/BSD distribution are you running? Looks like some binary package created these system accounts.

steveo wrote:

2015-02-23 03:25:01.336 sogo-ealarms-notify[20319] No local time zone specified.

do you have setting 'SOGoTimeZone' in / etc/sogo/sogo.conf like below?

    SOGoTimeZone = "America/New_York";

10

Re: Dovecot Failed: setgid(2000(vmail) from mail_gid setting)

1)  View your vmail user id with the command:
# id vmail
uid=1007(vmail) gid=1007(vmail) groups=1007(vmail)

2)  Modify the file /etc/dovecot/dovecot.conf (ubuntu 20.04 LTS):
# vim /etc/dovecot/dovecot.conf
...
mail_uid = 1007  # old value is 2000
mail_gid = 1007   # old value is 2000
...
first_valid_uid = 1007   # old value is 2000
last_valid_uid = 1007     # old value is 2000
...
3) reboot dovecot service

11

Re: Dovecot Failed: setgid(2000(vmail) from mail_gid setting)

are you okay? this thread was 7 years old...