1

Topic: Reoccuring CentOS iRedmail install issue

Developers,

So I tested the install with a VPS server using various operating systems. On Ubuntu / Debian servers I had no issue with the install. Everything flowed fine and all services started up without an issue.

On CentOS6 (specifically) there is an issue which happens each and every time where dovecot does not start automatically. I have to invoke the "service dovecot start" command in order to get it running. Also, there is an ERROR displays towards the end of the install when configuring dovecot which did not appear in any NON redhat versions of the install. Is this a known issue? I have provided my screen buffer output after the packages were downloaded and installed with yum (through the automatic install script). See below:

==== Provide required information to help troubleshoot and get quick answer ====
- Linux/BSD distribution name and version: CentOS 6.2 x86_84 (64 bit)
- iRedMail version and backend (LDAP/MySQL): 0.7.4 / LDAP
- Any related log? Log is helpful for troubleshooting.
====

*************************************************************************
* iRedMail-0.7.4 installation and configuration complete.
*************************************************************************

< INFO > Disable SELinux in /etc/selinux/config.
< Question > Would you like to use firewall rules shipped within iRedMail now?
< Question > File: /etc/sysconfig/iptables, with SSHD port: 22. [Y|n]y
< INFO > Copy firewall sample rules: /etc/sysconfig/iptables.
< Question > Restart firewall now (with SSHD port 22)? [y|N]y
< INFO > Restarting firewall ...
iptables: Flushing firewall rules: [  OK  ]
iptables: Setting chains to policy ACCEPT: filter [  OK  ]
iptables: Unloading modules: [  OK  ]
iptables: Applying firewall rules: [  OK  ]
< Question > Would you like to use MySQL configuration file shipped within iRedMail now?
< Question > File: /etc/my.cnf. [Y|n]y
< INFO > Copy MySQL sample file: /etc/my.cnf.
< INFO > Enable SSL support for MySQL server.
< Question > Would you like to start postfix now? [y|N]y
< INFO > Temporarily set SELinux policy to 'permissive'.
iptables: Flushing firewall rules: [  OK  ]
iptables: Setting chains to policy ACCEPT: filter [  OK  ]
iptables: Unloading modules: [  OK  ]
iptables: Applying firewall rules: [  OK  ]
Shutting down system logger: [  OK  ]
Starting system logger: [  OK  ]
Stopping httpd: [FAILED]
Starting httpd: [  OK  ]
Shutting down postfix: [  OK  ]
Starting postfix: [  OK  ]
Stopping mysqld:  [  OK  ]
Starting mysqld:  [  OK  ]
Stopping slapd: [  OK  ]
Starting slapd: [  OK  ]
Stopping policyd:[FAILED]
Starting policyd:[  OK  ]
Stopping Dovecot Imap: [FAILED]
Starting Dovecot Imap: doveconf: Fatal: Error in configuration file /root/iRedMail-0.7.4/config line 2: Expecting '='
doveconf: Error: managesieve-login: dump-capability process returned 89
doveconf: Fatal: Error in configuration file /root/iRedMail-0.7.4/config line 2: Expecting '='
[FAILED]
Shutting down amavisd: The amavisd daemon is apparently not running, no PID file /var/run/amavisd/amavisd.pid
[FAILED]

Starting amavisd: [  OK  ]

Stopping Clam AntiVirus Daemon: [FAILED]
Starting Clam AntiVirus Daemon: LibClamAV Warning: **************************************************
LibClamAV Warning: ***  The virus database is older than 7 days!  ***
LibClamAV Warning: ***   Please update it as soon as possible.    ***
LibClamAV Warning: **************************************************
[  OK  ]
Stopping fail2ban: [FAILED]
Starting fail2ban: [  OK  ]
Stopping crond: [  OK  ]
Starting crond: [  OK  ]
freshclam is already stopped.[  OK  ]
[  OK  ] freshclam:[  OK  ]
iredapd is already stopped.
Starting iredapd ...
********************************************************************
* URLs of your web applications:
*
* - Webmail: xxxxxxx
*   + Account: xxxxxxx
*
* - Admin Panel (iRedAdmin): xxxxxxxx
*   + Account: xxxxxxxx
*

