[Mimedefang] Someone else with local socket name /var/spool/MIMEDefang/mimedefang.sock unsafe blues ...

Simon Standley Si at yacc.co.uk
Fri Apr 25 16:24:01 EDT 2003


Guys,

I've installed latest versions of everything as per Mickey Hill's 'How To' - Sendmail, SpamAssassin, MIMEDefang (originally 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 I've dealt with that (I think!).

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

        mkdir /var/run/sendmail
        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
        fi
        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[2525]: mimedefang-multiplexor: started; minSlaves=2, maxSlaves=2, maxRequests=500, maxIdleTime=300, busyTimeout=30, clientTimeout=10
Apr 25 21:07:23 dweezel yacc[2525]: mimedefang-multiplexor: Starting slave 0 (pid 3203) (1 running): Bringing slaves up to minSlaves (2)
Apr 25 21:07:23 dweezel yacc[2525]: mimedefang[3202]: Multiplexor alive - entering main loop
Apr 25 21:07:26 dweezel yacc[2525]: mimedefang-multiplexor: Starting slave 1 (pid 3207) (2 running): Bringing slaves up to minSlaves (2)
Apr 25 21:07:33 dweezel sm-mta[3206]: gethostbyaddr(217.19.226.34) failed: 1
Apr 25 21:07:33 dweezel sm-mta[3206]: gethostbyaddr(217.19.226.35) failed: 1
Apr 25 21:07:33 dweezel sm-mta[3208]: starting daemon (8.12.9): SMTP+queueing at 00:30:00
Apr 25 21:07:33 dweezel yacc[25]: sm-msp-queue[3212]: starting daemon (8.12.9): persistent-queueing at 00:05:00
Apr 25 21:07:33 dweezel sm-mta[3214]: h3PK7Xrt003214: Milter (mimedefang): local socket name /var/spool/MIMEDefang/mimedefang.sock unsafe
Apr 25 21:07:33 dweezel sm-mta[3214]: h3PK7Xrt003214: Milter (mimedefang): to error state
Apr 25 21:07:33 dweezel yacc[25]: sm-msp-queue[3213]: 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.

QUESTIONS:

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.
4. should I be running MIMEDefang and sendmail as same UID/GID?

Any suggestions gratefully received 

Many thanks.

SI.






More information about the MIMEDefang mailing list