Deleted Added
sdiff udiff text old ( 73188 ) new ( 77349 )
full compact
1This directory contains the source files for libmilter.
2
3The sendmail Mail Filter API (Milter) is designed to allow third-party
4programs access to mail messages as they are being processed in order to
5filter meta-information and content.
6
7This README file describes the steps needed to compile and run a filter,
8through reference to a sample filter which is attached at the end of this
9file. It is necessary to first build libmilter.a, which can be done by
10issuing the './Build' command in SRCDIR/libmilter .
11
12NOTE: Both libmilter and the callouts in sendmail are marked as an FFR (For
13Future Release). If you intend to use them in 8.11.X, you must compiled
14both libmilter and sendmail with -D_FFR_MILTER defined. You can do this by
15adding the following to your devtools/Site/site.config.m4 file:
16
17 dnl Milter
18 APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_MILTER=1')
19 APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER=1')
20
21You will also need to define _FFR_MILTER when building your .cf file using

--- 70 unchanged lines hidden (view full) ---

92Note the separator between each is a ';' as a ',' already separates equates
93and therefore can't separate timeouts. The default values (if not set in the config) are:
94
95T=S:10s;R:10s;E:5m
96
97where 's' is seconds and 'm' is minutes.
98
99Which filters are invoked and their sequencing is handled by the
100InputMailFilters option. Note: if InputMailFilters is not defined no filters
101will be used.
102
103 O InputMailFilters=filter1, filter2, filter3
104
105This is is set automatically according to the order of the
106INPUT_MAIL_FILTER commands in your .mc file. Alternatively, you can
107reset its value by setting confINPUT_MAIL_FILTERS in your .mc file.
108This options causes the three filters to be called in the same order
109they were specified. It allows for possible future filtering on output

--- 109 unchanged lines hidden (view full) ---

219extern sfsistat mlfi_cleanup(SMFICTX *, bool);
220
221sfsistat
222mlfi_envfrom(ctx, envfrom)
223 SMFICTX *ctx;
224 char **envfrom;
225{
226 struct mlfiPriv *priv;
227 int fd = -1;
228
229 /* allocate some private memory */
230 priv = malloc(sizeof *priv);
231 if (priv == NULL)
232 {
233 /* can't accept this message right now */
234 return SMFIS_TEMPFAIL;
235 }

--- 4 unchanged lines hidden (view full) ---

240 if (priv->mlfi_fname == NULL)
241 {
242 free(priv);
243 return SMFIS_TEMPFAIL;
244 }
245 if ((fd = mkstemp(priv->mlfi_fname)) < 0 ||
246 (priv->mlfi_fp = fdopen(fd, "w+")) == NULL)
247 {
248 if (fd >= 0)
249 (void) close(fd);
250 free(priv->mlfi_fname);
251 free(priv);
252 return SMFIS_TEMPFAIL;
253 }
254
255 /* save the private data */
256 smfi_setpriv(ctx, priv);
257

--- 161 unchanged lines hidden (view full) ---

419 fprintf(stderr, "smfi_register failed\n");
420 exit(EX_UNAVAILABLE);
421 }
422 return smfi_main();
423}
424
425/* eof */
426
427$Revision: 8.9.2.1.2.17 $, Last updated $Date: 2001/04/11 18:32:58 $