1

Topic: iRedMail 0.7.2 - all configured and can't receive mail from outside.

I have installed iRedMail, configured it, and still can't receive mail from anywhere else than from the server itself, even though I can send mails anywhere else (Gmail, Hotmail, my own mail). It looks like something is not working properly but I don't know what exactly - that's why I write about it there.

In /var/log/mail.log is something like that:

Jul 21 16:04:16 vps17887 postfix/master[21947]: terminating on signal 15
Jul 21 16:04:17 vps17887 postfix/master[22673]: daemon started -- version 2.7.1, configuration /etc/postfix
Jul 21 16:05:05 vps17887 postfix/smtpd[22807]: connect from localhost.localdomain[127.0.0.1]
Jul 21 16:05:05 vps17887 postfix/smtpd[22807]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jul 21 16:05:05 vps17887 postfix/smtpd[22807]: disconnect from localhost.localdomain[127.0.0.1]
Jul 21 16:10:01 vps17887 postfix/smtpd[23135]: connect from localhost.localdomain[127.0.0.1]
Jul 21 16:10:01 vps17887 postfix/smtpd[23135]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jul 21 16:10:01 vps17887 postfix/smtpd[23135]: disconnect from localhost.localdomain[127.0.0.1]
Jul 21 16:14:04 vps17887 postfix/master[22673]: terminating on signal 15
Jul 21 16:14:06 vps17887 postfix/master[23471]: daemon started -- version 2.7.1, configuration /etc/postfix
Jul 21 16:15:04 vps17887 postfix/smtpd[23552]: connect from localhost.localdomain[127.0.0.1]
Jul 21 16:15:04 vps17887 postfix/smtpd[23552]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jul 21 16:15:04 vps17887 postfix/smtpd[23552]: disconnect from localhost.localdomain[127.0.0.1]
Jul 21 16:19:07 vps17887 postfix/master[23471]: terminating on signal 15
Jul 21 16:19:08 vps17887 postfix/master[23895]: daemon started -- version 2.7.1, configuration /etc/postfix
Jul 21 16:20:04 vps17887 postfix/smtpd[23979]: connect from localhost.localdomain[127.0.0.1]
Jul 21 16:20:04 vps17887 postfix/smtpd[23979]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jul 21 16:20:04 vps17887 postfix/smtpd[23979]: disconnect from localhost.localdomain[127.0.0.1]
Jul 21 16:25:01 vps17887 postfix/smtpd[24300]: connect from localhost.localdomain[127.0.0.1]
Jul 21 16:25:01 vps17887 postfix/smtpd[24300]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jul 21 16:25:01 vps17887 postfix/smtpd[24300]: disconnect from localhost.localdomain[127.0.0.1]
Jul 21 16:30:04 vps17887 roundcube: BYE "Internal error occured. Refer to server log for more information. [2011-07-21 16:30:04]" (6):
Jul 21 16:30:04 vps17887 roundcube: PHP Error: Unable to connect to managesieve on 127.0.0.1:4190 in /usr/share/apache2/roundcubemail-0.5.3/plugins/managesieve/managesieve.php on line 136 (GET /roundcubemail/?_task=settings&_action=plugi$
Jul 21 16:30:04 vps17887 roundcube: Not currently in AUTHORISATION state (1):
Jul 21 16:30:04 vps17887 roundcube: Not currently in AUTHORISATION state (1):
Jul 21 16:30:04 vps17887 roundcube: Not currently connected (1):
Jul 21 16:30:05 vps17887 postfix/smtpd[24631]: connect from localhost.localdomain[127.0.0.1]
Jul 21 16:30:05 vps17887 postfix/smtpd[24631]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jul 21 16:30:05 vps17887 postfix/smtpd[24631]: disconnect from localhost.localdomain[127.0.0.1]
Jul 21 16:35:04 vps17887 postfix/smtpd[24974]: connect from localhost.localdomain[127.0.0.1]
Jul 21 16:35:04 vps17887 postfix/smtpd[24974]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jul 21 16:35:04 vps17887 postfix/smtpd[24974]: disconnect from localhost.localdomain[127.0.0.1]

It looks like those messages can't even reach my server because it doesn't show any info about them.

I would be very glad for any kind of help because my mail server is down for about 2 weeks and my boss is going to kill me if this state will last any longer.

----

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

2

Re: iRedMail 0.7.2 - all configured and can't receive mail from outside.

FrozN wrote:

Jul 21 16:05:05 vps17887 postfix/smtpd[22807]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]

This message is strange.

- Did you changed any files before server went wrong? Firewall rules?
- Any error log in /var/log/dovecot.log? Roundcube complains it cannot connect to managesieve service, which provided by dovecot.

3 (edited by FrozN 2011-07-22 00:48:07)

Re: iRedMail 0.7.2 - all configured and can't receive mail from outside.

