0
|
1 divert(-1) |
|
2 # |
|
3 # This feature causes sendmail to check with a local DCCM deamon about |
|
4 # all incoming mail |
|
5 # |
|
6 # Use this file by copying it to your sendmail/cf/feature directory |
|
7 # and by adding a line like the following to your sendmail.mc configuration |
|
8 # file: |
|
9 # `FEATURE(dcc)' |
|
10 # |
|
11 # To change the default milter failture settings or timeouts as described |
|
12 # in the sendmail milter README file, use something like: |
|
13 # `FEATURE(dcc,``F=T, T=C:30s;S:30s;R:30s;E:30s'')' |
|
14 # The default parameters wait 30 seconds for the initial connection from |
|
15 # sendmail to dccm (C), 30 seconds sendmail sending (S) as well as receiving |
|
16 # responses (R) from dccm, and 30 seconds for dccm to check the message |
|
17 # at its end (E). |
|
18 # Adding "F=T" to the parameters cases sendmail to give SMTP clients |
|
19 # a temporary failure when dccm fails. "F=R" causes sendmail to reject |
|
20 # mail when dccm fails. When neither "F=T" nor "F=R" is present, sendmail |
|
21 # quietly accepts the message if dccm fails or is absent. |
|
22 # (A failure by dccm would be a serious bug.) |
|
23 # misc/hackmc changes the default to "F=T". |
|
24 # |
|
25 # To use common directories and whiteclnt files for mail relayed to domains |
|
26 # listed in /etc/mail/relay-domains, use a third argument as in |
|
27 # `FEATURE(dcc, , ``local'')' |
|
28 # If domain.com is in the relay-domains, file, then mail for all users |
|
29 # forwarded there will use userdirs/local/domain.com/whiteclnt and |
|
30 # userdirs/local/domain.com/log. |
|
31 # |
|
32 # To connect dccm to sendmail via TCP or use a UNIX domain socket |
|
33 # other than @dcc_rundir@/dccm, or other fancy changes, consider modifying |
|
34 # this file or the resulting sendmail.cf file. |
|
35 # |
|
36 # See also @libexecdir@/hackmc |
|
37 # |
|
38 # @configure_input@ |
|
39 |
|
40 |
|
41 divert(0) |
|
42 VERSIONID(`dcc.m4 Rhyolite Software DCC 1.3.103-1.14 $Revision$') |
|
43 divert(-1) |
|
44 |
|
45 ifdef(`_DCC_DEF_',`',`dnl |
|
46 dnl define map to communicate blacklist results to DCC via dccm |
|
47 define(_NEED_MACRO_MAP_,1)dnl |
|
48 dnl set Xdcc milter parameters |
|
49 define(`_DCC_DEF_', ifelse(len(X`'_ARG_), `1', ``, T=C:30s;S:30s;R:30s;E:30s'', |
|
50 ``,' _ARG_'))dnl |
|
51 dnl Sendmail version 8.11 requires _FFR_MILTER |
|
52 define(`_FFR_MILTER',`')dnl |
|
53 dnl |
|
54 dnl always pass the DCC is/notspam macros to not need FEATURE(`delay_checks') |
|
55 define(`confMILTER_MACROS_CONNECT',confMILTER_MACROS_CONNECT``, {dcc_isspam}, {dcc_notspam}'')dnl |
|
56 define(`confMILTER_MACROS_ENVFROM',confMILTER_MACROS_ENVFROM``, {dcc_isspam}, {dcc_notspam}, {dcc_mail_host}'')dnl |
|
57 define(`confMILTER_MACROS_ENVRCPT',confMILTER_MACROS_ENVRCPT``, {dcc_isspam}, {dcc_notspam}, {dcc_userdir}'')dnl |
|
58 define(`confMILTER_MACROS_EOM',confMILTER_MACROS_EOM``, {dcc_isspam}, {dcc_notspam}'')dnl |
|
59 INPUT_MAIL_FILTER(`dcc', ``S=unix:@dcc_rundir@/dccm'_DCC_DEF_')'dnl |
|
60 dnl |
|
61 `LOCAL_RULESETS |
|
62 # Define a macro for dccm that has the SMTP client host name even if |
|
63 # a smart relay is used. |
|
64 # This works only if ``FEATURE(delay_checks)'' is not used. |
|
65 SLocal_check_mail |
|
66 R$* $: $1 $| $>canonify $1 |
|
67 R$* $| $* < @$* > $* $: $1 $| $3 |
|
68 R$* $| $* $: $1 $(macro {dcc_mail_host} $@ $2 $)' |
|
69 ifelse(len(X`'_ARG2_), `1', ``dnl'',`` |
|
70 # use _ARG2_/domain.name/whiteclnt and _ARG2_/domain.name/log for the |
|
71 # DCC whitelist and log directory for relayed mail |
|
72 SLocal_check_rcpt |
|
73 R$* $: $1 $| $>canonify $1 |
|
74 R$* $| $*<@ $*$=R .> $* $: $1 $(macro {dcc_userdir} $@ _ARG2_/$4 $) |
|
75 R$* $| $*<@ $ $=R > $* $: $1 $(macro {dcc_userdir} $@ _ARG2_/$4 $)'')) |