539 |
@node Security Settings, , Encryption Settings, CONTROL Section |
@node Security Settings, , Encryption Settings, CONTROL Section |
540 |
@subsection Security Settings |
@subsection Security Settings |
541 |
|
|
542 |
|
The following options control various security settings. |
543 |
|
|
544 |
@deffn Option allow-local-mta @var{yes-or-no} |
@deffn Option allow-local-mta @var{yes-or-no} |
545 |
@opindex allow-local-mta @var{yes-or-no} |
@opindex allow-local-mta @var{yes-or-no} |
546 |
For security reasons, this option is set to @samp{no}, but the @samp{yes} |
For security reasons, this option is set to @samp{no}, but the @samp{yes} |
547 |
value enables the @samp{local-mta} keyword (or @samp{--local-mta} |
value enables the @samp{local-mta} keyword (or @samp{--local-mta} |
548 |
command line option), so if you want to use a local mail server, |
command line option), so if you want to use a local mail server, |
549 |
which works on standard input and output, a supervisor must set |
which works on standard input and output, a supervisor must set |
550 |
this option to @samp{yes}. Only in system configuration file. |
this option to @samp{yes}. The option is available only in system |
551 |
|
configuration file. |
552 |
@end deffn |
@end deffn |
553 |
|
|
554 |
@deffn Option drop-unknown-user @var{yes-or-no} |
@deffn Option drop-unknown-user @var{yes-or-no} |
561 |
@opindex user-notprivileged @var{username} |
@opindex user-notprivileged @var{username} |
562 |
For security reasons, it is recommended to create an unprivileged user, |
For security reasons, it is recommended to create an unprivileged user, |
563 |
which the server runs as most of the time, when doing unprivileged |
which the server runs as most of the time, when doing unprivileged |
564 |
operations. Only in system configuration file. For example: |
operations. The option is available only in system |
565 |
|
configuration file. For example: |
566 |
|
|
567 |
@smallexample |
@smallexample |
568 |
user-notprivileged "anubis.unprivileged" |
user-notprivileged "anubis.unprivileged" |
573 |
@w{@file{/etc/anubis.allow}}, if using GNU Anubis with PAM support. |
@w{@file{/etc/anubis.allow}}, if using GNU Anubis with PAM support. |
574 |
@end deffn |
@end deffn |
575 |
|
|
576 |
|
@deffn Option rule-priority @var{value} |
577 |
|
@opindex rule-priority @var{value} |
578 |
|
|
579 |
|
This statement defines the order of execution of the system and user |
580 |
|
@code{RULE} sections (@xref{Rule System}, for detailed description). |
581 |
|
It is available only in system configuration file. |
582 |
|
|
583 |
|
@table @code |
584 |
|
@item system |
585 |
|
The system section is executed first, then the user section is executed. |
586 |
|
|
587 |
|
@item user |
588 |
|
The user section is executed first, next the system section is executed. |
589 |
|
|
590 |
|
@item system-only |
591 |
|
Only the system @code{RULE} section is executed. |
592 |
|
|
593 |
|
@item user-only |
594 |
|
Only the user @code{RULE} section is executed. |
595 |
|
@end table |
596 |
|
@end deffn |
597 |
|
|
598 |
|
@deffn Option control-priority @var{value} |
599 |
|
@opindex control-priority @var{value} |
600 |
|
|
601 |
|
Sets the order of processing the @code{CONTROL} sections. The option is |
602 |
|
available only in system configuration file. Its possible values are: |
603 |
|
|
604 |
|
@table @code |
605 |
|
@item system |
606 |
|
The system @code{CONTROL} section is processed first. Notice, that |
607 |
|
this means that the user may override the system settings in his |
608 |
|
configuration file. This is the default setting. |
609 |
|
|
610 |
|
@item user |
611 |
|
The user @code{CONTROL} section is processed first. Thus, the |
612 |
|
system-wide settings always override the user private settings. |
613 |
|
@end table |
614 |
|
@end deffn |
615 |
|
|
616 |
@node TRANSLATION Section, GUILE Section, CONTROL Section, Configuration |
@node TRANSLATION Section, GUILE Section, CONTROL Section, Configuration |
617 |
@section TRANSLATION Section |
@section TRANSLATION Section |
834 |
Note also, that in the examples above any of the statements |
Note also, that in the examples above any of the statements |
835 |
@var{action-list} may contain conditionals, so that the conditional |
@var{action-list} may contain conditionals, so that the conditional |
836 |
statements may be nested. This allows to create very sophisticated |
statements may be nested. This allows to create very sophisticated |
837 |
rule sets. |
rule sets. As an example, consider the following statement: |
838 |
|
|
839 |
[FIXME: elaborate on this. Provide an example] |
@smallexample |
840 |
|
if [List-Id] :re ".*<anubis-commit@@gnu.org>" |
841 |
|
modify [Subject] "[Anubis Commit Notice] &" |
842 |
|
else |
843 |
|
if [List-Id] :re ".*<bug-anubis@@gnu.org>" |
844 |
|
modify [Subject] "[Anubis Bug Notice] &" |
845 |
|
else |
846 |
|
add [X-Passed] "Subject checking" |
847 |
|
fi |
848 |
|
fi |
849 |
|
@end smallexample |
850 |
|
|
851 |
|
This statement, depending on the value of @code{List-Id} header, will |
852 |
|
prepend the @code{Subject} header with an identification string, or add |
853 |
|
an @code{X-Passed} header if no known @code{List-Id} was found. |
854 |
|
|
855 |
@node Triggers, Boolean Operators, Conditional Statements, Rule System |
@node Triggers, Boolean Operators, Conditional Statements, Rule System |
856 |
@section Triggers |
@section Triggers |
862 |
|
|
863 |
@smallexample |
@smallexample |
864 |
@group |
@group |
865 |
rule [@var{flags}] @var{pattern} |
trigger [@var{flags}] @var{pattern} |
866 |
@var{action-list} |
@var{action-list} |
867 |
done |
done |
868 |
@end group |
@end group |
871 |
@noindent |
@noindent |
872 |
Here, @var{pattern} is the pattern against which the @samp{Subject} |
Here, @var{pattern} is the pattern against which the @samp{Subject} |
873 |
header is checked, @var{flags} are optional flags controlling the |
header is checked, @var{flags} are optional flags controlling the |
874 |
type of regular expression used (@pxref{Regular Expressions}). |
type of regular expression used (@pxref{Regular Expressions}). For |
875 |
|
backward compatibility, the keyword @code{rule} may be used instead |
876 |
|
of @code{trigger}. |
877 |
|
|
878 |
The triggers act as follows: First, the value of the @samp{Subject} header is |
The triggers act as follows: First, the value of the @samp{Subject} header is |
879 |
matched against the pattern @samp{@@@@}@var{pattern}. If it matches, |
matched against the pattern @samp{@@@@}@var{pattern}. If it matches, |
899 |
@smallexample |
@smallexample |
900 |
@group |
@group |
901 |
---BEGIN RULE--- |
---BEGIN RULE--- |
902 |
rule :basic "^gpg-encrypt-john" |
trigger :basic "^gpg-encrypt-john" |
903 |
gpg-encrypt "john's_gpg_key" |
gpg-encrypt "john's_gpg_key" |
904 |
done |
done |
905 |
---END--- |
---END--- |
919 |
@smallexample |
@smallexample |
920 |
@group |
@group |
921 |
---BEGIN RULE--- |
---BEGIN RULE--- |
922 |
rule :extended "^gpg-encrypt:(.*)" |
trigger :extended "^gpg-encrypt:(.*)" |
923 |
gpg-encrypt "\1" |
gpg-encrypt "\1" |
924 |
add [X-GPG-Comment] "Encrypted for \1" |
add [X-GPG-Comment] "Encrypted for \1" |
925 |
done |
done |
1130 |
if header[Subject] "Re: .*" |
if header[Subject] "Re: .*" |
1131 |
stop; |
stop; |
1132 |
fi |
fi |
1133 |
rule "pgp" |
trigger "pgp" |
1134 |
gpg-encrypt "my_gpg_key" |
gpg-encrypt "my_gpg_key" |
1135 |
done |
done |
1136 |
END |
END |
1235 |
|
|
1236 |
@noindent |
@noindent |
1237 |
This statement sets the new value to the @code{Subject} header. |
This statement sets the new value to the @code{Subject} header. |
1238 |
|
|
1239 |
|
Every occurrence of unescaped @samp{&} in the new value will be replaced |
1240 |
|
by the old header value. For example, the following statement |
1241 |
|
|
1242 |
|
@smallexample |
1243 |
|
modify [Subject] "[Anubis \& others] &" |
1244 |
|
@end smallexample |
1245 |
|
|
1246 |
|
@noindent |
1247 |
|
prepends the @code{Subject} header with the string @samp{[Anubis & |
1248 |
|
others]}. Thus, the header line |
1249 |
|
|
1250 |
|
@smallexample |
1251 |
|
Subject: Test subject |
1252 |
|
@end smallexample |
1253 |
|
|
1254 |
|
@noindent |
1255 |
|
|
1256 |
|
after having been processed by Anubis, will contain: |
1257 |
|
|
1258 |
|
@smallexample |
1259 |
|
Subject: [Anubis & others] Test subject |
1260 |
|
@end smallexample |
1261 |
|
|
1262 |
@end deffn |
@end deffn |
1263 |
|
|
1264 |
@deffn Command modify [@var{flags}] header @samp{[}@var{key}@samp{]} @samp{[}@var{new-key}@samp{]} @var{value} |
@deffn Command modify [@var{flags}] header @samp{[}@var{key}@samp{]} @samp{[}@var{new-key}@samp{]} @var{value} |
1618 |
|
|
1619 |
@smallexample |
@smallexample |
1620 |
@group |
@group |
1621 |
rule "rot-13.*body" |
trigger "rot-13.*body" |
1622 |
guile-process rot-13 #:body |
guile-process rot-13 #:body |
1623 |
done |
done |
1624 |
|
|
1625 |
rule "rot-13.*subj" |
trigger "rot-13.*subj" |
1626 |
guile-process rot-13 #:subject |
guile-process rot-13 #:subject |
1627 |
done |
done |
1628 |
@end group |
@end group |
1680 |
|
|
1681 |
@smallexample |
@smallexample |
1682 |
@group |
@group |
1683 |
rule "remail:(.*)/(.*)" |
trigger "remail:(.*)/(.*)" |
1684 |
guile-process remailer-I \ |
guile-process remailer-I \ |
1685 |
#:rrt antonius_block@@helsingor.net \ |
#:rrt antonius_block@@helsingor.net \ |
1686 |
#:post \1 \ |
#:post \1 \ |