1

Topic: Connection Error(Failed to reach the server)!

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
====- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: Centos 7 minimal install
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro?no
- Related log if you're reporting an issue: /var/log/dovecot.log (below)
====
I have just got my server up and running. I have only 4 users, including postmaster. I just noticed that I am getting the error flashing on the roundcube screen when I start checking for mail/or beginning to compose. I checked dovecot logs.

What could this be? Where else should I TS?

checked dovecot.log:

[root@srv /]# tail -f /var/log/dovecot.log
Dec 14 23:32:37 imap-login: Info: Login: user=<webmaster@ryanmilton.xyz>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=6028, secured, session=<k2mFR+gmKwB/AAAB>
Dec 14 23:32:38 imap(webmaster@ryanmilton.xyz): Info: Disconnected: Logged out in=56 out=810
Dec 14 23:32:52 imap-login: Info: Login: user=<webmaster@ryanmilton.xyz>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=9754, secured, session=<wJVtSOgmLgB/AAAB>
Dec 14 23:32:53 imap(webmaster@ryanmilton.xyz): Info: Disconnected: Logged out in=58 out=811
Dec 14 23:32:56 imap-login: Info: Login: user=<ryan@ryanmilton.xyz>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=9756, secured, session=<7aalSOgmMQB/AAAB>
Dec 14 23:32:56 imap(ryan@ryanmilton.xyz): Info: Disconnected: Logged out in=82 out=682
Dec 14 23:32:56 imap-login: Info: Login: user=<ryan@ryanmilton.xyz>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=9758, secured, session=<p7ynSOgmMwB/AAAB>
Dec 14 23:32:56 imap(ryan@ryanmilton.xyz): Info: Disconnected: Logged out in=70 out=671
Dec 14 23:32:57 imap-login: Info: Login: user=<ryan@ryanmilton.xyz>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=9761, secured, session=<dK2rSOgmNQB/AAAB>
Dec 14 23:32:57 imap(ryan@ryanmilton.xyz): Info: Disconnected: Logged out in=332 out=1980

Post's attachments

2015-12-14 23-32-49 Window.png
2015-12-14 23-32-49 Window.png 18.44 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

----

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

2

Re: Connection Error(Failed to reach the server)!

I suggest checking whether or not Dovecot service is running

3

Re: Connection Error(Failed to reach the server)!

ZhangHuangbin wrote:

I suggest checking whether or not Dovecot service is running


It is running.

4

Re: Connection Error(Failed to reach the server)!

Any related log in Roundcube log file (it logs to Postfix log file)?

5

Re: Connection Error(Failed to reach the server)!

ZhangHuangbin wrote:

Any related log in Roundcube log file (it logs to Postfix log file)?

I am not sure the Connection refused is the issue.


Here is what I see:

Dec 15 16:04:06 srv clamd[1422]: SelfCheck: Database status OK.
Dec 15 16:06:08 srv postfix/smtpd[5307]: connect from localhost[127.0.0.1]
Dec 15 16:06:08 srv postfix/smtpd[5307]: AF37438DE3: client=localhost[127.0.0.1], sasl_method=LOGIN, sasl_username=ryan@ryanmilton.xyz
Dec 15 16:06:08 srv postfix/cleanup[5315]: AF37438DE3: message-id=<80aaba3c65f8c45265f14c63045f8596@ryanmilton.xyz>
Dec 15 16:06:08 srv postfix/qmgr[2905]: AF37438DE3: from=<ryan@ryanmilton.xyz>, size=28718, nrcpt=3 (queue active)
Dec 15 16:06:08 srv roundcube: <2g7jlg1k> User ryan@ryanmilton.xyz [192.168.30.4]; Message for ryanmilton@mail.com, ryandmilton@outlook.com, rdm1776@live.com; 250: 2.0.0 Ok: queued as AF37438DE3
Dec 15 16:06:08 srv postfix/smtp[5320]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Dec 15 16:06:08 srv postfix/smtp[5323]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Dec 15 16:06:08 srv postfix/smtp[5325]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Dec 15 16:06:08 srv postfix/smtp[5320]: AF37438DE3: to=<rdm1776@live.com>, relay=none, delay=0.29, delays=0.28/0.01/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Dec 15 16:06:09 srv postfix/smtpd[5307]: disconnect from localhost[127.0.0.1]
Dec 15 16:06:09 srv postfix/smtp[5323]: AF37438DE3: to=<ryandmilton@outlook.com>, relay=none, delay=0.3, delays=0.28/0.02/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Dec 15 16:06:10 srv postfix/smtp[5325]: AF37438DE3: to=<ryanmilton@mail.com>, relay=none, delay=0.31, delays=0.28/0.03/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