********************************************************************
* Congratulations, mail server setup complete. Please refer to tip
* file for more information:
*
*   - /root/iRedMail-0.7.4/iRedMail.tips
*
* And it's sent to your mail account www@xxxxx.com.
*
********************************************************************

You have new mail in /var/spool/mail/root
[root@mail iRedMail-0.7.4]# service dovecot start
Starting Dovecot Imap: [  OK  ]
[root@mail iRedMail-0.7.4]#

----

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

2

Re: Reoccuring CentOS iRedmail install issue

juvix wrote:

On CentOS6 (specifically) there is an issue which happens each and every time where dovecot does not start automatically. I have to invoke the "service dovecot start" command in order to get it running.

Is there any related error log in Dovecot log file? It should be /var/log/dovecot.log.

juvix wrote:

Also, there is an ERROR displays towards the end of the install when configuring dovecot which did not appear in any NON redhat versions of the install. Is this a known issue?

It's a known issue, but it doesn't impact anything.
Still no idea why it happens, sorry.

3

Re: Reoccuring CentOS iRedmail install issue

Zhang,

I looked at the dovecot log and did not see any issues. I wasn't sure if this was an issue during the install or not. Prior to putting this on my production system, I tested it on a VPS using 3 or 4 different operating systems. All others went through flawlessly, RHEL / Centos was the only one that experienced this problem. Just wanted to report it to make sure you were aware.

It doesn't appear to affect functionality except that dovecot doesn't start up after the install.

Last question: Are these services automatically set to start using chkconfig dovecot --level 235 on for example, or do i have to manually set this in order to have the mail server automatically load upon bootup?

4

Re: Reoccuring CentOS iRedmail install issue

juvix wrote:

It doesn't appear to affect functionality except that dovecot doesn't start up after the install.

Did you try to figure out why it happened? I'm so sorry i cannot help without related log.

juvix wrote:

Last question: Are these services automatically set to start using chkconfig dovecot --level 235 on for example, or do i have to manually set this in order to have the mail server automatically load upon bootup?

All mail services will be set to start automatically.

5

Re: Reoccuring CentOS iRedmail install issue

Same problem here, im using CentOS 6.0, the error just pops but everything works as it should after manualy starting dovecot.
There are no logs in /var/log/dovecot.log but i found some strange ones in sieve.log.

Apr 27 21:07:59 lda: Error: userdb lookup: connect(/var/run/dovecot/auth-master) failed: No such file or directory
Apr 27 21:07:59 lda: Fatal: Internal error occurred. Refer to server log for more information.
Apr 27 21:07:59 lda: Error: userdb lookup: connect(/var/run/dovecot/auth-master) failed: No such file or directory
Apr 27 21:07:59 lda: Fatal: Internal error occurred. Refer to server log for more information.

6

Re: Reoccuring CentOS iRedmail install issue

ColdAsIce wrote:

some strange ones in sieve.log.

Apr 27 21:07:59 lda: Error: userdb lookup: connect(/var/run/dovecot/auth-master) failed: No such file or directory

Any error log in /var/log/dovecot.log if you restart Dovecot service?
Also, post output of command 'dovecot -n' here to help troubleshoot please.

7

Re: Reoccuring CentOS iRedmail install issue

Restaring dovecot :
/etc/init.d/dovecot restart
Stopping Dovecot Imap:                                   [  OK  ]
Starting Dovecot Imap:                                    [  OK  ]
[root@core02 postfix]# cat /var/log/dovecot.log
Apr 28 15:49:25 master: Warning: Killed with signal 15 (by pid=7466 uid=0 code=kill)
Apr 28 15:49:27 master: Info: Dovecot v2.0.18 starting up (core dumps disabled)

