I’m having trouble connecting my ITFlow instance to Mailcow for sending emails via SMTP. Here’s my setup:
Mail Server (Mailcow): Running Postfix for SMTP on mail.domain.com.
ITFlow: Running in a Docker container and configured to use Mailcow’s Postfix for email sending.
Configuration Details:
Postfix (Mailcow) Settings:
myhostname = mail.domain.com
mynetworks = 127.0.0.0/8, [::1]/128, 172.22.1.14/24, 192.168.2.0/24
inet_interfaces = all (Postfix is listening on all interfaces)
SMTP Authentication is enabled (smtpd_sasl_auth_enable = yes)
Using port 587 for TLS (configured correctly with certs)
ITFlow SMTP Configuration:
MAIL_HOST = mail.domain.com
MAIL_PORT = 587
MAIL_USERNAME = valid-email@domain.com
MAIL_PASSWORD = correct-password
MAIL_ENCRYPTION = tls
Issue:
When ITFlow attempts to send an email, I receive the following error:
vbnet
Copy code
SMTP Error: Could not connect to SMTP host. Failed to connect to server.
What I Have Tried:
Verified ITFlow can connect to the Postfix container via port 587 using nc (connection successful).
Checked the ITFlow SMTP settings (they seem correct).
Checked Postfix configuration in Mailcow to allow authenticated SMTP from ITFlow.
Verified that Postfix is listening on port 587 and authentication is enabled.
Reviewed the Postfix logs, but I don’t see any relevant errors.
Despite these steps, ITFlow is still unable to send emails through Mailcow.
Any ideas or suggestions on what might be wrong or what else I should check?
Thanks in advance!