milter.c (98841) | milter.c (102528) |
---|---|
1/* 2 * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers. 3 * All rights reserved. 4 * 5 * By using this file, you agree to the terms and conditions set 6 * forth in the LICENSE file which can be found at the top level of 7 * the sendmail distribution. 8 * 9 */ 10 11#include <sendmail.h> 12 | 1/* 2 * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers. 3 * All rights reserved. 4 * 5 * By using this file, you agree to the terms and conditions set 6 * forth in the LICENSE file which can be found at the top level of 7 * the sendmail distribution. 8 * 9 */ 10 11#include <sendmail.h> 12 |
13SM_RCSID("@(#)$Id: milter.c,v 8.197 2002/06/12 22:33:48 gshapiro Exp $") | 13SM_RCSID("@(#)$Id: milter.c,v 8.197.2.2 2002/08/06 22:58:38 gshapiro Exp $") |
14 15#if MILTER 16# include <libmilter/mfapi.h> 17# include <libmilter/mfdef.h> 18 19# include <errno.h> 20# include <sys/time.h> 21 --- 18 unchanged lines hidden (view full) --- 40 *state == SMFIR_REJECT || \ 41 *state == SMFIR_DISCARD || \ 42 *state == SMFIR_TEMPFAIL) \ 43 { \ 44 /* Abort the filters to let them know we are done with msg */ \ 45 milter_abort(e); \ 46 } 47 | 14 15#if MILTER 16# include <libmilter/mfapi.h> 17# include <libmilter/mfdef.h> 18 19# include <errno.h> 20# include <sys/time.h> 21 --- 18 unchanged lines hidden (view full) --- 40 *state == SMFIR_REJECT || \ 41 *state == SMFIR_DISCARD || \ 42 *state == SMFIR_TEMPFAIL) \ 43 { \ 44 /* Abort the filters to let them know we are done with msg */ \ 45 milter_abort(e); \ 46 } 47 |
48# define MILTER_CHECK_ERROR(action) \ | 48# if _FFR_QUARANTINE 49# define MILTER_CHECK_ERROR(action) \ 50 if (tTd(71, 101)) \ 51 { \ 52 if (e->e_quarmsg == NULL) \ 53 { \ 54 e->e_quarmsg = sm_rpool_strdup_x(e->e_rpool, \ 55 "filter failure"); \ 56 macdefine(&e->e_macro, A_PERM, macid("{quarantine}"), \ 57 e->e_quarmsg); \ 58 } \ 59 } \ 60 else if (bitnset(SMF_TEMPFAIL, m->mf_flags)) \ 61 *state = SMFIR_TEMPFAIL; \ 62 else if (bitnset(SMF_REJECT, m->mf_flags)) \ 63 *state = SMFIR_REJECT; \ 64 else \ 65 action; 66# else /* _FFR_QUARANTINE */ 67# define MILTER_CHECK_ERROR(action) \ |
49 if (bitnset(SMF_TEMPFAIL, m->mf_flags)) \ 50 *state = SMFIR_TEMPFAIL; \ 51 else if (bitnset(SMF_REJECT, m->mf_flags)) \ 52 *state = SMFIR_REJECT; \ 53 else \ 54 action; | 68 if (bitnset(SMF_TEMPFAIL, m->mf_flags)) \ 69 *state = SMFIR_TEMPFAIL; \ 70 else if (bitnset(SMF_REJECT, m->mf_flags)) \ 71 *state = SMFIR_REJECT; \ 72 else \ 73 action; |
74# endif /* _FFR_QUARANTINE */ |
|
55 56# define MILTER_CHECK_REPLYCODE(default) \ 57 if (response == NULL || \ 58 strlen(response) + 1 != (size_t) rlen || \ 59 rlen < 3 || \ 60 (response[0] != '4' && response[0] != '5') || \ 61 !isascii(response[1]) || !isdigit(response[1]) || \ 62 !isascii(response[2]) || !isdigit(response[2])) \ --- 3810 unchanged lines hidden --- | 75 76# define MILTER_CHECK_REPLYCODE(default) \ 77 if (response == NULL || \ 78 strlen(response) + 1 != (size_t) rlen || \ 79 rlen < 3 || \ 80 (response[0] != '4' && response[0] != '5') || \ 81 !isascii(response[1]) || !isdigit(response[1]) || \ 82 !isascii(response[2]) || !isdigit(response[2])) \ --- 3810 unchanged lines hidden --- |