I would like to set a milter using MIMEDefang on Ubuntu 16.04. I have an existing server using Sendmail 8.15.2-3. I installed MIMEDefang 2.78-1ubuntu1.1 (default package from apt). I configured my filter as I wanted and the service seems to be running. I can't seem to get sendmail to connect to the milter through.
I originally tried adding this line to my sendmail.mc line:
INPUT_MAIL_FILTER(`mimedefang', `S=unix:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=S:1m;R:1m')
but with that configuration I no one can send mail and the log file shows:
May 23 11:21:52 sm-mta[17052]: w4NFLq30017052: Milter (mimedefang): local socket name /var/spool/MIMEDefang/mimedefang.sock unsafe
May 23 11:21:52 sm-mta[17052]: w4NFLq30017052: Milter (mimedefang):
to error state
May 23 11:21:52 sm-mta[17052]: w4NFLq30017052: Milter: initialization failed, temp failing commands
I can see the socket listing by running netstat -na | grep fang
unix 2 [ ACC ] STREAM LISTENING 154381 /var/spool/MIMEDefang/mimedefang-multiplexor.sock
unix 2 [ ACC ] STREAM LISTENING 154399 /var/spool/MIMEDefang/mimedefang.sock
But if I list the contents of /var/spool/MIMEDefang the socket isn't listed (ls -l /var/spool/MIMEDefang
):
total 8
-rw------- 1 defang defang 6 May 23 15:15 mimedefang-multiplexor.pid
srwx------ 1 defang defang 0 May 23 15:15 mimedefang-multiplexor.sock
-rw------- 1 defang defang 6 May 23 15:15 mimedefang.pid
I didn't think it was the answer but I tried linking sendmail to mimedefang-multiplexor.sock since I didn't see mimedefang.sock in the ls
but since I got different error. If that is what I'm supposed to do then I'm asking the wrong question.
I feel as though I'm missing something obvious.
Edit: As best I can tell from the service status mimedefang seems to have started correctly:
● mimedefang.service
Loaded: loaded (/etc/init.d/mimedefang; bad; vendor preset: enabled)
Active: active (running) since Wed 2018-05-23 16:51:17 EDT; 4min 34s ago
Docs: man:systemd-sysv-generator(8)
Process: 21578 ExecStop=/etc/init.d/mimedefang stop (code=exited, status=0/SUCCESS)
Process: 20006 ExecReload=/etc/init.d/mimedefang reload (code=exited, status=0/SUCCESS)
Process: 21587 ExecStart=/etc/init.d/mimedefang start (code=exited, status=0/SUCCESS)
Tasks: 8
Memory: 20.8M
CPU: 122ms
CGroup: /system.slice/mimedefang.service
├─21617 /usr/bin/mimedefang-multiplexor -p /var/spool/MIMEDefang/mimedefang-multiplexor.pid -E -z /var/spool/MIMEDefang -m 2 -x 10 -U defang -b 600 -l -y 0 -s /var/spool/MIMEDefang/mimedefang-multiplexor.sock
├─21634 /usr/bin/mimedefang -P /var/spool/MIMEDefang/mimedefang.pid -R -1 -m /var/spool/MIMEDefang/mimedefang-multiplexor.sock -z /var/spool/MIMEDefang -U defang -s -p /var/spool/MIMEDefang/mimedefang.sock
├─21636 /usr/bin/mimedefang-multiplexor -p /var/spool/MIMEDefang/mimedefang-multiplexor.pid -E -z /var/spool/MIMEDefang -m 2 -x 10 -U defang -b 600 -l -y 0 -s /var/spool/MIMEDefang/mimedefang-multiplexor.sock
└─21647 /usr/bin/mimedefang-multiplexor -p /var/spool/MIMEDefang/mimedefang-multiplexor.pid -E -z /var/spool/MIMEDefang -m 2 -x 10 -U defang -b 600 -l -y 0 -s /var/spool/MIMEDefang/mimedefang-multiplexor.sock
May 23 16:51:17 systemd[1]: Starting mimedefang.service...
May 23 16:51:17 mimedefang[21587]: Starting mimedefang-multiplexor: [ OK ]
May 23 16:51:17 mimedefang-multiplexor[21617]: started; minSlaves=2, maxSlaves=10, maxRequests=500, maxIdleTime=300, busyTimeout=600, clientTimeout=10
May 23 16:51:17 mimedefang[21634]: MIMEDefang alive. slavesReservedForLoopback=-1 AllowNewConnectionsToQueue=0 doRelayCheck=0 doHeloCheck=0 doSenderCheck=1 doRecipientCheck=0
May 23 16:51:17 mimedefang-multiplexor[21617]: Initialized embedded Perl interpreter
May 23 16:51:17 mimedefang-multiplexor[21617]: Starting slave 0 (pid 21636) (1 running): Bringing slaves up to minSlaves (2)
May 23 16:51:17 mimedefang[21634]: Multiplexor alive - entering main loop
May 23 16:51:17 mimedefang[21587]: Starting mimedefang: [ OK ]
May 23 16:51:17 systemd[1]: Started mimedefang.service.
May 23 16:51:20 mimedefang-multiplexor[21617]: Starting slave 1 (pid 21647) (2 running): Bringing slaves up to minSlaves (2)
The log here doesn't react at all to sendmail trying to use the normal MD socket. It does show an error (I think it was a timeout error) if I try the multiplexor socket.