[Mimedefang] Someone else with local socket name /var/spool/MIMEDefang/mimedefang.sock unsafe blues ...
Si at yacc.co.uk
Fri Apr 25 16:29:04 EDT 2003
I've installed latest versions of everything as per Mickey Hill's 'How To' - Sendmail, SpamAssassin, MIMEDefang (actually 2.32 ... then 2.33 a few mins ago).
All complies/builds/install just fine.
I've remembered to do all necessary to get Milters working ... infact SpamAssassin is working just fine on same machine with the old 'SpamAssMilter' in place.
When I try to run '/usr/local/bin/mimedefang -p /var/spool/MIMEDefang/mimedefang.sock &' as described in the notes, I get messages about having to run with '-m' and not as root, but thanks to all the info on this list, that's not a big deal either ... maybe.
Since I'm running on BSDi (so LINUX/SysV startup stuff isn't available), I've added following to my /etc/rc ...
# start MIMEDefang before sendmail ...
rm -f /var/spool/MIMEDefang/mimedefang.sock /var/spool/MIMEDefang/mimedefang-mx.sock
/usr/local/bin/mimedefang-multiplexor -U defang -m 2 -b 30 -i 300 -l -t /var/log/md-stats -u -s /var/spool/MIMEDefang/mimedefang-mx.sock
/usr/local/bin/mimedefang -U defang -m /var/spool/MIMEDefang/mimedefang-mx.sock -p /var/spool/MIMEDefang/mimedefang.sock
chown smmsp /var/run/sendmail
(cd /var/spool/mqueue; rm -f [lnx]f*)
# Build /etc/mail/aliases.db if there isn't one (req. in newer versions)
if [ ! -f /etc/mail/aliases.db ]; then
/usr/bin/newaliases >/dev/null 2>&1
echo -n ' sendmail'; /usr/sbin/sendmail -L sm-mta -bd -q30m
(cd /var/spool/clientmqueue; rm -f [lnx]f*)
echo -n ' sendmail client queue '; /usr/sbin/sendmail -L sm-msp-queue -Ac -Vc -qp5m &
Everything comes up just fine except /usr/local/bin/mimedefang. That runs and dies (I'm guessing this is bad), and doesn't appear to create the /var/spool/MIMEDefang/mimedefang.sock socket.
In the screen I get:
WARNING: Xmimedefang: local socket name /var/spool/MIMEDefang/mimedefang.sock missing
... which backus up what I just said.
In /var/log/maillog, I get stuff like this:
Apr 25 21:07:23 dweezel yacc: mimedefang-multiplexor: started; minSlaves=2, maxSlaves=2, maxRequests=500, maxIdleTime=300, busyTimeout=30, clientTimeout=10
Apr 25 21:07:23 dweezel yacc: mimedefang-multiplexor: Starting slave 0 (pid 3203) (1 running): Bringing slaves up to minSlaves (2)
Apr 25 21:07:23 dweezel yacc: mimedefang: Multiplexor alive - entering main loop
Apr 25 21:07:26 dweezel yacc: mimedefang-multiplexor: Starting slave 1 (pid 3207) (2 running): Bringing slaves up to minSlaves (2)
Apr 25 21:07:33 dweezel sm-mta: gethostbyaddr(220.127.116.11) failed: 1
Apr 25 21:07:33 dweezel sm-mta: gethostbyaddr(18.104.22.168) failed: 1
Apr 25 21:07:33 dweezel sm-mta: starting daemon (8.12.9): SMTP+queueing at 00:30:00
Apr 25 21:07:33 dweezel yacc: sm-msp-queue: starting daemon (8.12.9): persistent-queueing at 00:05:00
Apr 25 21:07:33 dweezel sm-mta: h3PK7Xrt003214: Milter (mimedefang): local socket name /var/spool/MIMEDefang/mimedefang.sock unsafe
Apr 25 21:07:33 dweezel sm-mta: h3PK7Xrt003214: Milter (mimedefang): to error state
Apr 25 21:07:33 dweezel yacc: sm-msp-queue: h3PIe2Sv002200: to=trapdudes, ctladdr=root (0/0), delay=01:27:31, xdelay=00:00:00, mailer=relay, pri=3000052, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: 451 4.7.1 Please try again later
Permissions on the spool directory as follows:
drwx------ 2 defang defang 512 Apr 25 20:19 MIMEDefang
and socket inside ...
srw------- 1 defang defang 0 Apr 25 20:19 mimedefang-mx.sock
Entries in my sendmail.mc include ...
INPUT_MAIL_FILTER(`mimedefang', `S=unix:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=S:60s;R:60s;E:5m')
Loads of people appear to be seeing this problem (have a dig through DEJA and you'll soon see what I mean). One chap attributed it to a missing 'status file', but I don't appear to be able to fine it ~:) Any clues there gratefully accepted :)
My *guess* is that the message is slightly spurious, and most likely due to the fact that the socket doesn't exist ... most likely due to the fact that mimedefang is exiting for some unknown reason. I don't know.
1. Am I starting everything up in the right order and with sensible parameters?
2. Is my understanding of multiplexor's role correct - i.e. we still need to run mimedefang as well? Does anyone have a startup script they could share with the rest of us?
3. Can anyone shed any light on the status file mentioned? My guess is that mimedefang is bombing out due to something stupid like this.
Any suggestions gratefully received
More information about the MIMEDefang