2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-29 21:27:57 +00:00

postfix-2.3-20051118

This commit is contained in:
Wietse Venema 2005-11-18 00:00:00 -05:00 committed by Viktor Dukhovni
parent 946a1ba20d
commit 28a6e59d67
8 changed files with 174 additions and 18 deletions

View File

@ -11400,6 +11400,11 @@ Apologies for any names omitted.
Files: bounce/bounce_template.[hc], bounce/bounce_templates.c,
bounce/bounce_notify_util.c.
20051118
Bugfix: new bounce template code did not return after
template syntax error. File: bounce/bounce_template.c
Open problems:
"postsuper -r" no longer resets the message arrival time,

View File

@ -113,10 +113,12 @@ BOUNCE(5) BOUNCE(5)
text. See the "TEMPLATE MESSAGE TEXT FORMAT"
description below.
<b>From:</b> The sender address that the recipient will see.
<b>From:</b> The sender address in the message header of the
delivery status notification.
<b>Subject:</b>
The subject that the recipient will see.
The subject in the message header of the delivery
status notification.
<b>Postmaster-Subject:</b>
The subject that will be used in Postmaster copies

View File

@ -128,9 +128,11 @@ The following headers are supported:
The MIME character set of the template message text. See
the "TEMPLATE MESSAGE TEXT FORMAT" description below.
.IP \fBFrom:\fR
The sender address that the recipient will see.
The sender address in the message header of the delivery
status notification.
.IP \fBSubject:\fR
The subject that the recipient will see.
The subject in the message header of the delivery status
notification.
.IP \fBPostmaster-Subject:\fR
The subject that will be used in Postmaster copies of
undeliverable or delayed mail notifications. These copies

View File

@ -116,9 +116,11 @@
# The MIME character set of the template message text. See
# the "TEMPLATE MESSAGE TEXT FORMAT" description below.
# .IP \fBFrom:\fR
# The sender address that the recipient will see.
# The sender address in the message header of the delivery
# status notification.
# .IP \fBSubject:\fR
# The subject that the recipient will see.
# The subject in the message header of the delivery status
# notification.
# .IP \fBPostmaster-Subject:\fR
# The subject that will be used in Postmaster copies of
# undeliverable or delayed mail notifications. These copies

View File

@ -0,0 +1,136 @@
failure_template = <<EOF
Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
Postmaster-Subject: Postmaster Copy: Undelivered Mail
This is the $mail_name program at host $myhostname.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The $mail_name program
EOF
delay_template = <<EOF
Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Delayed Mail (still being retried)
Postmaster-Subject: Postmaster Warning: Delayed Mail
This is the $mail_name program at host $myhostname.
####################################################################
# THIS IS A WARNING ONLY. YOU DO NOT NEED TO RESEND YOUR MESSAGE. #
####################################################################
Your message could not be delivered for $delay_warning_time_hours hour(s).
It will be retried until it is $maximal_queue_lifetime_days day(s) old.
For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The $mail_name program
EOF
success_template = <<EOF
Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Successful Mail Delivery Report
This is the $mail_name program at host $myhostname.
Your message was successfully delivered to the destination(s)
listed below. If the message was delivered to mailbox you will
receive no further notifications. Otherwise you may still receive
notifications of mail delivery errors from other systems.
The $mail_name program
EOF
verify_template = <<EOF
Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Mail Delivery Status Report
This is the $mail_name program at host $myhostname.
Enclosed is the mail delivery report that you requested.
The $mail_name program
EOF
failure_template = <<EOF
Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
Postmaster-Subject: Postmaster Copy: Undelivered Mail
This is the $mail_name program at host $myhostname.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The $mail_name program
EOF
delay_template = <<EOF
Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Delayed Mail (still being retried)
Postmaster-Subject: Postmaster Warning: Delayed Mail
This is the $mail_name program at host $myhostname.
####################################################################
# THIS IS A WARNING ONLY. YOU DO NOT NEED TO RESEND YOUR MESSAGE. #
####################################################################
Your message could not be delivered for $delay_warning_time_hours hour(s).
It will be retried until it is $maximal_queue_lifetime_days day(s) old.
For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The $mail_name program
EOF
success_template = <<EOF
Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Successful Mail Delivery Report
This is the $mail_name program at host $myhostname.
Your message was successfully delivered to the destination(s)
listed below. If the message was delivered to mailbox you will
receive no further notifications. Otherwise you may still receive
notifications of mail delivery errors from other systems.
The $mail_name program
EOF
verify_template = <<EOF
Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Mail Delivery Status Report
This is the $mail_name program at host $myhostname.
Enclosed is the mail delivery report that you requested.
The $mail_name program
EOF

View File

@ -37,7 +37,7 @@ Makefile: Makefile.in
test: $(TESTPROG)
tests: update template_test
tests: update template_test 2template_test
update: ../../libexec/$(PROG) $(SAMPLES)
@ -70,6 +70,12 @@ template_test: $(PROG) main.cf template_test.ref
diff template_test.ref template_test.tmp
rm -f template_test.tmp
2template_test: $(PROG) main.cf template_test.ref 2template_test.in
MAIL_CONFIG=. ./$(PROG) -SVzndump_templates \
-o bounce_template_file=2template_test.in > template_test.tmp
diff template_test.ref template_test.tmp
rm -f template_test.tmp
depend: $(MAKES)
(sed '1,/^# do not edit/!d' Makefile.in; \
set -e; for i in [a-z][a-z0-9]*.c; do \

View File

@ -222,6 +222,15 @@ void bounce_template_free(BOUNCE_TEMPLATE *tp)
myfree((char *) tp);
}
/* bounce_template_reset - reset template to default */
static void bounce_template_reset(BOUNCE_TEMPLATE *tp)
{
myfree(tp->buffer);
myfree((char *) tp->origin);
*tp = *(tp->prototype);
}
/* bounce_template_load - override one template */
void bounce_template_load(BOUNCE_TEMPLATE *tp, const char *origin,
@ -231,10 +240,8 @@ void bounce_template_load(BOUNCE_TEMPLATE *tp, const char *origin,
/*
* Clean up after a previous call.
*/
if (tp->buffer) {
myfree(tp->buffer);
myfree((char *) tp->origin);
}
if (tp->buffer)
bounce_template_reset(tp);
/*
* Postpone the work of template parsing until it is really needed. Most
@ -244,9 +251,6 @@ void bounce_template_load(BOUNCE_TEMPLATE *tp, const char *origin,
tp->flags |= BOUNCE_TMPL_FLAG_NEW_BUFFER;
tp->buffer = mystrdup(buffer);
tp->origin = mystrdup(origin);
} else {
*tp = *(tp->prototype);
/* Also resets the buffer and origin fields. */
}
}
@ -273,9 +277,8 @@ static void bounce_template_parse_buffer(BOUNCE_TEMPLATE *tp)
* Discard the unusable template and use the default one instead.
*/
#define CLEANUP_AND_RETURN() do { \
myfree(tp->buffer); \
myfree((char *) tp->origin); \
*tp = *(tp->prototype); \
bounce_template_reset(tp); \
return; \
} while (0)
/*

View File

@ -20,7 +20,7 @@
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
#define MAIL_RELEASE_DATE "20051117"
#define MAIL_RELEASE_DATE "20051118"
#define MAIL_VERSION_NUMBER "2.3"
#ifdef SNAPSHOT