0

I am running an Ubuntu 20.04 server. I have installed mailcow: dockerized as shown in their documentation which includes Postfix among other tools. The mail server itself works without a problem, but I wanted to change large attachtments with links, so I started looking for solutions and found MIMEDefang which as I read in some sources (the best one beign http://www.mickeyhill.com/mimedefang-howto/) can be used for that.

I tried to install and configure MIMEDefang using help from the second answer of this question: How to integrate postfix and mimedefang but it didn't work, and then I tried the first answer (inet instead of unix) and it didn't work either.

The problem I'm getting right now is that MIMEDefang is listening in inet:10997 but when reading Postfix logs after sending an email it says:

postfix-mailcow_1 | Jan 7 14:58:57 3632dcaf9961 postfix/submission/smtpd[478]: warning: connect to Milter service inet:localhost:10997: Connection refused

My current configuration for postfix is the default that comes with mailcow and in /opt/mailcow-dockerized/data/conf/postfix/extra.cf I have:

mthostname = mail.mydomain.com
smtpd_milters = inet:rspamd:9900, inet:localhost:10997

mail.mydomain.com would be replaced by my actual domain.

In /etc/default/mimedefang I have just set:

SOCKET=inet:10997

I think it may have to do with Postfix beign dockerized but I honestly don't know how to make it work. If someone has any ideas I would be very grateful, thank you.

decacis
  • 1
  • 2

1 Answers1

0

I found out how to do it.

In /opt/mailcow-dockerized/data/conf/postfix/extra.cf instead of localhost you must put your ip (the VPS ip in my case):

Before:

mthostname = mail.mydomain.com
smtpd_milters = inet:rspamd:9900, inet:localhost:10997

After:

mthostname = mail.mydomain.com
smtpd_milters = inet:rspamd:9900, inet:148.54.11.25:10997

(148.54.11.25 is just an example)

decacis
  • 1
  • 2