The attached patch to the spamassassin-3.1.4-20060825.src.rpm run
control file, rc.spamassassin, sets a new configuration variable,
spamassassin_stop_sleep="5", and moves the sleep from the restart
to the stop section.

I've found that the restart often doesn't allow adequate time
after the stop for SA to complete its shutdown so the start
fails as the bind finds the port busy.  This occurs on systems
that are processing 30,000+ SA messages a day, and frequently
have a load average around 4 or 5.

Putting this in the configuration section then allows local
changes if necessary.

Moving the sleep from the restart to the start section enables
the sleep in ``rc spamassassin stop start'' instead of just in
the restart invocation.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``A Democracy cannot exist as a permanent form of government.  It can only
exist until the voters discover they can vote themselves largesse out of
the public treasury.  From the moment on the majority always votes for the
candidate promising the most benefits from the public treasury with the
result that Democracy always collapses over a loose fiscal policy, always
to be followed by a Dictatorship.''
        Professor Alexander Fraser Tytler.  1801
--- rc.spamassassin.orig        2006-08-28 12:09:46.799765008 -0700
+++ rc.spamassassin     2006-08-28 12:11:00.045629944 -0700
@@ -13,6 +13,8 @@
     spamassassin_log_numfiles="10"
     spamassassin_log_minsize="1M"
     spamassassin_log_complevel="9"
+    spamassassin_stop_sleep="5"
+
 
 %common
     spamassassin_etcdir="@l_prefix@/etc/spamassassin"
@@ -47,12 +49,12 @@
     rcService spamassassin enable yes || exit 0
     rcService spamassassin active no && exit 0
     spamassassin_signal TERM
+    sleep "$spamassassin_stop_sleep"
 
 %restart -p 600 -u @l_susr@
     rcService spamassassin enable yes || exit 0
     rcService spamassassin active no && exit 0
     rc spamassassin stop
-    sleep 2
     rc spamassassin start
 
 %daily -u @l_susr@

Reply via email to