mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-30 05:38:06 +00:00
postfix-2.3-20051118
This commit is contained in:
parent
946a1ba20d
commit
28a6e59d67
@ -11400,6 +11400,11 @@ Apologies for any names omitted.
|
|||||||
Files: bounce/bounce_template.[hc], bounce/bounce_templates.c,
|
Files: bounce/bounce_template.[hc], bounce/bounce_templates.c,
|
||||||
bounce/bounce_notify_util.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:
|
Open problems:
|
||||||
|
|
||||||
"postsuper -r" no longer resets the message arrival time,
|
"postsuper -r" no longer resets the message arrival time,
|
||||||
|
@ -113,10 +113,12 @@ BOUNCE(5) BOUNCE(5)
|
|||||||
text. See the "TEMPLATE MESSAGE TEXT FORMAT"
|
text. See the "TEMPLATE MESSAGE TEXT FORMAT"
|
||||||
description below.
|
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>
|
<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>
|
<b>Postmaster-Subject:</b>
|
||||||
The subject that will be used in Postmaster copies
|
The subject that will be used in Postmaster copies
|
||||||
|
@ -128,9 +128,11 @@ The following headers are supported:
|
|||||||
The MIME character set of the template message text. See
|
The MIME character set of the template message text. See
|
||||||
the "TEMPLATE MESSAGE TEXT FORMAT" description below.
|
the "TEMPLATE MESSAGE TEXT FORMAT" description below.
|
||||||
.IP \fBFrom:\fR
|
.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
|
.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
|
.IP \fBPostmaster-Subject:\fR
|
||||||
The subject that will be used in Postmaster copies of
|
The subject that will be used in Postmaster copies of
|
||||||
undeliverable or delayed mail notifications. These copies
|
undeliverable or delayed mail notifications. These copies
|
||||||
|
@ -116,9 +116,11 @@
|
|||||||
# The MIME character set of the template message text. See
|
# The MIME character set of the template message text. See
|
||||||
# the "TEMPLATE MESSAGE TEXT FORMAT" description below.
|
# the "TEMPLATE MESSAGE TEXT FORMAT" description below.
|
||||||
# .IP \fBFrom:\fR
|
# .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
|
# .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
|
# .IP \fBPostmaster-Subject:\fR
|
||||||
# The subject that will be used in Postmaster copies of
|
# The subject that will be used in Postmaster copies of
|
||||||
# undeliverable or delayed mail notifications. These copies
|
# undeliverable or delayed mail notifications. These copies
|
||||||
|
136
postfix/src/bounce/2template_test.in
Normal file
136
postfix/src/bounce/2template_test.in
Normal 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
|
@ -37,7 +37,7 @@ Makefile: Makefile.in
|
|||||||
|
|
||||||
test: $(TESTPROG)
|
test: $(TESTPROG)
|
||||||
|
|
||||||
tests: update template_test
|
tests: update template_test 2template_test
|
||||||
|
|
||||||
update: ../../libexec/$(PROG) $(SAMPLES)
|
update: ../../libexec/$(PROG) $(SAMPLES)
|
||||||
|
|
||||||
@ -70,6 +70,12 @@ template_test: $(PROG) main.cf template_test.ref
|
|||||||
diff template_test.ref template_test.tmp
|
diff template_test.ref template_test.tmp
|
||||||
rm -f 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)
|
depend: $(MAKES)
|
||||||
(sed '1,/^# do not edit/!d' Makefile.in; \
|
(sed '1,/^# do not edit/!d' Makefile.in; \
|
||||||
set -e; for i in [a-z][a-z0-9]*.c; do \
|
set -e; for i in [a-z][a-z0-9]*.c; do \
|
||||||
|
@ -222,6 +222,15 @@ void bounce_template_free(BOUNCE_TEMPLATE *tp)
|
|||||||
myfree((char *) 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 */
|
/* bounce_template_load - override one template */
|
||||||
|
|
||||||
void bounce_template_load(BOUNCE_TEMPLATE *tp, const char *origin,
|
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.
|
* Clean up after a previous call.
|
||||||
*/
|
*/
|
||||||
if (tp->buffer) {
|
if (tp->buffer)
|
||||||
myfree(tp->buffer);
|
bounce_template_reset(tp);
|
||||||
myfree((char *) tp->origin);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Postpone the work of template parsing until it is really needed. Most
|
* 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->flags |= BOUNCE_TMPL_FLAG_NEW_BUFFER;
|
||||||
tp->buffer = mystrdup(buffer);
|
tp->buffer = mystrdup(buffer);
|
||||||
tp->origin = mystrdup(origin);
|
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.
|
* Discard the unusable template and use the default one instead.
|
||||||
*/
|
*/
|
||||||
#define CLEANUP_AND_RETURN() do { \
|
#define CLEANUP_AND_RETURN() do { \
|
||||||
myfree(tp->buffer); \
|
bounce_template_reset(tp); \
|
||||||
myfree((char *) tp->origin); \
|
return; \
|
||||||
*tp = *(tp->prototype); \
|
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||||
* patchlevel; they change the release date only.
|
* patchlevel; they change the release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20051117"
|
#define MAIL_RELEASE_DATE "20051118"
|
||||||
#define MAIL_VERSION_NUMBER "2.3"
|
#define MAIL_VERSION_NUMBER "2.3"
|
||||||
|
|
||||||
#ifdef SNAPSHOT
|
#ifdef SNAPSHOT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user