6

Re: Connection Error(Failed to reach the server)!

Based on what I saw on this in other fora, I checked amavisd and I find that the service wasn't running. It also doesn't restart, or restart nicely.


[root@srv rmilton]# service amavisd restart
Redirecting to /bin/systemctl restart  amavisd.service
Job for amavisd.service failed because the control process exited with error code. See "systemctl status amavisd.service" and "journalctl -xe" for details.
[root@srv rmilton]# systemctl status amavisd.service
● amavisd.service - Amavisd-new is an interface between MTA and content checkers.
   Loaded: loaded (/usr/lib/systemd/system/amavisd.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Tue 2015-12-15 16:10:04 EST; 7s ago
     Docs: http://www.ijs.si/software/amavisd/#doc
  Process: 5439 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf (code=exited, status=13)

Dec 15 16:10:04 srv.ryanmilton.xyz systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
Dec 15 16:10:04 srv.ryanmilton.xyz systemd[1]: Unit amavisd.service entered failed state.
Dec 15 16:10:04 srv.ryanmilton.xyz systemd[1]: amavisd.service failed.
Dec 15 16:10:04 srv.ryanmilton.xyz systemd[1]: amavisd.service holdoff time over, scheduling restart.
Dec 15 16:10:04 srv.ryanmilton.xyz systemd[1]: start request repeated too quickly for amavisd.service
Dec 15 16:10:04 srv.ryanmilton.xyz systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..
Dec 15 16:10:04 srv.ryanmilton.xyz systemd[1]: Unit amavisd.service entered failed state.
Dec 15 16:10:04 srv.ryanmilton.xyz systemd[1]: amavisd.service failed.
[root@srv rmilton]#

7

Re: Connection Error(Failed to reach the server)!

ryandmilton wrote:

Based on what I saw on this in other fora, I checked amavisd and I find that the service wasn't running. It also doesn't restart, or restart nicely.

The pem file in /var/lib/dkim/example.com.pem was root:root

I changed this like the following:

chmod 644 /var/lib/dkim/ryanmilton.xyz.pem && chown -v root:amavis /var/lib/dkim/ryanmilton.xyz.pem

This allowed amavisd to start:

systemctl status amavisd.service
● amavisd.service - Amavisd-new is an interface between MTA and content checkers.
   Loaded: loaded (/usr/lib/systemd/system/amavisd.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2015-12-15 16:26:40 EST; 8s ago

However, I had to add an actual hostname and uncomment here first:



# OTHER MORE COMMON SETTINGS (defaults may suffice):

$myhostname = 'srv.ryanmilton.xyz';  # must be a fully-qualified domain name!

----------
now, it seems I'm getting somewhate...but all is greylisted:

07 srv postfix/cleanup[3790]: 0330337EE6: message-id=<58ef650346cfce57e1f804ff1d4807ad@ryanmilton.xyz>
Dec 15 16:33:07 srv postfix/qmgr[2926]: 0330337EE6: from=<ryan@ryanmilton.xyz>, size=747, nrcpt=1 (queue active)
Dec 15 16:33:07 srv roundcube: <gkneeqk4> User ryan@ryanmilton.xyz [192.168.30.4]; Message for ryandmilton@outlook.com; 250: 2.0.0 Ok: queued as 0330337EE6
Dec 15 16:33:07 srv postfix/smtpd[3785]: disconnect from localhost[127.0.0.1]
Dec 15 16:33:07 srv postfix/smtpd[3802]: connect from localhost[127.0.0.1]
Dec 15 16:33:07 srv postfix/smtpd[3802]: 96B0638DE4: client=localhost[127.0.0.1]
Dec 15 16:33:07 srv postfix/cleanup[3790]: 96B0638DE4: message-id=<58ef650346cfce57e1f804ff1d4807ad@ryanmilton.xyz>
Dec 15 16:33:07 srv postfix/smtpd[3802]: disconnect from localhost[127.0.0.1]
Dec 15 16:33:07 srv postfix/qmgr[2926]: 96B0638DE4: from=<ryan@ryanmilton.xyz>, size=1842, nrcpt=1 (queue active)
Dec 15 16:33:07 srv amavis[3582]: (03582-02) Passed CLEAN {RelayedInternal}, MYNETS/MYUSERS LOCAL [127.0.0.1]:48230 <ryan@ryanmilton.xyz> -> <ryandmilton@outlook.com>, Queue-ID: 0330337EE6, Message-ID: <58ef650346cfce57e1f804ff1d4807ad@ryanmilton.xyz>, mail_id: RRVgVXKGqy1T, Hits: 0.213, size: 747, queued_as: 96B0638DE4, dkim_new=dkim:ryanmilton.xyz, 570 ms
Dec 15 16:33:07 srv postfix/smtp[3795]: 0330337EE6: to=<ryandmilton@outlook.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.83, delays=0.24/0/0/0.59, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 96B0638DE4)
Dec 15 16:33:07 srv postfix/qmgr[2926]: 0330337EE6: removed
Dec 15 16:33:08 srv postfix/smtp[3803]: 96B0638DE4: to=<ryandmilton@outlook.com>, relay=mx3.hotmail.com[207.46.8.167]:25, delay=1.3, delays=0.12/0/0.72/0.48, dsn=2.0.0, status=sent (250  <58ef650346cfce57e1f804ff1d4807ad@ryanmilton.xyz> Queued mail for delivery)
Dec 15 16:33:08 srv postfix/qmgr[2926]: 96B0638DE4: removed
Dec 15 16:33:27 srv postfix/smtpd[3820]: connect from nm18.bullet.mail.bf1.yahoo.com[98.139.212.177]
Dec 15 16:33:28 srv cbpolicyd[3152]: module=Greylisting, action=defer, host=98.139.212.177, helo=nm18.bullet.mail.bf1.yahoo.com, from=patnoble52@yahoo.com, to=ryan@ryanmilton.xyz, reason=greylisted, tries=3
Dec 15 16:33:28 srv postfix/smtpd[3820]: NOQUEUE: reject: RCPT from nm18.bullet.mail.bf1.yahoo.com[98.139.212.177]: 451 4.7.1 <ryan@ryanmilton.xyz>: Recipient address rejected: Greylisting in effect, please come back later; from=<patnoble52@yahoo.com> to=<ryan@ryanmilton.xyz> proto=ESMTP helo=<nm18.bullet.mail.bf1.yahoo.com>
Dec 15 16:33:28 srv postfix/smtpd[3820]: disconnect from nm18.bullet.mail.bf1.yahoo.com[98.139.212.177]

8

Re: Connection Error(Failed to reach the server)!

Are you sure it's caused by incorrect owner of /var/lib/dkim/*? It should be owned by amavis:amavis by default. If you changed its owner, i'm afraid that your DKIM signing may not work, please try to send an email to your other account, then check the DKIM signature in mail header.

It might be caused due to no SpamAssassin rules (run 'sa-update') or no ClamAV data (run 'freshclam').

9

Re: Connection Error(Failed to reach the server)!

I will check,  because I am seeingseeing issues.

10

Re: Connection Error(Failed to reach the server)!

ZhangHuangbin wrote:

Are you sure it's caused by incorrect owner of /var/lib/dkim/*? It should be owned by amavis:amavis by default. If you changed its owner, i'm afraid that your DKIM signing may not work, please try to send an email to your other account, then check the DKIM signature in mail header.

It might be caused due to no SpamAssassin rules (run 'sa-update') or no ClamAV data (run 'freshclam').

Thanks.

I guess I don't fully understand what's happening.
1. I changed ownership of the pem to amavis:amavis.

Test keys still isn't happy.

root@srv log]# amavisd -c /etc/amavisd/amavisd.c
onf testkeys                                     
TESTING#1 ryanmilton.xyz: dkim._domainkey.ryanmil
ton.xyz => invalid (public key: not available)   
[root@srv log]#

