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

Re: Append orig_to messages subject

Expand Messages
  • selcukyazar
    Nobody ? ... -- View this message in context: http://old.nabble.com/Append-orig_to-messages-subject-tp30443565p30449675.html Sent from the Postfix mailing list
    Message 1 of 10 , Dec 14, 2010
    • 0 Attachment
      Nobody ?


      seyazar wrote:
      >
      > Hi
      >
      > We have postfix server and some of our users have .forward file. I want ot
      > change orig_to mesages (forwarded mesages) subject in server side, Can I
      > do that
      >
      > thanks in advance
      >
      > selcuk
      >

      --
      View this message in context: http://old.nabble.com/Append-orig_to-messages-subject-tp30443565p30449675.html
      Sent from the Postfix mailing list archive at Nabble.com.
    • Ralf Hildebrandt
      ... So you want to change the Subject: line whenever a mail is being forwarded using a .forward file? Am I getting this right? -- Ralf Hildebrandt
      Message 2 of 10 , Dec 14, 2010
      • 0 Attachment
        * selcukyazar <selcuk.yazar@...>:

        > > We have postfix server and some of our users have .forward file. I want ot
        > > change orig_to mesages (forwarded mesages) subject in server side, Can I
        > > do that

        So you want to change the Subject: line whenever a mail is being
        forwarded using a .forward file?

        Am I getting this right?

        --
        Ralf Hildebrandt
        Geschäftsbereich IT | Abteilung Netzwerk
        Charité - Universitätsmedizin Berlin
        Campus Benjamin Franklin
        Hindenburgdamm 30 | D-12203 Berlin
        Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
        ralf.hildebrandt@... | http://www.charite.de
      • Selcuk Yazar
        Hi, yes. right. is it posssible for filter or another way. thanks you. selcuk. On Tue, Dec 14, 2010 at 11:29 AM, Ralf Hildebrandt
        Message 3 of 10 , Dec 14, 2010
        • 0 Attachment
          Hi,

          yes. right. is it posssible for filter or another way.

          thanks you.


          selcuk.

          On Tue, Dec 14, 2010 at 11:29 AM, Ralf Hildebrandt <Ralf.Hildebrandt@...> wrote:
          * selcukyazar <selcuk.yazar@...>:

          > > We have postfix server and some of our users have .forward file. I want ot
          > > change orig_to mesages (forwarded mesages) subject in server side, Can I
          > > do that

          So you want to change the Subject: line whenever a mail is being
          forwarded using a .forward file?

          Am I getting this right?

          --
          Ralf Hildebrandt
           Geschäftsbereich IT | Abteilung Netzwerk
           Charité - Universitätsmedizin Berlin
           Campus Benjamin Franklin
           Hindenburgdamm 30 | D-12203 Berlin
           Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
           ralf.hildebrandt@... | http://www.charite.de




          --
          Selçuk YAZAR
          http://www.selcukyazar.blogspot.com
        • Ralf Hildebrandt
          ... Directly with .forward alone: No But you can call procmail from .forward and do it that way (I guess) You would need to use formail to extract the subject
          Message 4 of 10 , Dec 14, 2010
          • 0 Attachment
            * Selcuk Yazar <selcuk.yazar@...>:
            > Hi,
            >
            > yes. right. is it posssible for filter or another way.

            Directly with .forward alone: No
            But you can call procmail from .forward and do it that way (I guess)

            You would need to use formail to extract the subject into a variable and
            then use formail as a filter to update the Subject line

            e.g.:

            SUBJECT=formail -zx "Subject:":0fwh
            | /usr/bin/formail -b -a -I"Subject: [prefix here]$SUBJECT"
            | ${SENDMAIL} -i new@address

            I think.

            --
            Ralf Hildebrandt
            Geschäftsbereich IT | Abteilung Netzwerk
            Charité - Universitätsmedizin Berlin
            Campus Benjamin Franklin
            Hindenburgdamm 30 | D-12203 Berlin
            Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
            ralf.hildebrandt@... | http://www.charite.de
          • Selcuk Yazar
            Thanks for prompt reply. also i try | /usr/sbin/sendmail -i myadres@gmail.com but i think there is no way to change subject in here. i will try procmail.
            Message 5 of 10 , Dec 14, 2010
            • 0 Attachment
              Thanks for prompt reply. also i try "| /usr/sbin/sendmail -i myadres@..." but i think there is no way to change subject in here.
               
              i will try procmail. thanks again.
               
              selçuk

              On Tue, Dec 14, 2010 at 11:39 AM, Ralf Hildebrandt <Ralf.Hildebrandt@...> wrote:
              * Selcuk Yazar <selcuk.yazar@...>:
              > Hi,
              >
              > yes. right. is it posssible for filter or another way.

              Directly with .forward alone: No
              But you can call procmail from .forward and do it that way (I guess)

              You would need to use formail to extract the subject into a variable and
              then use formail as a filter to update the Subject line

              e.g.:

              SUBJECT=formail -zx "Subject:":0fwh
              | /usr/bin/formail -b -a -I"Subject: [prefix here]$SUBJECT"
              | ${SENDMAIL} -i new@address

              I think.

              --
              Ralf Hildebrandt
               Geschäftsbereich IT | Abteilung Netzwerk
               Charité - Universitätsmedizin Berlin
               Campus Benjamin Franklin
               Hindenburgdamm 30 | D-12203 Berlin
               Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
               ralf.hildebrandt@... | http://www.charite.de




              --
              Selçuk YAZAR
              http://www.selcukyazar.blogspot.com
            • Ralf Hildebrandt
              ... | sed s/Subject: foo/Subject: bar/g | /usr/sbin/sendmail -i myadres@gmail.com but Victor will probably flame me for this :) -- Ralf Hildebrandt
              Message 6 of 10 , Dec 14, 2010
              • 0 Attachment
                * Selcuk Yazar <selcuk.yazar@...>:
                > Thanks for prompt reply. also i try "| /usr/sbin/sendmail -i
                > myadres@..." but i think there is no way to change subject in here.

                "| sed 's/Subject: foo/Subject: bar/g' | /usr/sbin/sendmail -i myadres@..."

                but Victor will probably flame me for this :)

                --
                Ralf Hildebrandt
                Geschäftsbereich IT | Abteilung Netzwerk
                Charité - Universitätsmedizin Berlin
                Campus Benjamin Franklin
                Hindenburgdamm 30 | D-12203 Berlin
                Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
                ralf.hildebrandt@... | http://www.charite.de
              • selcukyazar
                Thanks It works. :) i tried sed end of command :) selçuk. ... -- View this message in context:
                Message 7 of 10 , Dec 14, 2010
                • 0 Attachment
                  Thanks It works. :) i tried sed end of command :)


                  selçuk.


                  Ralf Hildebrandt wrote:
                  >
                  > * Selcuk Yazar <selcuk.yazar@...>:
                  >> Thanks for prompt reply. also i try "| /usr/sbin/sendmail -i
                  >> myadres@..." but i think there is no way to change subject in here.
                  >
                  > "| sed 's/Subject: foo/Subject: bar/g' | /usr/sbin/sendmail -i
                  > myadres@..."
                  >
                  > but Victor will probably flame me for this :)
                  >
                  > --
                  > Ralf Hildebrandt
                  > Geschäftsbereich IT | Abteilung Netzwerk
                  > Charité - Universitätsmedizin Berlin
                  > Campus Benjamin Franklin
                  > Hindenburgdamm 30 | D-12203 Berlin
                  > Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
                  > ralf.hildebrandt@... | http://www.charite.de
                  >
                  >
                  >

                  --
                  View this message in context: http://old.nabble.com/Append-orig_to-messages-subject-tp30443565p30453311.html
                  Sent from the Postfix mailing list archive at Nabble.com.
                • Wietse Venema
                  Ralf Hildebrandt: [ Charset UTF-8 unsupported, converting... ] ... I think this will cause a loop when forwarded mail bounces (hint: you forgot to copy the
                  Message 8 of 10 , Dec 14, 2010
                  • 0 Attachment
                    Ralf Hildebrandt:
                    [ Charset UTF-8 unsupported, converting... ]
                    > * Selcuk Yazar <selcuk.yazar@...>:
                    > > Hi,
                    > >
                    > > yes. right. is it posssible for filter or another way.
                    >
                    > Directly with .forward alone: No
                    > But you can call procmail from .forward and do it that way (I guess)
                    >
                    > You would need to use formail to extract the subject into a variable and
                    > then use formail as a filter to update the Subject line
                    >
                    > e.g.:
                    >
                    > SUBJECT=formail -zx "Subject:":0fwh
                    > | /usr/bin/formail -b -a -I"Subject: [prefix here]$SUBJECT"
                    > | ${SENDMAIL} -i new@address
                    >
                    > I think.

                    I think this will cause a loop when forwarded mail bounces (hint:
                    you forgot to copy the sender envelope address).

                    Wietse
                  • selcukyazar
                    Hi again, my .forward manupulation works. | sed -e s/Subject:/Subject:FW: /g -e / Received: . * /{N;d} | /usr/sbin/sendmail -i mail_adres@hotmail.com ok,
                    Message 9 of 10 , Dec 15, 2010
                    • 0 Attachment
                      Hi again,

                      my .forward manupulation works.

                      "| sed -e 's/Subject:/Subject:FW: /g' -e '/'Received:\.\*'/{N;d}'|
                      /usr/sbin/sendmail -i mail_adres@..."

                      ok, also i wantto use command like this;

                      if [ `expr match "$str" "[][{!-]Spam[][?}].*"` != "0" ]; then abort
                      forwarding anyway fi

                      is it possible and what can be $str(i think its mail source)

                      thanks in advance.

                      selcuk



                      --
                      View this message in context: http://old.nabble.com/Append-orig_to-messages-subject-tp30443565p30468102.html
                      Sent from the Postfix mailing list archive at Nabble.com.
                    • Victor Duchovni
                      ... This creates bounce loops. DO NOT ignore the envelope sender when forwarding email. You MUST preserve the envelope sender address at least when it is
                      Message 10 of 10 , Dec 15, 2010
                      • 0 Attachment
                        On Wed, Dec 15, 2010 at 01:28:17PM -0800, selcukyazar wrote:

                        >
                        > Hi again,
                        >
                        > my .forward manupulation works.
                        >
                        > "| sed -e 's/Subject:/Subject:FW: /g' -e '/'Received:\.\*'/{N;d}'|
                        > /usr/sbin/sendmail -i mail_adres@..."

                        This creates bounce loops. DO NOT ignore the envelope sender when
                        forwarding email.

                        You MUST preserve the envelope sender address at least when it is "<>"
                        (or empty depending on whether how the envelope sender is passed to you).

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