Also "dovecot -n" gives :
# 2.0.18: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-220.13.1.el6.x86_64 x86_64 CentOS release 6.2 (Final)
auth_mechanisms = PLAIN LOGIN
dict {
  expire = db:/var/lib/dovecot/expire/expire.db
  quotadict = mysql:/etc/dovecot/used-quota.conf
}
disable_plaintext_auth = no
last_valid_uid = 500
listen = *
log_path = /var/log/dovecot.log
mail_gid = 500
mail_location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/
mail_uid = 500
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacati                                        on subaddress comparator-i;ascii-numeric relational regex imap4flags copy includ                                        e variables body enotify environment mailbox date ihave
passdb {
  args = /etc/dovecot/dovecot-mysql.conf
  driver = sql
}
plugin {
  auth_socket_path = /var/run/dovecot/auth-master
  autocreate = INBOX
  autocreate2 = Sent
  autocreate3 = Trash
  autocreate4 = Drafts
  autocreate5 = Junk
  autosubscribe = INBOX
  autosubscribe2 = Sent
  autosubscribe3 = Trash
  autosubscribe4 = Drafts
  autosubscribe5 = Junk
  expire = Trash 7 Trash/* 7 Junk 30
  expire_dict = proxy::expire
  quota = dict:user::proxy::quotadict
  quota_rule = *:storage=1G
  quota_warning = storage=85%% quota-warning 85 %u
  quota_warning2 = storage=90%% quota-warning 90 %u
  quota_warning3 = storage=95%% quota-warning 95 %u
  sieve = /%Lh/sieve/dovecot.sieve
  sieve_dir = /%Lh/sieve
  sieve_global_dir = /home/vmail/sieve
  sieve_global_path = /home/vmail/sieve/dovecot.sieve
}
protocols = pop3 imap sieve
service auth {
  unix_listener /var/spool/postfix/dovecot-auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-master {
    group = vmail
    mode = 0666
    user = vmail
  }
}
service dict {
  unix_listener dict {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service quota-warning {
  executable = script /usr/local/bin/dovecot-quota-warning.sh
  unix_listener quota-warning {
    group = vmail
    mode = 0660
    user = vmail
  }
}
ssl_cert = </etc/pki/tls/certs/iRedMail_CA.pem
ssl_key = </etc/pki/tls/private/iRedMail.key
userdb {
  args = /etc/dovecot/dovecot-mysql.conf
  driver = sql
}
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  lda_mailbox_autocreate = yes
  log_path = /var/log/sieve.log
  mail_plugins = quota sieve autocreate
  postmaster_address = root
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep
  mail_plugins = quota imap_quota autocreate
}
protocol pop3 {
  mail_plugins = quota
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}

Seams the error can be ignored, everything seams to work ok.
The only real problem I have is with my ISP which blocked my 25 port for incomming email.

8

Re: Reoccuring CentOS iRedmail install issue

Does the same error message appear again?

if so, please find below setting in dovecot.conf:

#base_dir = /var/run/dovecot

Uncomment it and restart Dovecot service, check whether it happens again or not.
Some OS requires "base_dir" in dovecot.conf, e.g. OpenBSD. But most Linux/BSD distributions will use the default setting.

9

Re: Reoccuring CentOS iRedmail install issue

< INFO > Configure Policyd (postfix policy daemon).
ERROR 1064 (42000) at line 4 in file: '/usr/share/doc/policyd-1.82/DATABASE.mysql': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 6
< INFO > Configure Dovecot (pop3/imap server).


Different kind of error.  Very annoying.  Looks more like bugs in policyd under this line
'/usr/share/doc/policyd-1.82/DATABASE.mysql'

CREATE TABLE policy (
  _rcpt        char(60) NOT NULL default '',
  _optin       tinyint(1) unsigned NOT NULL default '1',
  _priority    tinyint(1) unsigned NOT NULL default '0',
  UNIQUE KEY _rcpt (_rcpt,_optin)
) TYPE=MyISAM;

I think it should be.

CREATE TABLE policy (
  _rcpt        char(60) NOT NULL default '',
  _optin       tinyint(1) unsigned NOT NULL default '1',
  _priority    tinyint(1) unsigned NOT NULL default '0',
  UNIQUE KEY _rcpt (_rcpt,_optin)
) ENGINE=MyISAM;   <-----  Change Type to Engine

10

Re: Reoccuring CentOS iRedmail install issue

Huangbin.

You lock your BB too tight dude..  For whatever reason whatever text I'm trying to type, it is treated as link eventhough it's not and http://

11

Re: Reoccuring CentOS iRedmail install issue

Too more links in message. Allowed 1 links. Reduce number of links and post it again.

I'm not sure which link your BB is referring to.  I don't have http:// in the cut and paste.  Very annoying..  :-(

12

Re: Reoccuring CentOS iRedmail install issue

< INFO > Configure Policyd (postfix policy daemon).
ERROR 1064 (42000) at line 4 in file: '/usr/share/doc/policyd-1.82/DATABASE.mysql': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 6

Seems you're running MySQL-5.5, 'TYPE=MyISAM' is not supported in v5.5 anymore.

May i know which Linux/BSD distribution and release number you're using?
Which iRedMail version do you use? Did you try the latest iRedMail-0.8.0-beta4?

13

Re: Reoccuring CentOS iRedmail install issue

ZhangHuangbin wrote:

< INFO > Configure Policyd (postfix policy daemon).
ERROR 1064 (42000) at line 4 in file: '/usr/share/doc/policyd-1.82/DATABASE.mysql': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 6

Seems you're running MySQL-5.5, 'TYPE=MyISAM' is not supported in v5.5 anymore.

May i know which Linux/BSD distribution and release number you're using?
Which iRedMail version do you use? Did you try the latest iRedMail-0.8.0-beta4?

Thanks for the reply Huangbin.  I'm using the standard CentOS 6.2 64Bit with Epel and Remi repository installed.  For IRedMail, I use the latest stabil version which is this one.

http://iredmail.googlecode.com/files/iR … .4.tar.bz2

And no I haven't tried the beta version.  Should I for the Centos 6.2 64 bit?

14

Re: Reoccuring CentOS iRedmail install issue

Did you have MySQL-5.5 installed with EPEL and Remi repositories? CentOS 6.2 ships MySQL-5.1.x officially, it works with SQL syntax 'TYPE=MyISAM'.

As mentioned in iRedMail installation, please disable all third-party yum repositories, only use official yum repositories.

15

Re: Reoccuring CentOS iRedmail install issue

Stopping mysqld:                                           [  OK  ]
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]
Stopping httpd:                                            [FAILED]
Starting httpd:                                            [  OK  ]

Starting Dovecot Imap: doveconf: Fatal: Error in configuration file /var/softwares/iRedMail-0.8.0-beta4/config line 2: Expecting '='
doveconf: Error: managesieve-login: dump-capability process returned 89
doveconf: Fatal: Error in configuration file /var/softwares/iRedMail-0.8.0-beta4/config line 2: Expecting '='
                                                           [FAILED]
Shutting down amavisd: The amavisd daemon is apparently not running, no PID file /var/run/amavisd/amavisd.pid
                                                           [FAILED]

Starting amavisd:                                          [  OK  ]

Stopping Clam AntiVirus Daemon:                            [FAILED]
Starting Clam AntiVirus Daemon: LibClamAV Warning: **************************************************
LibClamAV Warning: ***  The virus database is older than 7 days!  ***
LibClamAV Warning: ***   Please update it as soon as possible.    ***
LibClamAV Warning: **************************************************
                                                           [  OK  ]
Stopping fail2ban:                                         [FAILED]
Starting fail2ban:                                         [  OK  ]


I just finished installing the Beta4 and the error still the same for CentOS 6.2 64Bit.  I'd suggest for copying my.cnf, you change your my.cnf to fit this setup to make it works.


change my.cnf
skip-locking to skip-external-locking

change From [client]
default-character-set=utf8

To [client]
loose-default-character-set=utf8

Disable set-variable = max_connections=1024
# set-variable = max_connections=1024

All the same issues with the stable release version.  Not sure whether this only pertain to Centos 6.2 64  Bit and if it's perhaps you could add some sort of identifier that will look for which version of linux/os it's trying to install and call the proper config setup.  My 2 cents.

16 (edited by westdude 2012-05-05 10:59:12)

Re: Reoccuring CentOS iRedmail install issue

ZhangHuangbin wrote:

Did you have MySQL-5.5 installed with EPEL and Remi repositories? CentOS 6.2 ships MySQL-5.1.x officially, it works with SQL syntax 'TYPE=MyISAM'.

As mentioned in iRedMail installation, please disable all third-party yum repositories, only use official yum repositories.

Perhaps that's the issue.  I'll disable all the third parties yum repositories and try again..  Hopefully this resolve the issue.  The beauty of Virtual Box ey?  :-)

P.S.: Perhaps you may want to consider testing the future release with those third parties repositories since Epel and Remi is the most used repositories.  Those are the standard repositories we used officially in our production and dev lab..  My 2 cents.  :-)

17

Re: Reoccuring CentOS iRedmail install issue

westdude wrote:

P.S.: Perhaps you may want to consider testing the future release with those third parties repositories since Epel and Remi is the most used repositories.  Those are the standard repositories we used officially in our production and dev lab..  My 2 cents.  :-)

We test only CentOS official repos. Sorry.

18

Re: Reoccuring CentOS iRedmail install issue

ZhangHuangbin wrote:
westdude wrote:

P.S.: Perhaps you may want to consider testing the future release with those third parties repositories since Epel and Remi is the most used repositories.  Those are the standard repositories we used officially in our production and dev lab..  My 2 cents.  :-)

We test only CentOS official repos. Sorry.

No worries.  Just a suggestion.  I tested it with the standard Repo.  Everything else is working fine except those two pesky issues we've been talking about.  Very annoying..

westdude wrote:

Starting Dovecot Imap: doveconf: Fatal: Error in configuration file /var/softwares/iRedMail-0.7.3/config line 2: Expecting '='
doveconf: Error: managesieve-login: dump-capability process returned 89
doveconf: Fatal: Error in configuration file /var/softwares/iRedMail-0.7.3/config line 2: Expecting '='
                                                           [FAILED]
Shutting down amavisd: The amavisd daemon is apparently not running, no PID file /var/run/amavisd/amavisd.pid
                                                           [FAILED]

19

Re: Reoccuring CentOS iRedmail install issue

westdude wrote:

Everything else is working fine except those two pesky issues we've been talking about.  Very annoying..

First one, Dovecot, is a known issue. It doesn't impact anything, so it's safe to ignore it. Still no idea about why it happened. And it happens on CentOS 6, other distributions don't have this issue.

The second one, we use '/etc/init.d/amavisd restart' to start Amavisd service, it will perform 'stop' first, because it wasn't running, so this is not an issue.

20

Re: Reoccuring CentOS iRedmail install issue

ZhangHuangbin wrote:
westdude wrote:

Everything else is working fine except those two pesky issues we've been talking about.  Very annoying..

First one, Dovecot, is a known issue. It doesn't impact anything, so it's safe to ignore it. Still no idea about why it happened. And it happens on CentOS 6, other distributions don't have this issue.

The second one, we use '/etc/init.d/amavisd restart' to start Amavisd service, it will perform 'stop' first, because it wasn't running, so this is not an issue.

Thanks Huangbin...  Everything is all working now that I'm not using the third party repositories.  :-)