Thanks for your reply!

Dovecot log:

Jul 21 16:29:11 imap-login: Info: Login: user=<michal@entropiaslowa.pl>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jul 21 16:29:11 IMAP(michal@entropiaslowa.pl): Info: Disconnected: Logged out bytes=12/342
Jul 21 16:29:19 imap-login: Info: Login: user=<michal@entropiaslowa.pl>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jul 21 16:29:19 IMAP(michal@entropiaslowa.pl): Info: Disconnected: Logged out bytes=12/342
Jul 21 16:29:23 imap-login: Info: Login: user=<michal@entropiaslowa.pl>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jul 21 16:29:23 IMAP(michal@entropiaslowa.pl): Info: Disconnected: Logged out bytes=12/342
Jul 21 16:29:31 imap-login: Info: Login: user=<michal@entropiaslowa.pl>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jul 21 16:29:32 IMAP(michal@entropiaslowa.pl): Info: Disconnected: Logged out bytes=89/845
Jul 21 16:30:04 managesieve-login: Info: Login: user=<michal@entropiaslowa.pl>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jul 21 16:30:04 MANAGESIEVE(michal@entropiaslowa.pl): Error: sieve-storage: sieve_storage_verify_dir(/var/vmail/sieve/entropiaslowa.pl/michal//tmp) failed: File exists
Jul 21 16:30:04 MANAGESIEVE(michal@entropiaslowa.pl): Fatal: Failed to create sieve storage with data: /var/vmail/sieve/entropiaslowa.pl/michal/
Jul 21 16:30:04 imap-login: Info: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jul 21 16:30:04 pop3-login: Info: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jul 21 16:30:06 imap-login: Info: Login: user=<michal@entropiaslowa.pl>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jul 21 16:30:07 IMAP(michal@entropiaslowa.pl): Info: Disconnected: Logged out bytes=12/342
Jul 21 16:30:09 managesieve-login: Info: Login: user=<michal@entropiaslowa.pl>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jul 21 16:30:09 MANAGESIEVE(michal@entropiaslowa.pl): Info: Disconnected: Logged out bytes=140/255
Jul 21 16:31:20 imap-login: Info: Login: user=<michal@entropiaslowa.pl>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jul 21 16:31:20 IMAP(michal@entropiaslowa.pl): Info: Disconnected: Logged out bytes=12/342
Jul 21 16:31:21 imap-login: Info: Login: user=<michal@entropiaslowa.pl>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jul 21 16:31:21 IMAP(michal@entropiaslowa.pl): Info: Disconnected: Logged out bytes=70/635

I can't see anything that is not as it should be.

When I saw that error firewall was the first thing I thought about, but even after turning it off it still shows it.
As far as I can remember I didn't change anything in firewall rules.

EDIT://
Maybe log from mail.warn file will help a bit:

Jul 21 16:01:01 vps17887 cleanup: clean up process starting: policyd v1.82
Jul 21 16:01:01 vps17887 cleanup: connecting to mysql database: 127.0.0.1
Jul 21 16:01:01 vps17887 cleanup: clean up process starting: policyd v1.82
Jul 21 16:01:01 vps17887 cleanup: connecting to mysql database: 127.0.0.1
Jul 21 16:01:01 vps17887 cleanup: mysql_real_connect(): Access denied for user 'postfix-policyd'@'localhost' (using password: YES)
Jul 21 16:01:01 vps17887 cleanup: mysql_real_connect(): Access denied for user 'postfix-policyd'@'localhost' (using password: YES)
Jul 21 16:01:01 vps17887 cleanup: expiring validated records older than 7 days (1310652061)
Jul 21 16:01:01 vps17887 cleanup: expiring autowhitelisted records older than 7 days (1311256861)
Jul 21 16:30:04 vps17887 roundcube: PHP Error: Unable to connect to managesieve on 127.0.0.1:4190 in /usr/share/apache2/roundcubemail-0.5.3/plugins/managesieve/managesieve.php on line 136 (GET /roundcubemail/?_task=settings&_action=plugin.managesieve)
Jul 21 18:01:02 vps17887 cleanup: clean up process starting: policyd v1.82
Jul 21 18:01:02 vps17887 cleanup: connecting to mysql database: 127.0.0.1
Jul 21 18:01:02 vps17887 cleanup: clean up process starting: policyd v1.82
Jul 21 18:01:02 vps17887 cleanup: connecting to mysql database: 127.0.0.1
Jul 21 18:01:02 vps17887 cleanup: mysql_real_connect(): Access denied for user 'postfix-policyd'@'localhost' (using password: YES)
Jul 21 18:01:02 vps17887 cleanup: mysql_real_connect(): Access denied for user 'postfix-policyd'@'localhost' (using password: YES)
Jul 21 18:01:02 vps17887 cleanup: expiring autowhitelisted records older than 7 days (1311264062)
Jul 21 18:01:02 vps17887 cleanup: expiring validated records older than 7 days (1310659262)

I don't know... now I feel stupid.

4

Re: iRedMail 0.7.2 - all configured and can't receive mail from outside.

FrozN wrote:

Jul 21 16:01:01 vps17887 cleanup: mysql_real_connect(): Access denied for user 'postfix-policyd'@'localhost' (using password: YES)

Fix incorrect password of MySQL user 'postfix-policyd' first. It's defined in /etc/postfix-policyd.conf (search 'MYSQLPASS=').

5 (edited by FrozN 2011-07-22 18:19:01)

Re: iRedMail 0.7.2 - all configured and can't receive mail from outside.

I did it, but I had to create that MySQL user ('postfix-policyd') on my own, because iRedMail installation didn't create one. Same with database 'postfixpolicyd'.
mail.log file:

Jul 22 12:01:01 vps17887 cleanup: clean up process starting: policyd v1.82
Jul 22 12:01:01 vps17887 cleanup: clean up process starting: policyd v1.82
Jul 22 12:01:01 vps17887 cleanup: connecting to mysql database: 127.0.0.1
Jul 22 12:01:01 vps17887 cleanup: connecting to mysql database: 127.0.0.1
Jul 22 12:01:01 vps17887 cleanup: mysql_real_connect(): Access denied for user 'postfix-policyd'@'localhost' (using password: YES)
Jul 22 12:01:01 vps17887 cleanup: expiring autowhitelisted records older than 7 days (1311328861)
Jul 22 12:01:01 vps17887 cleanup: connected..
Jul 22 12:01:01 vps17887 cleanup: expiring validated records older than 7 days (1310724061)
Jul 22 12:05:01 vps17887 postfix/smtpd[7927]: connect from localhost.localdomain[127.0.0.1]
Jul 22 12:05:01 vps17887 postfix/smtpd[7927]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jul 22 12:05:01 vps17887 postfix/smtpd[7927]: disconnect from localhost.localdomain[127.0.0.1]
Jul 22 12:10:01 vps17887 postfix/smtpd[8244]: connect from localhost.localdomain[127.0.0.1]
Jul 22 12:10:01 vps17887 postfix/smtpd[8244]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jul 22 12:10:01 vps17887 postfix/smtpd[8244]: disconnect from localhost.localdomain[127.0.0.1]

It looks like it still doesn't want to connect.
I am browsing log files looking for any errors and now I'm stuck.

Maybe there is any script that recreates databases using default settings?

Same thing in mail.err:

Jul 22 12:01:01 vps17887 cleanup: clean up process starting: policyd v1.82
Jul 22 12:01:01 vps17887 cleanup: clean up process starting: policyd v1.82
Jul 22 12:01:01 vps17887 cleanup: connecting to mysql database: 127.0.0.1
Jul 22 12:01:01 vps17887 cleanup: connecting to mysql database: 127.0.0.1
Jul 22 12:01:01 vps17887 cleanup: mysql_real_connect(): Access denied for user 'postfix-policyd'@'localhost' (using password: YES)
Jul 22 12:01:01 vps17887 cleanup: expiring autowhitelisted records older than 7 days (1311328861)
Jul 22 12:01:01 vps17887 cleanup: connected..
Jul 22 12:01:01 vps17887 cleanup: expiring validated records older than 7 days (1310724061)

6

Re: iRedMail 0.7.2 - all configured and can't receive mail from outside.

- Did you get any error message during iRedMail installation?
- Please consider reinstalling iRedMail if possible.

7

Re: iRedMail 0.7.2 - all configured and can't receive mail from outside.

As far as I can remember I didn't get any error message.
I think I will do server reinstallation because iRedMail even after removal leaves some configuration files.

Anyway, thanks for your help!

8

Re: iRedMail 0.7.2 - all configured and can't receive mail from outside.

OK, now I'm confused. I reinstalled whole server and fresh installed iRedMail with MySQL backend.
Now, I can send mails anywhere, but can only receive from my own server. Same as it was previous time.
Log files didn't show any errors.

Everything works like a charm excluding the fact that I can't receive mails from outside again.
Have you got any other ideas?

9

Re: iRedMail 0.7.2 - all configured and can't receive mail from outside.

Could you please perform a test like below:

- Logging into your iRedMail server, monitor Postfix mail log with command "tail -f /var/log/maillog".
- Send an email from external mail server, e.g. Gmail, Hotmail, Yahoo!, etc.
- Continue monitoring Postfix maillog, paste all logs related to this testing email.

10

Re: iRedMail 0.7.2 - all configured and can't receive mail from outside.

OK, no more problems.
I don't really know what wasn't working, but after restarting server it started to work.

Thanks for help ZhangHuangbin!