7 /* internal mail filter control
9 /* #include <int_filt.h>
11 /* int int_filt_flags(class)
14 /* int_filt_flags() determines the appropriate mail filtering
15 /* flags for the cleanup server, depending on the setting of
16 /* the internal_mail_filter_classes configuration parameter.
18 /* Specify one of the following:
19 /* .IP INT_FILT_MASK_NONE
20 /* Mail that must be excluded from inspection (address probes, etc.).
21 /* .IP INT_FILT_MASK_NOTIFY
22 /* Postmaster notifications from the smtpd(8) and smtp(8)
24 /* .IP INT_FILT_MASK_BOUNCE
25 /* Delivery status notifications from the bounce(8) server.
27 /* Fatal: invalid mail category name.
31 /* The Secure Mailer license must be distributed with this software.
34 /* IBM T.J. Watson Research
36 /* Yorktown Heights, NY 10598, USA
43 /* Utility library. */
45 #include <name_mask.h>
50 #include <mail_params.h>
51 #include <cleanup_user.h>
54 /* int_filt_flags - map mail class to submission flags */
56 int int_filt_flags(int class)
58 static const NAME_MASK table
[] = {
59 INT_FILT_CLASS_NOTIFY
, INT_FILT_MASK_NOTIFY
,
60 INT_FILT_CLASS_BOUNCE
, INT_FILT_MASK_BOUNCE
,
63 int filtered_classes
= 0;
65 if (class && *var_int_filt_classes
) {
67 name_mask(VAR_INT_FILT_CLASSES
, table
, var_int_filt_classes
);
68 if (filtered_classes
== 0)
69 msg_warn("%s: bad input: %s", VAR_INT_FILT_CLASSES
,
70 var_int_filt_classes
);
71 if (filtered_classes
& class)
72 return (CLEANUP_FLAG_FILTER
| CLEANUP_FLAG_MILTER
);