1

Topic: Cannot sent mail

==== 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:
======== 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:
====Hi all,

First of all, I'm very new to linux and try to setup my own mail server, kindly be easy on me:) I finished the setup on fresh OS. When I tried to send mail, it is not sent.

I tried command:
sendmail -bp

return:
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
37154C71777F      522 Fri Aug 26 13:36:32  test@xxx.com
                   (connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)
                                         test@xxx.com

=====================

I tried command
service amavisd status

return
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 Fri 2016-08-26 19:16:01 WIB; 1h 14min ago
     Docs: http://www.ijs.si/software/amavisd/#doc
  Process: 6823 ExecStart=/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf (code=exited, status=0/SUCCESS)
Main PID: 6824 (code=exited, status=255)

Aug 26 19:16:01 localhost.localdomain systemd[1]: Unit amavisd.service entere...
Aug 26 19:16:01 localhost.localdomain systemd[1]: amavisd.service failed.
Aug 26 19:16:01 localhost.localdomain systemd[1]: amavisd.service holdoff tim...
Aug 26 19:16:01 localhost.localdomain systemd[1]: start request repeated too ...
Aug 26 19:16:01 localhost.localdomain systemd[1]: Failed to start Amavisd-new...
Aug 26 19:16:01 localhost.localdomain systemd[1]: Unit amavisd.service entere...
Aug 26 19:16:01 localhost.localdomain systemd[1]: amavisd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

==============

I tried command
amavisd debug

return:
Aug 26 20:06:49.241 mail.xxx.com /sbin/amavisd[25606]: logging initialized, log level 0, syslog: amavis.mail
Aug 26 20:06:49.241 mail.xxx.com /sbin/amavisd[25606]: starting. /sbin/amavisd at mail.xxx.com amavisd-new-2.10.1 (20141025), Unicode aware, LANG="en_US.UTF-8"
Aug 26 20:06:49.241 mail.xxx.com /sbin/amavisd[25606]: perl=5.016003, user=, EUID: 984 (984);  group=, EGID: 979 979 (979 979)
Aug 26 20:06:49.277 mail.xxx.com /sbin/amavisd[25606]: INFO: no optional modules: unicore::lib::Nt::De.pl Unix::Getrusage
Aug 26 20:06:49.277 mail.xxx.com /sbin/amavisd[25606]: SpamControl: attempting to load scanner SpamAssassin, module Amavis::SpamControl::SpamAssassin
Aug 26 20:06:49.277 mail.xxx.com /sbin/amavisd[25606]: SpamControl: scanner SpamAssassin, module Amavis::SpamControl::SpamAssassin
Error Opening file /usr/share/GeoIP/GeoIPv6.dat
Aug 26 20:06:49.426 mail.xxx.com /sbin/amavisd[25606]: INFO: SA version: 3.4.0, 3.004000, no optional modules: Net::CIDR::Lite Image::Info Image::Info::GIF Image::Info::JPEG Image::Info::PNG Image::Info::BMP Image::Info::TIFF
Aug 26 20:06:49.426 mail.xxx.com /sbin/amavisd[25606]: SpamControl: init_pre_chroot on SpamAssassin done
Aug 26 20:06:49.426 mail.xxx.com /sbin/amavisd[25606]: socket module IO::Socket::IP, protocol families available: INET, INET6
Aug 26 20:06:49.426 mail.xxx.com /sbin/amavisd[25606]: bind to /var/run/amavisd/amavisd.sock|unix, 127.0.0.1:10024/tcp, 127.0.0.1:10026/tcp, 127.0.0.1:9998/tcp
Aug 26 20:06:49.427 mail.xxx.com /sbin/amavisd[25606]: Net::Server: 2016/08/26-20:06:49 Amavis (type Net::Server::PreForkSimple) starting! pid(25606)
Aug 26 20:06:49.429 mail.xxx.com /sbin/amavisd[25606]: Net::Server: Binding to UNIX socket file "/var/run/amavisd/amavisd.sock"
Aug 26 20:06:49.429 mail.xxx.com /sbin/amavisd[25606]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1 with IPv4
Aug 26 20:06:49.429 mail.xxx.com /sbin/amavisd[25606]: (!)Net::Server: 2016/08/26-20:06:49 Can't connect to TCP port 10024 on 127.0.0.1 [Address already in use]\n  at line 68 in file /usr/share/perl5/vendor_perl/Net/Server/Proto/TCP.pm
Aug 26 20:06:49.429 mail.xxx.com /sbin/amavisd[25606]: Net::Server: 2016/08/26-20:06:49 Server closing!

===================

I have tried to completely disable amavisd, the mail sent successfully. However, that's not a good solution.

I have no idea what else to try, kindly need your help.

Thank you.

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: CENTOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

----

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

2

Re: Cannot sent mail

bakzh0 wrote:

Aug 26 20:06:49.429 mail.xxx.com /sbin/amavisd[25606]: (!)Net::Server: 2016/08/26-20:06:49 Can't connect to TCP port 10024 on 127.0.0.1 [Address already in use]\n  at line 68 in file /usr/share/perl5/vendor_perl/Net/Server/Proto/TCP.pm

Port 10024 is used by another program, please stop it first, then restart Amavisd service. You can find it with command 'lsof' like below:

lsof -i :10024

3

Re: Cannot sent mail

Hi Zhang, that simple code actually work. Thank you so much:)