1

Topic: can connect to imap, but can't send with smtp

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.8 MYSQL edition.
- Linux/BSD distribution name and version: ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- 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.
====

After install iredmail, it work great. imap and smtp all work with STARTTLS . port 143,993 and port 587 tested.
after I disabled ClamAV following the documents still work without problem.

but today when I using the mail client , I can't send mail anymore. I didn't change any settings after then , only reboot the server one time.
now imap work normaly , smtp can't connect, mail client shows connect timeout. And send mail using roundcube still work.
also, I try enable 465 SMTPS still cant connect
i attached my config file but I think I didn't modify it




=======================================================================
port check:

root@mail:~# lsof -i:587
COMMAND   PID USER   FD   TYPE    DEVICE SIZE/OFF NODE NAME
master  22174 root  115u  IPv4 805578885      0t0  TCP *:submission (LISTEN)
master  22174 root  116u  IPv6 805578886      0t0  TCP *:submission (LISTEN)

=======================================================================
iptable setting:

# Allow PING from remote hosts.
-A INPUT -p icmp --icmp-type echo-request -j ACCEPT

# ssh
-A INPUT -p tcp --dport 22 -j ACCEPT

# http, https
-A INPUT -p tcp --dport 80 -j ACCEPT
-A INPUT -p tcp --dport 443 -j ACCEPT

# smtp, submission
-A INPUT -p tcp --dport 25 -j ACCEPT
-A INPUT -p tcp --dport 587 -j ACCEPT

# pop3, pop3s
-A INPUT -p tcp --dport 110 -j ACCEPT
-A INPUT -p tcp --dport 995 -j ACCEPT
#-A INPUT -p tcp --dport 10110 -j ACCEPT

# imap, imaps
-A INPUT -p tcp --dport 143 -j ACCEPT
-A INPUT -p tcp --dport 993 -j ACCEPT
#-A INPUT -p tcp --dport 10143 -j ACCEPT

# lmtp
#-A INPUT -p tcp --dport 24 -j ACCEPT
#-A INPUT -p tcp --dport 1024 -j ACCEPT

# managesieve
#-A INPUT -p tcp --dport 4190 -j ACCEPT
#-A INPUT -p tcp --dport 10419 -j ACCEPT

# Dovecot SASL AUTH service for HAProxy
#-A INPUT -p tcp --dport 12346 -j ACCEPT

# ldap/ldaps
#-A INPUT -p tcp --dport 389 -j ACCEPT
#-A INPUT -p tcp --dport 636 -j ACCEPT
=======================================================================

● postfix.service - LSB: Postfix Mail Transport Agent
   Loaded: loaded (/etc/init.d/postfix; bad; vendor preset: enabled)
  Drop-In: /run/systemd/generator/postfix.service.d
           └─50-postfix-$mail-transport-agent.conf
   Active: active (running) since Tue 2018-05-08 23:16:59 EDT; 1min 16s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 11194 ExecStop=/etc/init.d/postfix stop (code=exited, status=0/SUCCESS)
  Process: 11223 ExecStart=/etc/init.d/postfix start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/postfix.service
           ├─12044 /usr/lib/postfix/sbin/master
           ├─12045 pickup -l -t unix -u
           ├─12046 qmgr -l -t unix -u
           ├─12047 proxymap -t unix -u
           └─12049 showq -t unix -u

May 08 23:16:56 mail systemd[1]: Starting LSB: Postfix Mail Transport Agent...
May 08 23:16:56 mail postfix[11223]:  * Starting Postfix Mail Transport Agent postfix
May 08 23:16:59 mail postfix[11223]:    ...done.
May 08 23:16:59 mail systemd[1]: Started LSB: Postfix Mail Transport Agent.
May 08 23:16:59 mail postfix/master[12044]: daemon started -- version 3.1.0, configuration /etc/postfix

Post's attachments

mail.cf 11.14 kb, file has never been downloaded. 

master.cf 8.12 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: can connect to imap, but can't send with smtp

*) What's the error message in your IMAP client application?
*) Any related error in Postfix log file?

3

Re: can connect to imap, but can't send with smtp

ZhangHuangbin wrote:

*) What's the error message in your IMAP client application?
*) Any related error in Postfix log file?

It didn't have any error message ,only showing timeout in the mail client. just seems like the server not running.
And there is nothing showing in postfix log when I connect it.
Is there any blocking mechanism with it?

4

Re: can connect to imap, but can't send with smtp

Check your firewall rules with command below, is port 25 open?

iptables -L -n

Also check your network firewall.

5

Re: can connect to imap, but can't send with smtp

While doing tail -f /var/log/maillog
    From a remote client, do
        telnet mailserver 587
Logfile should show
      May 16 15:20:15 mail2 postfix/submission/smtpd[3439]: connect from unknown[10.x.x.x]
The client should show:
  Trying 10.x.x.x
   Connected to 10.x.x.x
   Escape character is '^]'.
   220 mail.company.com ESMTP Postfix