Loading ...
Sorry, an error occurred while loading the content.

Re: PATCH: Creating empty bounce message template

Expand Messages
  • Sacha Chlytor
    ... This works marvelously. Thank you very much. I also have to say postfix is one of the finest pieces of software I have used in 20+ years of computing.
    Message 1 of 3 , Feb 29, 2008
    • 0 Attachment
      So Wietse Venema sez:

      > Sacha Chlytor:
      > > I have a client who wants to have no intro to his bounce messages.
      > > Whether or not this is a good idea is not the issue. The problem is that
      > > when I edit the bounce.cf file to read as below, postconf -b bounce.cf
      > > returns the error: missing message text in failure template -- ignoring
      > > this template
      > >
      > > [snip]
      > > failure_template = <<EOF
      > > Charset: us-ascii
      > > From: MAILER-DAEMON (Mail Delivery System)
      > > Subject: Undelivered Mail Returned to Sender
      > > Postmaster-Subject: Postmaster Copy: Undelivered Mail
      > >
      > > EOF
      > > [snip]
      > >
      > > I tried adding '-' on a line above the EOF, but that causes postconf to
      > > dump core.
      >
      > You found a bug that triggers with one-line text templates.
      > Below is a patch that stops Postfix from doing stupid things.
      >
      > > A little testing shows that one line of text and one blank
      > > line causes the template to get processed correctly, but anything less
      > > crashes.
      > >
      > > Am I missing something or is this not possible without modifying the code?
      >
      > Empty text is not allowed, but you can use a "." which is almost invisible.
      >
      > Wietse
      >
      > diff -cr /var/tmp/postfix-2.6-20080221/src/bounce/bounce_template.c ./bounce_template.c
      > *** /var/tmp/postfix-2.6-20080221/src/bounce/bounce_template.c Tue Jan 8 16:03:33 2008
      > --- ./bounce_template.c Thu Feb 28 15:52:27 2008
      > ***************
      > *** 343,349 ****
      > * Is this 7bit or 8bit text? If the character set is US-ASCII, then
      > * don't allow 8bit text. Don't assume 8bit when charset was changed.
      > */
      > ! #define NON_ASCII(p) (*(p) && !allascii((p)))
      >
      > if (NON_ASCII(cp) || NON_ASCII(tval)) {
      > if (strcasecmp(tp->mime_charset, "us-ascii") == 0) {
      > --- 343,349 ----
      > * Is this 7bit or 8bit text? If the character set is US-ASCII, then
      > * don't allow 8bit text. Don't assume 8bit when charset was changed.
      > */
      > ! #define NON_ASCII(p) ((p) && *(p) && !allascii((p)))
      >
      > if (NON_ASCII(cp) || NON_ASCII(tval)) {
      > if (strcasecmp(tp->mime_charset, "us-ascii") == 0) {

      This works marvelously. Thank you very much.

      I also have to say postfix is one of the finest pieces of software I have
      used in 20+ years of computing. Have you considered setting up an Amazon
      wishlist so the community can show their gratitude?

      S
    Your message has been successfully submitted and would be delivered to recipients shortly.