But, test email seems to show signed email.. Is that correct, and possible?

Return-Path: <postmaster@ryanmilton.xyz> Delivered-To: ryan@ryanmilton.xyz Received: from srv.ryanmilton.xyz (localhost [127.0.0.1])     by srv.ryanmilton.xyz (Postfix) with ESMTP id 799BE2F4D82     for <ryan@ryanmilton.xyz>; Tue, 15 Dec 2015 23:03:57 -0500 (EST) Authentication-Results: srv.ryanmilton.xyz (amavisd-new); dkim=pass     reason="pass (just generated, assumed good)" header.d=ryanmilton.xyz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ryanmilton.xyz;      h=content-type:content-type:mime-version:to:from:from     :message-id:subject:subject:date:date; s=dkim; t=1450238637; x=     1451102638; bh=vlPYgPmiKvTHu9rFVZ4KUpQxPk8vi2UPH0eWE0J1Lr8=; b=d     DF3gmPiePLHcofmLu8/xrQ32IGbflgZuLeNYyRAtbzNlPHjSmbvVL4Y7jYd6S/mf     2D4Ghu9SOEzdEppvEtaFBxobEumZ2jV4ixPIOK23X7bvX42bE1M2OmnGDHFL37p1     Ilv1mIKEWoXvX5nhajQ1ltSLO5/WnfD6WLaXcylnr0= X-Virus-Scanned: amavisd-new at srv.ryanmilton.xyz Received: from srv.ryanmilton.xyz ([127.0.0.1])     by srv.ryanmilton.xyz (srv.ryanmilton.xyz [127.0.0.1]) (amavisd-new, port 10024)     with ESMTP id zRpH5Vrra4dZ for <ryan@ryanmilton.xyz>;     Tue, 15 Dec 2015 23:03:57 -0500 (EST) Received: from [192.168.30.7] (unknown [192.168.30.7])     by srv.ryanmilton.xyz (Postfix) with ESMTPSA id 72EA62F4D80     for <ryan@ryanmilton.xyz>; Tue, 15 Dec 2015 23:03:56 -0500 (EST) Date: Tue, 15 Dec 2015 23:03:55 -0500 Subject: Check header

