$OpenBSD: patch-spampd_pl,v 1.1 2018/08/24 19:16:36 sthen Exp $

Index: spampd.pl
--- spampd.pl.orig
+++ spampd.pl
@@ -798,7 +798,13 @@ sub mylog($$$) {
     $self->log($level, $msg);
 }
 
+# Override Net::Server's HUP handling - just gracefully restart all the children.
+sub sig_hup {
+      my $self = shift;
+      $self->hup_children;
+}
 
+
 ##################   SETUP   ######################
 
 
@@ -816,8 +822,8 @@ my $childtimeout = 6*60; # child process per-command t
 my $satimeout = 285; # SpamAssassin timeout in seconds (15s less than Postfix 
                      # default for smtp_data_done_timeout)
 my $pidfile = '/var/run/spampd.pid'; # write pid to file
-my $user = 'mail'; # user to run as
-my $group = 'mail'; # group to run as
+my $user = '_spampd'; # user to run as
+my $group = '_spampd'; # group to run as
 my $tagall = 0; # mark-up all msgs with SA, not just spam
 my $maxsize = 64; # max. msg size to scan with SA, in KB.
 my $rh = 0; # log which rules were hit
@@ -1078,9 +1084,9 @@ Options:
   --pid=filename           Store the daemon's process ID in this file. 
                                Default is /var/run/spampd.pid
   --user=username          Specifies the user that the daemon runs as.
-                               Default is mail.
+                               Default is _spampd.
   --group=groupname        Specifies the group that the daemon runs as.
-                               Default is mail.
+                               Default is _spampd.
   --nodetach               Don't detach from the console and fork into
                                background. Useful for some daemon control
                                tools or when running as a win32 service
@@ -1414,7 +1420,7 @@ Spevifies what UNIX socket spampd will relay to. If th
 =item B<--group=groupname> or  B<--g=groupname>
 
 Specifies the user and group that the proxy will run as. Default is
-I<mail>/I<mail>.
+I<_spampd>/I<_spampd>.
 
 =item B<--children=n> or B<--c=n>
 
@@ -1553,7 +1559,7 @@ Things like the auto-whitelist and other plugin (razor
 written to here.
 Defaul is /var/spool/spamassassin/spampd.  A good place for this is in the same
 place your bayes_path SA config setting points to (if any).  Make sure this
-directory is accessible to the user that spampd is running as (default: mail).
+directory is accessible to the user that spampd is running as (default: _spampd).
 New in v2.40. Thanks to Alexander Wirt for this fix.
 
 =item B<--saconfig=filename>
