mpaperno / spampd

SpamPD - Spam Proxy Daemon. A spam-filtering SMTP/LMTP proxy server using SpamAssassin in Perl. Since 2002.
GNU General Public License v3.0
34 stars 9 forks source link

Typo and question about signals #34

Closed realsimix closed 3 years ago

realsimix commented 3 years ago

There is a small typo in current master:

--- spampd-master/spampd.pl.orig    2021-08-03 19:39:28.000000000 +0200
+++ spampd-master/spampd.pl 2021-08-04 10:21:15.797812535 +0200
@@ -782,7 +782,7 @@ sub validate_main_opts {
   }
   else {
     eval { require IO::Socket::IP; }
-    or push (@errs, "Error loading IO::IP::UNIX module, required for --relayhost option.\n\t$@");
+    or push (@errs, "Error loading IO::Socket::IP module, required for --relayhost option.\n\t$@");
   }

   return (@errs, @warns);

I've now also looked at the signal handling and I'm wondering what the proper way would be to terminate SpamPD, be in from init scripts or systemd units.

I've always used SIGTERM but what about using SIGQUIT to have graceful shutdowns?

Thanks, Simon

mpaperno commented 3 years ago

Thanks! Added to the other pending "documentation" corrections.

Yes, QUIT for graceful, TERM for immediate. On a live server I'd certainly (prefer to) try the former first, assuming one can wait at all, then maybe TERM it after a timeout or some such thing. If one has to force-quit it often that may be an indication of some bigger issue, like hanging spam network checks for example.