[Mimedefang] Xmimedefang: local socket name problem

David F. Skoll dfs at roaringpenguin.com
Thu May 14 14:35:54 EDT 2009

Jon Rowlan wrote:

> Perhaps there is a Unix "sleep" that I can use? As I say, if I wait
> a bit and run the last line its fine??

If you absolutely, positively do not want to restart Sendmail until
MIMEDefang is ready, you can use this shell function to wait until
MIMEDefang is responding.  However, I don't bother with it; I don't
care if a few socket warnings go by.  (As a mater of fact, waiting
before restarting Sendmail won't help; you will still get the
exact same socket warnings.)

wait_for_md () {
    for try in `seq 1 25`; do
        md-mx-ctrl ping > /dev/null 2>&1 && return 0
	sleep 1
    echo "Warning: MIMEDefang unresponsive for 25 attempts."
    return 1

I'm assuming that you're using a recent version of MIMEDefang, and that
your init script starts mimedefang before mimedefang-multiplexor.



More information about the MIMEDefang mailing list