@@ -55,6 +55,7 @@ Options:
55
55
--maxrequests or -r <n> Maximum requests that each child can process.
56
56
--childtimeout <n> Time out children after this many seconds.
57
57
--satimeout <n> Time out SpamAssassin after this many seconds.
58
+ --child-name-template [s] Template for formatting child process name.
58
59
59
60
--pid or -p <filename> Store the daemon's process ID in this file.
60
61
--user or -u <user> Specifies the user that the daemon runs as.
@@ -70,7 +71,7 @@ Options:
70
71
--set-envelope-from Set X-Envelope-From header only.
71
72
72
73
--local-only or -L Turn off all SA network-based tests.
73
- --homedir path Use the specified directory as SA home.
74
+ --homedir < path> Use the specified directory as SA home.
74
75
--saconfig <filename> Use the file for SA "user_prefs" configuration.
75
76
76
77
--logfile or -o <dest> Destination for logs (syslog|stderr|<filename>).
@@ -215,11 +216,19 @@ to peruse the MIAB L<setup|https://github.com/mail-in-a-box/mailinabox/tree/mast
215
216
L<configuration|https://github.com/mail-in-a-box/mailinabox/tree/master/conf> files for reference.
216
217
217
218
All I<spampd> options have reasonable defaults, especially for a Postfix-centric
218
- installation. You may want to specify the --children option if you have an
219
+ installation. You may want to specify the C<--max-servers> option if you have an
219
220
especially beefy or weak server box because I<spampd> is a memory-hungry
220
221
program. Check the L<"Options"> for details on this and all other parameters.
221
222
222
- Note that B<I<spampd> replaces I<spamd>> from the I<SpamAssassin> distribution
223
+ To show default values for all options, run C<spampd --show defaults>.
224
+
225
+ B<Since v2.61> I<spampd> injects a C<_SPAMPDVERSION_>
226
+ L<"template tag"|https://spamassassin.apache.org/doc/Mail_SpamAssassin_Conf.html#TEMPLATE-TAGS>
227
+ macro at message processing time. This can be used in an C<add_header> SA config file directive, for example.
228
+
229
+ add_header all Filter-Version SpamAssassin _VERSION_ (_SUBVERSION_, Rules: _RULESVERSION_) / SpamPD _SPAMPDVERSION_
230
+
231
+ Note that B< I<spampd> replaces I<spamd> > from the I<SpamAssassin> distribution
223
232
in function. You do not need to run I<spamd> in order for I<spampd> to work.
224
233
This has apparently been the source of some confusion, so now you know.
225
234
@@ -303,6 +312,7 @@ Also note that v2.60 added the ability to use a L</"CONFIGURATION FILE"> for spe
303
312
[--max-servers | -mxs <n>] [--maxsize <n> ] [--[no]detach ]
304
313
[--maxrequests | -r <n>] [--local-only | -L ] [--[no]setsid ]
305
314
[--childtimeout <n>] [--tagall | -a ] [--log-rules-hit | -rh]
315
+ [ --child-name-template | -cnt [<template>] ] [--homedir <path> ]
306
316
[ [--set-envelope-headers | -seh] | [--set-envelope-from | -sef] ]
307
317
308
318
[ --logfile | -o (syslog|stderr|<filename>) ][...]
@@ -326,7 +336,7 @@ same option loaded from config file(s).
326
336
Please be sure to also read the general information about specifying option
327
337
arguments in the above L</"USAGE"> section.
328
338
329
- To show default values for all options, run C<spampd --show defaults>.
339
+ To view B< default values> for all options, run C<spampd --show defaults>.
330
340
331
341
=over 5
332
342
@@ -360,9 +370,9 @@ public interface (IP address) unless you know exactly what you're doing!
360
370
361
371
=item B<--port> I<<n>>
362
372
363
- Specifies what port I<spampd> listens on. By default, it listens on
364
- port 10025. This is an alternate to using the above --host=ip:port notation.
365
- Note that a I<port> specified in the C<--host> option will override this one.
373
+ Specifies what port I<spampd> listens on. This is an alternate to using the above
374
+ C<--host=ip: port> notation. Note that a I<port> specified in the C< --host> option
375
+ will override this one.
366
376
367
377
368
378
=item B<--socket> I<<socketpath>>
@@ -380,8 +390,7 @@ format, e.g. 700 to specify acces only for the user I<spampd> is run as.
380
390
=item B<--relayhost> I<< (<ip>|<hostname>)[:<port>] >>
381
391
382
392
Specifies the hostname/IP to which I<spampd> will relay all
383
- messages. Defaults to 127.0.0.1 (localhost). If the port is not provided, that
384
- defaults to 25.
393
+ messages. Defaults to 127.0.0.1 (localhost) on port 25.
385
394
386
395
As of v2.60 this option can also handle IPv6 addresses in the form of
387
396
C<--relayhost n:n:n> or, with port, C<--relayhost [n:n:n]:port> (the square brackets
@@ -392,7 +401,7 @@ Note that the I<port> specified this way implicitly overrides the C<--relayport>
392
401
393
402
=item B<--relayport> I<<n>>
394
403
395
- Specifies what port I<spampd> will relay to. Default is 25. This is an
404
+ Specifies what port I<spampd> will relay to. This is an
396
405
alternate to using the above --relayhost=ip:port notation. Note that a I<port>
397
406
specified in the C<--relayhost> option will override this one.
398
407
@@ -429,7 +438,7 @@ and C<--max-servers>, based on demand.
429
438
You may want to set your origination mail server to limit the
430
439
number of concurrent connections to I<spampd> to match this setting (for
431
440
Postfix this is the C<xxxx_destination_concurrency_limit> setting where
432
- 'xxxx' is the transport being used, usually 'smtp', and the default is 100 ).
441
+ 'xxxx' is the transport being used, usually 'smtp' or 'lmtp' ).
433
442
434
443
See also C<--min-servers>, C<--min-spare>, and C<--max-spare> options.
435
444
@@ -471,7 +480,7 @@ I<spampd> works by forking child servers to handle each message. The
471
480
B<maxrequests> parameter specifies how many requests will be handled
472
481
before the child exits. Since a child never gives back memory, a large
473
482
message can cause it to become quite bloated; the only way to reclaim
474
- the memory is for the child to exit. The default is 20.
483
+ the memory is for the child to exit.
475
484
476
485
477
486
=item B<--childtimeout> I<<n>>
@@ -481,29 +490,68 @@ a transaction. In an S/LMTP transaction the timer is reset for every command.
481
490
This timeout includes time it would take to send the message data, so it should
482
491
not be too short. Note that it's more likely the origination or destination
483
492
mail servers will timeout first, which is fine. This is just a "sane" failsafe.
484
- Default is 360 seconds (6 minutes).
485
493
486
494
487
495
=item B<--satimeout> I<<n>>
488
496
489
497
This is the number of seconds to allow for processing a message with
490
498
SpamAssassin (including feeding it the message, analyzing it, and adding
491
499
the headers/report if necessary).
500
+
492
501
This should be less than your origination and destination servers' timeout
493
- settings for the DATA command. For Postfix the default is 300 seconds in both
494
- cases (smtp_data_done_timeout and smtpd_timeout). In the event of timeout
495
- while processing the message, the problem is logged and the message is passed
496
- on anyway (w/out spam tagging, obviously). To fail the message with a temp
497
- 450 error, see the --dose (die-on-sa-errors) option, below.
498
- Default is 285 seconds.
502
+ settings for the DATA command. (For Postfix this is set in C<(smtp|lmtp)_data_done_timeout>
503
+ and C<smtpd_timeout>). In the event of timeout while processing the message, the problem is
504
+ logged and the message is passed on anyway (w/out spam tagging, obviously). To fail the
505
+ message with a temp 450 error, see the C<--dose> (die-on-sa-errors) option, below.
506
+
507
+
508
+ =item B<--child-name-template> or B<-cnt> I<[<template>]> C<new in v2.61>
509
+
510
+ Template for formatting child process name. Use a blank string (just the argument name
511
+ without a value) to leave the child process name unchanged (will be same as parent command line).
512
+
513
+ The template uses C<printf()> style formatting, but with named parameter placeholders.
514
+ For example (wrapped for clarity):
515
+
516
+ %base_name: child #%child_count(%child_status)
517
+ [req %req_count/%req_max, time lst/avg/ttl %(req_time_last).4f/%(req_time_avg).4f/%(req_time_ttl).4f,
518
+ ham/spm %req_ham/%req_spam, rules v%sa_rls_ver)]'
519
+
520
+ Would produce something like:
521
+
522
+ spampd: child #4(D) [req 8/30, time lst/avg/ttl 0.0222/0.0256/0.2045, ham/spm 3/5, rules v1891891]
523
+
524
+ Parameters are specified like: "Value of %(my_name)s is %(my_float_value).4f", with names
525
+ in parenthesis followed by standard a C<printf()> style formatting specifier (C<s> is default),
526
+ or simply as "Value of %my_name is %my_value" with the default format being a string
527
+ (works for numerics also).
528
+
529
+ The following variables are available:
530
+
531
+ base_name # Base script name, eg. "spampd"
532
+ spampd_ver # SpamPD version, eg. "2.61"
533
+ perl_ver # Perl version, eg. "5.28.1"
534
+ ns_ver # Net::Server version, eg. "2.009"
535
+ ns_typ # Net::Server type, "PreFork" or "PreForkSimple"
536
+ ns_typ_acr # Net::Server type acronym, "PF" or "PFS"
537
+ sa_ver # SpamAassassin version, eg. "3.4.2"
538
+ sa_rls_ver # SpamAassassin rules update version, eg. "1891891" or "(unknown)"
539
+ child_count # total number of children launched so far (current child number)
540
+ child_status # child status, "C" for connected, or "D" for disconnected
541
+ req_count # number of requests child has processed so far
542
+ req_max # maximum child requests before exit
543
+ req_time_last # [s] time to process the last message
544
+ req_time_ttl # [s] total processing time for this child
545
+ req_time_avg # [s] average processing time for this child (req_time_ttl / req_count)
546
+ req_ham # count of ham messages scored by child
547
+ req_spam # count of spam messages scored by child
499
548
500
549
501
550
=item B<--pid> or B<-p> I<<filename>>
502
551
503
552
Specifies a filename where I<spampd> will write its process ID so
504
553
that it is easy to kill it later. The directory that will contain this
505
- file must be writable by the I<spampd> user. The default is
506
- F</var/run/spampd.pid>.
554
+ file must be writable by the I<spampd> user.
507
555
508
556
509
557
=item B<--logfile> or B<-o> I<< (syslog|stderr|<filename>) >> C<new in v2.60>
@@ -567,20 +615,18 @@ The default was C<unix> except on HP-UX and SunOS (Solaris) systems it is C<inet
567
615
568
616
=item B<--logident> or B<-li> I<<name>> C<new in v2.60>
569
617
570
- Syslog identity name to use. This may also be used in log files written directly (w/out syslog). Default is C<spampd>.
618
+ Syslog identity name to use. This may also be used in log files written directly (w/out syslog).
571
619
572
620
573
621
=item B<--logfacility> or B<-lf> I<<name>> C<new in v2.60>
574
622
575
- Syslog facility name to use. This is typically the name of the system-wide log file to be written to. Default is C<mail>.
623
+ Syslog facility name to use. This is typically the name of the system-wide log file to be written to.
576
624
577
625
578
626
=item B<--[no]detach> I<[0|1]> C<new in v2.20>
579
627
580
- By default I<spampd> will detach from the console and fork into the
581
- background ("daemonize"). Use C<--nodetach> to override this.
582
- This can be useful for running under control of some daemon
583
- management tools or testing from a command line.
628
+ Tells I<spampd> to detach from the console and fork into the background ("daemonize").
629
+ Using C<--nodetach> can be useful for running under control of some daemon management tools or testing from a command line.
584
630
585
631
586
632
=item B<--[no]setsid> I<[0|1]> C<new in v2.51>
@@ -592,25 +638,25 @@ daemonize. Only used if C<--nodetach> isn't specified.
592
638
593
639
=item B<--maxsize> I<<n>>
594
640
595
- The maximum message size to send to SpamAssassin, in KBytes. By default messages
596
- over 64KB are not scanned at all, and an appropriate message is logged
641
+ The maximum message size to send to SpamAssassin, in KBytes. Messages
642
+ over this size are not scanned at all, and an appropriate message is logged
597
643
indicating this. The size includes headers and attachments (if any).
598
644
599
645
600
646
=item B<--dose> I<[0|1]>
601
647
602
- Acronym for (d)ie (o)n (s)pamAssassin (e)rrors. By default if I<spampd>
603
- encounters a problem with processing the message through Spam Assassin (timeout
604
- or other error), it will still pass the mail on to the destination server. If
605
- you specify this option however , the mail is instead rejected with a temporary
606
- error (code 450, which means the origination server should keep retrying to send
607
- it). See the related --satimeout option, above.
648
+ Acronym for (d)ie (o)n (s)pamAssassin (e)rrors. When disabled and I<spampd>
649
+ encounters a problem with processing the message through SpamAssassin (timeout
650
+ or other error), it will still pass the mail on to the destination server.
651
+ When enabled , the mail is instead rejected with a temporary error (code 450,
652
+ which means the origination server should keep retrying to send it). See the
653
+ related C< --satimeout> option, above.
608
654
609
655
610
656
=item B<--tagall> or B<-a> I<[0|1]>
611
657
612
658
Tells I<spampd> to have SpamAssassin add headers to all scanned mail,
613
- not just spam. By default I<spampd> will only rewrite messages which
659
+ not just spam. Otherwise I<spampd> will only rewrite messages which
614
660
exceed the spam threshold score (as defined in the SA settings). Note that
615
661
for this option to work as of SA-2.50, the I<always_add_report> and/or
616
662
I<always_add_headers> settings in your SpamAssassin F<local.cf> need to be
@@ -653,18 +699,18 @@ Turn off all SA network-based tests (DNS, Razor, etc).
653
699
654
700
Use the specified directory as home directory for the spamassassin process.
655
701
Things like the auto-whitelist and other plugin (razor/pyzor) files get
656
- written to here.
657
- Default is /var/spool/spamassassin/spampd. A good place for this is in the same
658
- place your bayes_path SA config setting points to (if any). Make sure this
659
- directory is accessible to the user that spampd is running as (default: mail).
702
+ written to here. A good place for this is in the same
703
+ place your C<bayes_path> SA config setting points to (if any). Make sure this
704
+ directory is accessible to the user that spampd is running as.
705
+
660
706
Thanks to Alexander Wirt for this fix.
661
707
662
708
663
709
=item B<--saconfig> I<<filename>>
664
710
665
711
Use the specified file for SpamAssassin configuration options in addition to the
666
712
default local.cf file. Any options specified here will override the same
667
- option from local.cf. Default is to not use any additional configuration file.
713
+ option from local.cf.
668
714
669
715
670
716
=item B<--debug> or B<-d> I<< [<area,...>|1|0] >> C<(updated in v2.60)>
@@ -677,7 +723,7 @@ to 4 (debug), adding yet more info (but not too much) (new in v2.2).
677
723
C<New in v2.60:>
678
724
679
725
Setting the value to 1 (one) is the same as using no parameter (eg. simply I<-d>).
680
- The value of 0 (zero) disables debug logging (this is the default) .
726
+ The value of 0 (zero) disables debug logging.
681
727
682
728
The I<area> list is passed on directly to SpamAssassin and controls logging
683
729
facilities. If no I<area>s are listed (and debug logging is enabled), all
@@ -986,15 +1032,18 @@ permissions on the relaysocket!
986
1032
=head1 CREDITS
987
1033
988
1034
I<spampd> is written and maintained by Maxim Paperno <
[email protected] >.
989
- See L<http://www.WorldDesign.com/index.cfm/rd/mta/spampd.htm> for latest info.
1035
+ The open source code repository is located at L<https://github.com/mpaperno/spampd/>.
1036
+ See L<http://www.WorldDesign.com/index.cfm/rd/mta/spampd.htm> for historical info.
990
1037
991
- I<spampd> v2 uses two Perl modules by Bennett Todd and Copyright (C) 2001 Morgan
992
- Stanley Dean Witter. These are distributed under the GNU GPL (see
993
- module code for more details). Both modules have been slightly modified
994
- from the originals and are included in this file under new names.
1038
+ I<spampd> v2 uses two Perl modules (I<MSDW::SMTP::Client> and I<MSDW::SMTP::Server>)
1039
+ by Bennett Todd and Copyright (C) 2001 Morgan Stanley Dean Witter.
1040
+ These are distributed under the GNU GPL (see module code for more details).
1041
+ Both modules have been slightly modified from the originals and are included in
1042
+ this file under new names (I<SpamPD::Client> and I<SpamPD::Server>, respectively).
995
1043
996
- Also thanks to Bennett Todd for the example smtpproxy script which helped create
997
- this version of I<spampd>. See http://bent.latency.net/smtpprox/ .
1044
+ Also thanks to Bennett Todd for the example I<smtpproxy> script which helped create
1045
+ this version of I<spampd>. See L<http://bent.latency.net/smtpprox/> (seems to be down)
1046
+ or L<https://github.com/jnorell/smtpprox>.
998
1047
999
1048
I<spampd> v1 was based on code by Dave Carrigan named I<assassind>. Trace
1000
1049
amounts of his code or documentation may still remain. Thanks to him for the
@@ -1019,8 +1068,7 @@ See also: L<https://github.com/mpaperno/spampd/graphs/contributors/>
1019
1068
1020
1069
=head1 COPYRIGHT, LICENSE, AND DISCLAIMER
1021
1070
1022
- I<spampd> is Copyright (c) 2002-2006, 2009-2010, 2013, 2018-2019 Maxim Paperno;
1023
- All Rights Reserved.
1071
+ I<spampd> is Copyright (c) Maxim Paperno; All Rights Reserved.
1024
1072
1025
1073
Portions are Copyright (c) 2001 Morgan Stanley Dean Witter as mentioned above
1026
1074
in the Credits section.
@@ -1109,7 +1157,7 @@ L<Integrating SpamAssassin into Postfix using spampd|https://wiki.apache.org/spa
1109
1157
return word.replace(word[0], word[0].toUpperCase());
1110
1158
}).join(' ');
1111
1159
};
1112
- var list = document.querySelectorAll("a[href*=podtop] h1, ul#index > li > a, h1 a.u, li.indexItem1 > a");
1160
+ var list = document.querySelectorAll("a[href*=podtop] h1, ul#index > li > a, h1 a.u, body > h1[id], li.indexItem1 > a");
1113
1161
for (let item of list)
1114
1162
item.innerText = titleCase(item.innerText);
1115
1163
}
0 commit comments