Topic: Error on send on completely fresh installation
==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7 MARIADB edition.
- Linux/BSD distribution name and version: Ubuntu 16.04.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL (MariaDB)
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Issue: On sending a test message, I receive the following error:
An error occured.
SMTP Error (-1): Connection to server failed.
————————————
Steps to reproduce:
On a completely fresh installation of Ubuntu 16.04.3, I installed iRedMail, following the instructions here:
https://docs.iredmail.org/install.iredm … buntu.html
The only prior changes were to
* Set up a non-root user
* Prevent root log on as
* Require SSH with an RSA key
* Log on as the non-root user.
Here is the end of the output, showing a number of errors (domain name and passwords changed to protect the innocent).
********************************************************************
* Start iRedMail Configurations
********************************************************************
[ INFO ] Create self-signed SSL certification files (2048 bits).
[ INFO ] Generate Diffie Hellman Group with openssl, please wait.
[ INFO ] Create required system account: vmail, iredadmin, iredapd.
[ INFO ] Configure Nginx web server and uWSGI.
[ INFO ] Configure PHP.
[ INFO ] Configure MariaDB database server.
[ INFO ] Setup daily cron job to backup SQL databases with /var/vmail/backup/backup_mysql.sh
[ INFO ] Configure Postfix (MTA).
postconf: fatal: open /etc/postfix/main.cf for reading: No such file or directory
postconf: fatal: open /etc/postfix/main.cf: No such file or directory
postconf: fatal: open /etc/postfix/main.cf: No such file or directory
postconf: fatal: open /etc/postfix/main.cf: No such file or directory
postconf: fatal: open /etc/postfix/main.cf: No such file or directory
postconf: fatal: open /etc/postfix/main.cf: No such file or directory
postconf: fatal: open /etc/postfix/main.cf: No such file or directory
postconf: fatal: open /etc/postfix/main.cf: No such file or directory
postconf: fatal: open /etc/postfix/main.cf: No such file or directory
postconf: fatal: open /etc/postfix/main.cf: No such file or directory
postmap: fatal: bad string length 0 < 1: mail_owner =
chown: cannot access 'postscreen_cache.db': No such file or directory
chmod: cannot access 'postscreen_cache.db': No such file or directory
[ INFO ] Configure Dovecot (POP3/IMAP/Managesieve/LMTP/LDA).
[ INFO ] Configure ClamAV (anti-virus toolkit).
[ INFO ] Configure Amavisd-new (interface between MTA and content checkers).
[ INFO ] Configure SpamAssassin (content-based spam filter).
[ INFO ] Configure iRedAPD (postfix policy daemon).
[ INFO ] Configure iRedAdmin (official web-based admin panel).
[ INFO ] Configure Fail2ban (authentication failure monitor).
[ INFO ] Configure Roundcube webmail.
[ INFO ] Configure Awstats (logfile analyzer for mail and web server).
*************************************************************************
* iRedMail-0.9.7 installation and configuration complete.
*************************************************************************
< Question > Would you like to use firewall rules provided by iRedMail?
< Question > File: /etc/default/iptables, with SSHD port: 22. [Y|n]Y
[ INFO ] Copy firewall sample rules: /etc/default/iptables.
< Question > Restart firewall now (with SSHD port 22)? [y|N]Y
[ INFO ] Restarting firewall ...
[ INFO ] Updating ClamAV database (freshclam), please wait ...
ERROR: /var/log/clamav/freshclam.log is locked by another process
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
********************************************************************
* URLs of installed web applications:
*
* - Roundcube webmail: httpS://mail.example.com/mail/
*
* - Web admin panel (iRedAdmin): httpS://mail.example.com/iredadmin/
*
* You can login to above links with below credential:
*
* - Username: postmaster@example.com
* - Password: mySecretPassword
*
*
********************************************************************
* Congratulations, mail server setup completed successfully. Please
* read below file for more information:
*
* - /tmp/iRedMail-0.9.7/iRedMail.tips
*
* And it's sent to your mail account postmaster@example.com.
*
********************* WARNING **************************************
*
* Please reboot your system to enable all mail services.
*
********************************************************************
I rebooted the server, then visited httpS://mail.example.com/iredadmin/ to create a second email account.
In a second browser tab, I then logged in as the new account user at httpS://mail.example.com/mail/
I created a test mail, to send to postmaster@example.com. When I pressed Send, I received the following error:
An error occured.
SMTP Error (-1): Connection to server failed.
——————————
Here are the specs of the machine:
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
# lshw -short -C memory
H/W path Device Class Description
=============================================================
/0/0 memory 64KiB BIOS
/0/400/700 memory 256KiB L1 cache
/0/400/701 memory 1MiB L2 cache
/0/400/702 memory 8MiB L3 cache
/0/1000 memory 4GiB System Memory
/0/1000/0 memory 4GiB DIMM Synchronous 2400 MHz (0.4 ns)
/0/1000/1 memory [empty]
/0/1000/2 memory [empty]
/0/1000/3 memory [empty]
/0/100/1f.2 memory Memory controller
Here are the log files that have been created:
# tail /var/log/mail.log
Nov 5 18:15:40 mail roundcube: ERROR: Connection refused (111)
Nov 5 18:15:40 mail roundcube: ERROR: Failed to connect socket: Connection refused ()
Nov 5 18:15:40 mail roundcube: <er4vd0af> SMTP Error: Connection failed: Failed to connect socket: Connection refused in /opt/www/roundcubemail-1.3.0/program/lib/Roundcube/rcube.php on line 1665 (POST /mail/?_task=mail&_unlock=loading1509905740137&_lang=en_GB&_framed=1&_action=send)
# tail /var/log/nginx/error.log
2017/11/05 18:06:05 [error] 1654#1654: *34 open() "/var/www/html/iRedAdmin" failed (2: No such file or directory), client: 92.130.37.150, server: _, request: "GET /iRedAdmin HTTP/1.1", host: "mail.example.com"
Other log files had not yet been created. For example:
tail /var/log/dovecot.log
tail: cannot open '/var/log/dovecot.log' for reading: No such file or directory
The nginx/error.log mentions that /var/www/html/iRedAdmin does not exist. Here is the listing:
# ls -al /var/www/html
total 20
drwxr-xr-x 2 root root 4096 Nov 5 17:57 .
drwxr-xr-x 3 root root 4096 Nov 5 17:55 ..
-rw-r--r-- 1 root root 78 Nov 5 17:57 index.html
-rw-r--r-- 1 root root 612 Nov 5 17:56 index.nginx-debian.html
-rw-r--r-- 1 root root 26 Nov 5 17:57 robots.txt
The installation output indicates that /etc/postfix/main.cf does not exist. Here is the listing:
# ls -al /etc/postfix/
total 188
drwxr-xr-x 5 root root 4096 Nov 5 17:58 .
drwxr-xr-x 101 root root 4096 Nov 5 17:58 ..
-rw-r--r-- 1 root root 191 Nov 5 17:58 aliases
-rw-r----- 1 root postfix 0 Nov 5 17:57 body_checks.pcre
-rw-r--r-- 1 root root 193 Nov 5 17:57 command_filter.pcre
drwxr-xr-x 2 root root 4096 Nov 5 17:58 disclaimer
-rw-r--r-- 1 root root 195 Nov 5 17:55 dynamicmaps.cf
-rw-r----- 1 root postfix 0 Nov 5 17:57 header_checks
-rw-r----- 1 root postfix 18311 Nov 5 17:57 helo_access.pcre
-rw-r----- 1 root root 0 Nov 5 17:57 helo_access.pcre.2017.11.05.17.50.38
-rw-r--r-- 1 root root 11087 Nov 5 17:58 main.cf
-rw-r--r-- 1 root root 27126 Nov 5 17:55 main.cf.proto
-rw-r--r-- 1 root root 7805 Nov 5 17:57 master.cf
-rw-r--r-- 1 root root 6068 Nov 5 17:57 master.cf.2017.11.05.17.50.38
-rw-r--r-- 1 root root 6068 Nov 5 17:55 master.cf.proto
drwxr-xr-x 2 root root 4096 Nov 5 17:57 mysql
-rw-r--r-- 1 root root 21233 Oct 25 13:50 postfix-files
-rwxr-xr-x 1 root root 9344 Oct 25 13:50 postfix-script
-rwxr-xr-x 1 root root 29446 Oct 25 13:50 post-install
-rw-r--r-- 1 root root 124 Nov 5 17:57 postscreen_access.cidr
-rw-r--r-- 1 root root 0 Nov 5 17:57 postscreen_dnsbl_reply
drwxr-xr-x 2 root root 4096 Oct 25 13:50 sasl
-rw-r----- 1 root postfix 0 Nov 5 17:57 sender_access.pcre
This command...
# find / -name "postscreen_cache.db"
... fails to find any item with the given name
Please let me know if there is any further information that could help you to resolve this issue.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.