Hello,

I’m successfully running Mailcow Dockerized, and everything is working well. I have AT&T fiber with a static IP, and port 25 is unblocked. I’ve also configured the reverse PTR record for my domain.

However, I’m encountering issues when trying to use Mailcow to send emails from local services and servers—I can’t seem to authenticate. Do you have any tips on how to set up Mailcow for use with other services, such as WordPress, to send emails externally?

Thanks!

    andresito
    not an expert, but you might have to setup mail relay. use port 587.

    Some port 25 are not block inbound, but outbound is block.

    Have something to say?

    Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

    Just to clarify, my main issue is ensuring that other servers on my network can send emails through Mailcow. Essentially, I need Mailcow to function as an internal mail relay for these services.

    Add the IP address of your other mail servers to your

    System -> Configuration -> Forwarding Hosts

    @andresito Did you look at the postfix logs? They will tell you what goes wrong.

    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!

    MAIL_HOST = mail.domain.com
    MAIL_PORT = 587
    MAIL_USERNAME = valid-email@domain.com
    MAIL_PASSWORD = correct-password
    MAIL_ENCRYPTION = tls

    try this mail_encryption = set it to none/false/no encryption variable

    Port 587 does NOT support TLS. It supports only STARTTLS. That is the reason why you do not see anything in postfix logs.

    Do not change config parameters on the server without properly understanding what you are doing…

      esackbauer
      the one that I replied - it was the itflow mail configuration (as per OP writings)

      Because one time I had this docker app that only works if the encryption is disabled with port 587 - no explaination.

        fiedin docker app that only works if the encryption is disabled with port 587 - no explaination.

        That is what port 587 is meant to be. Use no encryption or STARTTLS. You cannot use TLS with it. There is port 465 if you want to use TLS.

        Thanks for the help, I turned off the TLS and now everything is working correctly.

        No one is typing