78 #define STR vstring_str
83 char *queue_id,
char *encoding,
85 char *recipient,
char *dsn_envid,
90 int bounce_status = 1;
104 #define NULL_SENDER MAIL_ADDR_EMPTY
107 msg_info(
"%s: not sending trace/success notification for "
108 "double-bounce message", queue_id);
110 }
else if (*recipient == 0) {
115 msg_info(
"%s: not sending trace/success notification "
116 "for single-bounce message", queue_id);
118 msg_fatal(
"remove %s %s: %m", service, queue_id);
140 #define NON_DSN_FLAGS (DEL_REQ_FLAG_USR_VRFY | DEL_REQ_FLAG_RECORD)
143 encoding, smtputf8, dsn_envid,
161 msg_info(
"%s: no trace file -- not sending a notification",
166 #define NULL_TRACE_FLAGS 0
195 if (bounce_status == 0)
196 msg_info(
"%s: sender delivery status notification: %s",
197 queue_id,
STR(new_id));
211 msg_fatal(
"remove %s %s: %m", service, queue_id);
219 return (bounce_status);
#define MAIL_ERROR_2BOUNCE
int bounce_original(VSTREAM *bounce, BOUNCE_INFO *bounce_info, int headers_only)
#define DSN_NOTIFY_OVERRIDE
int bounce_header(VSTREAM *bounce, BOUNCE_INFO *bounce_info, const char *dest, int postmaster_copy)
const NAME_MASK mail_error_masks[]
#define strcasecmp_utf8(s1, s2)
int bounce_diagnostic_dsn(VSTREAM *bounce, BOUNCE_INFO *bounce_info, int notify_filter)
VSTREAM * post_mail_fopen_nowait(const char *sender, const char *recipient, int source_class, int trace_flags, int utf8_flags, VSTRING *queue_id)
char * var_notify_classes
int vstream_fclose(VSTREAM *stream)
#define MAIL_SRC_MASK_BOUNCE
VSTRING * vstring_alloc(ssize_t len)
int post_mail_fclose(VSTREAM *cleanup)
#define name_mask(tag, table, str)
BOUNCE_TEMPLATE * success
int bounce_boilerplate(VSTREAM *bounce, BOUNCE_INFO *bounce_info)
NORETURN msg_fatal(const char *fmt,...)
int bounce_diagnostic_log(VSTREAM *bounce, BOUNCE_INFO *bounce_info, int notify_filter)
int bounce_trace_service(int flags, char *service, char *queue_name, char *queue_id, char *encoding, int smtputf8, char *recipient, char *dsn_envid, int unused_dsn_ret, BOUNCE_TEMPLATES *ts)
#define VAR_NOTIFY_CLASSES
const char * mail_addr_double_bounce(void)
int mail_queue_remove(const char *queue_name, const char *queue_id)
#define NO_POSTMASTER_COPY
BOUNCE_INFO * bounce_mail_init(const char *service, const char *queue_name, const char *queue_id, const char *encoding, int smtputf8, const char *dsn_envid, BOUNCE_TEMPLATE *template)
VSTRING * vstring_free(VSTRING *vp)
void bounce_mail_free(BOUNCE_INFO *bounce_info)
int bounce_header_dsn(VSTREAM *bounce, BOUNCE_INFO *bounce_info)
void msg_info(const char *fmt,...)