1

Topic: Everything works except connection from Mautic

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.7
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello, iRedMail experts.

I have a big puzzle that I can’t crack without you.  I am running iRedMail server and I can receive and send email from

1.    Thunderbird
2.    MS Outlook

I also have Gmail and Outlook.com accounts which are connected as aliases so I can send email from Gmail and Outlook as an iRedMail user account.

All of them (Outlook, Thunderbird and webmail clients) connect to my mail server on port 587/TLS.  So, because everything works I can deduce that there is no problem with the firewall and port 587 is open and it accepts connections.  Mail flows.

Now, my problem is that I want to use my mail server as the MTA on my Mautic instance and I can’t set it up – I use the same credentials as in all my clients – host name, user name, password, encryption settings and TCP port.  Mautic can’t connect and throws an error:

Connection could not be established with host mail.mymaildomain.com [Connection timed out #110] Log data: ++ Starting Swift_SmtpTransport !! Connection could not be established with host mail.mymaildomain.com [Connection timed out #110] (code: 0)
++ Starting Swift_SmtpTransport !! Connection could not be established with host mail.mymaildomain.com [Connection timed out #110] (code: 0)

It is easy to guess that there is some problem with Mautic code, however I can perfectly connect Mautic the same way to Mailgun on port 587 and mail works fine.

My question – what else can I tinker in iRedMail to solve this problem?

Thanks in advance

----

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

2

Re: Everything works except connection from Mautic

Try to disable fail2ban service on iRedMail server, then try Mautic again.
Pay close attention to Postfix log file /var/log/maillog.

3

Re: Everything works except connection from Mautic

Thanks, Zhang

Disabling Fail2Ban did not resolve the issue.

4

Re: Everything works except connection from Mautic

OK, I cracked it smile  It was in fact simpler than I thought if I knew where to dig...

This was a DNS issue - iRedMail is in one VM and Mautic is in a separate VM.  Both VMs are on the same virtula LAN -  connected to the same vSwitch.  So, when Mautic was trying to connect to the SMTP server it was bumping it on the private IP address bypassing the firewall and because of that there was no TLS encryption enforced.

https://snag.gy/wVATtd.jpg

Editing host file on the application server and adding a reference to the public IP address of the mail server (as mapped on the firewall) allowed me to connect to iRedMail and set up the profile.

So, everything works.... except I have a new issue now.  I guess I will need to open a separate post for it.