11

Re: Connection Error(Failed to reach the server)!

ryandmilton wrote:

TESTING#1 ryanmilton.xyz: dkim._domainkey.ryanmilton.xyz => invalid (public key: not available)   

This means Amavisd cannot find your public DKIM key by querying TXT record of dkim._domainkey.ryanmilton.xyz.

So the question is: did you add DNS record for DKIM? we have a tutorial for you:
http://www.iredmail.org/docs/setup.dns. … kim-record

After you added DKIM DNS record, besides 'amavisd testkeys' command, you can also query it with dig:

dig -t txt dkim._domainkey.ryanmilton.xyz

12

Re: Connection Error(Failed to reach the server)!

Frustrated! I have checked DNS syntax a number of times.

I'm too noob!
I entered as:
txt  srv.ryanmilton.xyz    dkimkey

- as txt record, host, key
However, the issue persists.

13

Re: Connection Error(Failed to reach the server)!

I'm afraid that i don't have good idea, all i can offer is our tutorial to help you setup DKIM DNS record:
http://www.iredmail.org/docs/setup.dns. … kim-record

14

Re: Connection Error(Failed to reach the server)!

ZhangHuangbin wrote:

I'm afraid that i don't have good idea, all i can offer is our tutorial to help you setup DKIM DNS record:
http://www.iredmail.org/docs/setup.dns. … kim-record


Well, I can't say that I fully understand. So far,  the only domain that hasn't accepted my emails is @mail.com.

Otherwise, the emails appear signed. Not sure what else to do. DNS provider claims the record looks correct.

15

Re: Connection Error(Failed to reach the server)!

Please make sure it's 'passed' when you run 'amavisd-new testkeys'.