1

Topic: unable to receive email after os upgrade

==== Required information ====
- iRedMail version: 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Centos 6.5
- Related log if you're reporting an issue:
====

greetings!

i just updated centos 6.4 to 6.5 and experienced a mismatch with openssl... while i was resolving that issue, i uninstalled openssl and reinstalled it. to uninstall openssl i was prompted to also uninstall other packages, including dovecot, policyd, amavis and postfix. when i reinstalled openssl with the correct version i also reinstalled the other packages.

i have restarted all the relevant services and they are all running without any problem (as far as i know).
however, i am unable to login to my email accounts.
the connection appears to be ok from client to server.. but none of the passwords are being recognised.
this is also occurring when logging in via webmail.

i have looked through some logs and didn't see a cause for this - only the notes that say that the login has failed.

any idea what i can do here?
thanks

----

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

2

Re: unable to receive email after os upgrade

am i right to think that i may have lost many configuration settings when reinstalling these packages?
if so, would the best approach be to wipe the iredmail install somehow and install the fresh 0.8.5 version?

3

Re: unable to receive email after os upgrade

If you uninstall packages, RPM will save your modified config file as 'xxx.rpmsave'. Please try to recover your config files from these '.rpmsave' file.

Most important ones:

- /etc/dovecot/dovecot.conf
- /etc/postfix/main.cf
- /etc/postfix/master.cf
- /etc/httpd/conf/httpd.conf
- /etc/httpd/conf.d/ssl.conf

4

Re: unable to receive email after os upgrade

ZhangHuangbin wrote:

If you uninstall packages, RPM will save your modified config file as 'xxx.rpmsave'. Please try to recover your config files from these '.rpmsave' file.

Most important ones:

- /etc/dovecot/dovecot.conf
- /etc/postfix/main.cf
- /etc/postfix/master.cf
- /etc/httpd/conf/httpd.conf
- /etc/httpd/conf.d/ssl.conf

ok thanks - i am thinking though, that if i uninstall and then save the old conf files and copy them through to the new install, that there is maybe no benefit to uninstalling.. since i may just be copying across the now incomplete conf files into the new installation.
does that make sense?
i don't know why the site is not functioning correctly presently, so i may just end up recreating the situation with the fresh install.

5

Re: unable to receive email after os upgrade

update: i have uninstalled iredmail and installed the latest version 0.8.5.

i see that:

phpmyadmin is not the latest version.. and i am unclear on why it has not been updated.

i am unable to login to webmail - postmaster account. roundcubemail loads ok but when i use the correct password and postmaster id i see 'login failed'. so far i haven't seen any relevant error codes/messages. any idea what to do here?

i also need to know how to create users without using iredadmin since i am using nginx and so far have not been able to get iredadmin to run with nginx, so i have no way to create users via an interface.

i continue!

6

Re: unable to receive email after os upgrade

update: i see in the vmail mysql database that my old users are still in there, so i do not need to create any new users.
in the dovecot.log i notice:

Error: chdir(/var/vmail/vmail1/mysite.com/u/r/a/ura-2012.10.22.05.33.20//) failed: Permission denied (euid=2000(<unknown>) egid=2000(<unknown>) missing +x perm: /var/vmail, dir owned by 502:502 mode=0700)

when i examine the vmail folder i see that it is 'owned' by 'vmail' user..
any idea what i need to change here?

7

Re: unable to receive email after os upgrade

i examined the permissions of the folders and the conf file for dovecot..
i see that the dovecot conf file contains lines which where not present in the version created during the previous installation of iredmail (0.8.3)...


service auth {
    unix_listener /var/spool/postfix/dovecot-auth {
        user = postfix
        group = postfix
        mode = 0666
    }
    unix_listener auth-master {
        user = vmail
        group = vmail
        mode = 0666
    }
    unix_listener auth-userdb {
        user = vmail
        group = vmail
        mode = 0660
    }
}

which looks ok to me..
however, the logs appear to show that a user other than vmail is being used to access the files/folders:

(euid=2000(<unknown>) egid=2000(<unknown>)

that is an id that does not show up in my user list.. any idea why this is and what to do?

8

Re: unable to receive email after os upgrade

iRedMail-0.8.5 hard-codes UID/GID of vmail account to 2000/2000. So you have to set file owner of /var/vmail to this UID/GID.

9

Re: unable to receive email after os upgrade

ok, so do i need to change that folder and all subfolders/file recursively to be owned by 2000:2000 ?

10

Re: unable to receive email after os upgrade

update: i changed the vmail folder recursively and also the /var/run/dovecot/dict folder.
now i can connect to the mail server via remote client.. however, still no mail transportation..

i see now in the iredapd.log, the message: ERROR Error while creating database connection: (1045, "Access denied for user 'vmail'@'localhost' (using password: YES)")

i just logged into phpmyadmin and changed the password for the vmail user to the one that is listed in the iredmail.tips file (to be sure).. and i still see that same error for access denied.

11 (edited by urasoul1 2013-12-07 02:23:37)

Re: unable to receive email after os upgrade

i found this sql command list:

GRANT SELECT ON vmail.* TO vmail@localhost IDENTIFIED BY "password";
GRANT SELECT,INSERT,DELETE,UPDATE ON vmail.* TO vmailadmin@localhost IDENTIFIED BY "password";
FLUSH PRIVILEGES;

from: http://www.iredmail.org/forum/topic693- … blems.html

am i intended to replace "password" with the password value? or just use the string "password'?

12

Re: unable to receive email after os upgrade

i notice that: dovecot-master-users-password file in /etc/dovecot/ is empty.
passwords in the /etc/dovecot/ and /etc/postfix/ files match the ones that are in the iredmail.tips file.

13

Re: unable to receive email after os upgrade

seive.log contains:

Dec 06 21:18:58 lda(ura@infiniteeureka.com): Fatal: setgid(2000 from mail_gid setting) failed with euid=502(vmail), gid=502(vmail), egid=502(vmail): Operation not permitted (This binary should probably be called with process group set to 2000 instead of 502(vmail))
Dec 06 21:23:55 lda(logcheck): Fatal: setgid(2000 from mail_gid setting) failed with euid=488(logcheck), gid=482(logcheck), egid=482(logcheck): Operation not permitted (This binary should probably be called with process group set to 2000 instead of 482(logcheck))
Dec 06 21:28:55 lda(ura@infiniteeureka.com): Fatal: setgid(2000 from mail_gid setting) failed with euid=502(vmail), gid=502(vmail), egid=502(vmail): Operation not permitted (This binary should probably be called with process group set to 2000 instead of 502(vmail))
Dec 06 21:33:55 lda(ura): Fatal: setgid(2000 from mail_gid setting) failed with euid=500(ura), gid=500(ura), egid=500(ura): Operation not permitted (This binary should probably be called with process group set to 2000 instead of 500(ura))

14

Re: unable to receive email after os upgrade

i changed the various user and group ids in /etc/postfix/main.cf to 2000 from vmail.
when i reset dovecot the service complained that the user 2000 does not exist...
so i  have changed them back to vmail now.

15

Re: unable to receive email after os upgrade

Please, change UID/GID of vmail user to 2000/2000 first, then reset file permission to this UID/GID.

16 (edited by urasoul1 2013-12-07 20:55:10)

Re: unable to receive email after os upgrade

ZhangHuangbin wrote:

Please, change UID/GID of vmail user to 2000/2000 first, then reset file permission to this UID/GID.

ok, i did that..
i am still seeing in iredapd.log:

ERROR Error while creating database connection: (1045, "Access denied for user 'vmail'@'localhost' (using password: YES)")

i tested phpmyadmin and i am able to login there with the vmail password that is in iredmail.tips..
so maybe there is a file somewhere that wasn't deleted from the previous installation that is still using the old password.. hmm.

17

Re: unable to receive email after os upgrade

i just noticed that there is no settings.py in /opt/iRedAPD-1.4.1/
there is only the file: settings.py.sample

i copied the version of sample.py from here: http://www.iredmail.org/wiki/index.php? … dAPD/MySQL
and ensured the password is the correct one from the iredmail.tips file.

i thought for sure that would fix the mysql error..
nope!
i restarted all the services and still see the same database connection error.

18

Re: unable to receive email after os upgrade

i just saw that the symlink in /opt/ called 'iredapd' was pointing to the old iredapd install location..
i deleted the old folder (1.3.8 - which i noticed contained a link to the new folder - 1.4.1).
and pointed the symlink to the new folder..
then i restarted iredapd and found that the following error was shown:

python: can't open file '/opt/iredapd/src/iredapd.py': [Errno 2] No such file or directory

and yes, that folder does not exist in v.1.4.1 of iredapd..

so there is most likely a situation of an incomplete uninstallation of the old version of iredmail and the old and new are clashing in some way.

19

Re: unable to receive email after os upgrade

okaaayyy..
so now i see no more database connection errors.. (i had omitted to change the connection type to mysql in the settings.py file - it was set to ldap..

so now when i send emails to or from my iredmail created accounts i am seeing in the iredapd log:
2013-12-07 19:53:25 INFO [x.x.x.x] me@domain.com -> target@targetdomain.com, DUNNO

20

Re: unable to receive email after os upgrade

ah finally.. i have all functions running correctly.
i needed to change the group id of the vmail group to 2000 (which i didn't do previously) and i also needed to update the sql password for one other service and a couple of other file changes that were highlighted via the logs.
thanks for the tip.