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

A strange issue with postfix and altermime

Expand Messages
  • Nick Warr
    I am running a CentOS 6.3 server with postfix 2.6 and altermime 0.3.10. I use altermime to append disclaimers to emails submitted by my users through port port
    Message 1 of 6 , Mar 21 7:22 AM
    • 0 Attachment
      I am running a CentOS 6.3 server with postfix 2.6 and altermime 0.3.10.

      I use altermime to append disclaimers to emails submitted by my users
      through port port 587, and 99.95% of the time it works without issue,
      recently we've had a few issues with messages sent from Mac Outlook
      clients, the issue is definitely related to altermime, if I disable the
      filter script, the problem no longer occurs.

      The issue is due to what is fortunately a fairly rare occurence, in the
      body text, there is a sentence exactly 76 characters long, including
      spaces, and as many sentences do, it finishes with a period, but since
      the period is the 77th character, it gets bumped down to the next line
      (and an = gets appended to the end of the sentence). Here is what it
      looks like, with names obscured, if it goes through the server with the
      altermime disclaimer disabled.

      > This message is in MIME format. Since your mail reader does not understand
      this format, some or all of this message may not be legible.

      --B_3478240988_27375889
      Content-type: text/plain;
      charset="ISO-8859-1"
      Content-transfer-encoding: quoted-printable

      Hi XXXXXX,

      This is definitely the remains of the EQCallTracker API integration since w=
      e
      originally only supported secondary allocations for the EQCallTracker teams=
    • Nick Warr
      Well, I sent the message though, with altermime enabled, and it chopped it off. I ve disabled it to send this message. Nick ... Message-ID:
      Message 2 of 6 , Mar 21 7:24 AM
      • 0 Attachment
        Well, I sent the message though, with altermime enabled, and it chopped it off.

        I've disabled it to send this message.

        Nick


        -------- Original Message --------
        Message-ID:<532C4B17.2020506@...>
        Date:Fri, 21 Mar 2014 14:22:15 +0000
        From:Nick Warr <nick.warr@...>
        User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
        MIME-Version:1.0
        To:postfix-users@...
        Subject:A strange issue with postfix and altermime
        Content-Type:text/plain; charset=ISO-8859-1; format=flowed
        Content-Transfer-Encoding:7bit


        I am running a CentOS 6.3 server with postfix 2.6 and altermime 0.3.10.
        
        I use altermime to append disclaimers to emails submitted by my users 
        through port port 587, and 99.95% of the time it works without issue, 
        recently we've had a few issues with messages sent from Mac Outlook 
        clients, the issue is definitely related to altermime, if I disable the 
        filter script, the problem no longer occurs.
        
        The issue is due to what is fortunately a fairly rare occurence, in the 
        body text, there is a sentence exactly 76 characters long, including 
        spaces, and as many sentences do, it finishes with a period, but since 
        the period is the 77th character, it gets bumped down to the next line 
        (and an = gets appended to the end of the sentence).  Here is what it 
        looks like, with names obscured, if it goes through the server with the 
        altermime disclaimer disabled.
        
        
        > This message is in MIME format. Since your mail reader does not understand
        this format, some or all of this message may not be legible. --B_3478240988_27375889 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable Hi XXXXXX, This is definitely the remains of the EQCallTracker API integration since w= e originally only supported secondary allocations for the EQCallTracker teams= . I assume it would be easy enough to change this though, with a small enhancement. Kind Regards XXXXX. From: XXXXX XXXXX <xxxx.xxxxx@...> Date: Thursday, 20 March 2014 16:58 To: XXXX XXXXXX <xxx.xxxx@...> Cc: "'XX, XXXx XXX'" <xxxx.xxxx@...>, ConQuest Dev <conquestdev@...> Subject: RE: Call API question: handling of Secondary Allocation parameter= s Hi XXXXX, =20 Unfortunately no, there aren=B9t =B3hidden=B2 parameters for secondary allocation level/group. For the secondary allocation, the level is always defaulted to L2 and the group to N/A. =20 Regards, There are about three quoted messages underneath that, but I just lopped them off. This is what happens when the disclaimer is enabled;
        > This message is in MIME format. Since your mail reader does not understand
        this format, some or all of this message may not be legible. --B_3478241259_27341821 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable Hi XXXXXX, This is definitely the remains of the EQCallTracker API integration since w= e originally only supported secondary allocations for the EQCallTracker teams= --B_3478241259_27341821-- As you can see, either postfix or altermime is seeing the period by itself as a terminator of the SMTP conversation, at least for that section. I'm fairly sure it's altermime's fault (though through pipe or when it re-injects the message to postfix, I don't know), and as it's a rather rare occurence, I'm hesitant to play with the entry in master.cf, I'm thinking that the EOL setting, or a flag might make a difference, but I thought asking first might be prudent. This is the entry in master.cf dfilt unix - n n - - pipe flags=Rq user=filter argv=/etc/postfix/disclaimer -f ${sender} -- ${recipient} Any advice or recommendations? Thanks, Nick


      • Viktor Dukhovni
        ... Edit the filter script, and make sure it invokes the sendmail(1) command with a -i option and (as should be already the case) without any -t option.
        Message 3 of 6 , Mar 21 9:54 AM
        • 0 Attachment
          On Fri, Mar 21, 2014 at 02:24:49PM +0000, Nick Warr wrote:

          > This is the entry in master.cf
          >
          > dfilt unix - n n - - pipe
          > flags=Rq user=filter argv=/etc/postfix/disclaimer -f ${sender} --
          > ${recipient}
          >
          > Any advice or recommendations?

          Edit the filter script, and make sure it invokes the sendmail(1)
          command with a "-i" option and (as should be already the case)
          without any "-t" option.

          sendmail -i -f "$sender" -- "$@"

          if the argument list is simply copied from the arguments to
          "disclaimer", add a "-i" before "-f".

          --
          Viktor.
        • Nick Warr
          ... I just had to add in -i , From $SENDMAIL $@
          Message 4 of 6 , Mar 21 10:16 AM
          • 0 Attachment
            On 21/03/2014 16:54, Viktor Dukhovni wrote:
            > On Fri, Mar 21, 2014 at 02:24:49PM +0000, Nick Warr wrote:
            >
            >> This is the entry in master.cf
            >>
            >> dfilt unix - n n - - pipe
            >> flags=Rq user=filter argv=/etc/postfix/disclaimer -f ${sender} --
            >> ${recipient}
            >>
            >> Any advice or recommendations?
            > Edit the filter script, and make sure it invokes the sendmail(1)
            > command with a "-i" option and (as should be already the case)
            > without any "-t" option.
            >
            > sendmail -i -f "$sender" -- "$@"
            >
            > if the argument list is simply copied from the arguments to
            > "disclaimer", add a "-i" before "-f".
            >
            I just had to add in "-i",

            From

            $SENDMAIL "$@" <in.$$

            to

            $SENDMAIL -i "$@" <in.$$

            Thank you!

            Nick
            ______________________________________________________________________________________________


            This email is confidential and subject to Krescendo's Email Usage and Information Classification Policies.
          • Wietse Venema
            ... The Postfix FILTER_README instructions have: SENDMAIL= /usr/sbin/sendmail -G -i # NEVER NEVER NEVER use -t here. Wietse
            Message 5 of 6 , Mar 21 10:25 AM
            • 0 Attachment
              Nick Warr:
              > On 21/03/2014 16:54, Viktor Dukhovni wrote:
              > > On Fri, Mar 21, 2014 at 02:24:49PM +0000, Nick Warr wrote:
              > >
              > >> This is the entry in master.cf
              > >>
              > >> dfilt unix - n n - - pipe
              > >> flags=Rq user=filter argv=/etc/postfix/disclaimer -f ${sender} --
              > >> ${recipient}
              > >>
              > >> Any advice or recommendations?
              > > Edit the filter script, and make sure it invokes the sendmail(1)
              > > command with a "-i" option and (as should be already the case)
              > > without any "-t" option.
              > >
              > > sendmail -i -f "$sender" -- "$@"
              > >
              > > if the argument list is simply copied from the arguments to
              > > "disclaimer", add a "-i" before "-f".
              > >
              > I just had to add in "-i",
              >
              > From
              >
              > $SENDMAIL "$@" <in.$$
              >
              > to
              >
              > $SENDMAIL -i "$@" <in.$$

              The Postfix FILTER_README instructions have:

              SENDMAIL="/usr/sbin/sendmail -G -i" # NEVER NEVER NEVER use "-t" here.

              Wietse
            • Nick Warr
              ... You are correct, my mistake was using a script assembled by someone else, and assuming they had sanity-checked it. Nick
              Message 6 of 6 , Mar 21 10:35 AM
              • 0 Attachment
                On 21/03/2014 17:25, Wietse Venema wrote:
                > Nick Warr:
                >> On 21/03/2014 16:54, Viktor Dukhovni wrote:
                >>> On Fri, Mar 21, 2014 at 02:24:49PM +0000, Nick Warr wrote:
                >>>
                >>>> This is the entry in master.cf
                >>>>
                >>>> dfilt unix - n n - - pipe
                >>>> flags=Rq user=filter argv=/etc/postfix/disclaimer -f ${sender} --
                >>>> ${recipient}
                >>>>
                >>>> Any advice or recommendations?
                >>> Edit the filter script, and make sure it invokes the sendmail(1)
                >>> command with a "-i" option and (as should be already the case)
                >>> without any "-t" option.
                >>>
                >>> sendmail -i -f "$sender" -- "$@"
                >>>
                >>> if the argument list is simply copied from the arguments to
                >>> "disclaimer", add a "-i" before "-f".
                >>>
                >> I just had to add in "-i",
                >>
                >> From
                >>
                >> $SENDMAIL "$@" <in.$$
                >>
                >> to
                >>
                >> $SENDMAIL -i "$@" <in.$$
                > The Postfix FILTER_README instructions have:
                >
                > SENDMAIL="/usr/sbin/sendmail -G -i" # NEVER NEVER NEVER use "-t" here.
                >
                > Wietse
                You are correct, my mistake was using a script assembled by someone
                else, and assuming they had sanity-checked it.

                Nick
                ______________________________________________________________________________________________


                This email is confidential and subject to Krescendo's Email Usage and Information Classification Policies.
              Your message has been successfully submitted and would be delivered to recipients shortly.