9
/* void deliver_indirect(state)
13
/* deliver_indirect() delivers a message via the message
14
/* forwarding service, with duplicate filtering up to a
15
/* configurable number of recipients.
19
/* The attributes that specify the message, sender and more.
20
/* A table with the results from expanding aliases or lists.
21
/* CONFIGURATION VARIABLES
22
/* duplicate_filter_limit, duplicate filter size limit
24
/* The result is non-zero when the operation should be tried again.
28
/* The Secure Mailer license must be distributed with this software.
31
/* IBM T.J. Watson Research
33
/* Yorktown Heights, NY 10598, USA
41
/* Utility library. */
48
#include <mail_params.h>
51
#include <been_here.h>
54
/* Application-specific. */
58
/* deliver_indirect - deliver mail via forwarding service */
60
int deliver_indirect(LOCAL_STATE state)
64
* Suppress duplicate expansion results. Add some sugar to the name to
65
* avoid collisions with other duplicate filters. Allow the user to
66
* specify an upper bound on the size of the duplicate filter, so that we
67
* can handle huge mailing lists with millions of recipients.
70
msg_info("deliver_indirect: %s", state.msg_attr.recipient);
71
if (been_here(state.dup_filter, "indirect %s", state.msg_attr.recipient))
75
* Don't forward a trace-only request.
77
if (DEL_REQ_TRACE_ONLY(state.request->flags))
78
return (sent(BOUNCE_FLAGS(state.request),
79
SENT_ATTR(state.msg_attr),
80
"forwards to %s", state.msg_attr.recipient));
83
* Send the address to the forwarding service. Inherit the delivered
84
* attribute from the alias or from the .forward file owner.
86
if (forward_append(state.msg_attr))
87
return (defer_append(BOUNCE_FLAGS(state.request),
88
BOUNCE_ATTR(state.msg_attr),
89
"unable to forward message"));