procmail
[Top] [All Lists]

Re: suggestion needed on a recipe

2019-11-02 17:58:30

On Fri, 1 Nov 2019, at 22:51, Zhiliang Hu wrote:

I removed '-', and it doesn't affect the outcome as described earlier.

On Tue, 29 Oct 2019, at 11:02, Zhiliang Hu wrote:

 FROMA=`formail -rtzxTo:`
 SUBJE=`formail -zx Subject:`

 :0 hw
 | (formail -I "X-Loop: my-email@my-domain" \
            -I "Subject: Problems with ....."; \
            cat - notify.moderators.txt) \
   | sed 's/FROMA/'"$FROMA"/g | sed 's/SUBJET/'"$SUBJE"/g \
   | $SENDMAIL -oi $LSTMATNR

Everything works fine except that at the end of the notification mail body
text, one line of miltipart body separater get appended, like this one:
--_000_DB6PR05MB34312B252CB0D273BA34B81A8E610DB6PR05MB3431bxrp_--

I wonder how does this single line from the body get there?

I had my procmail process the sample message you provided with the above rules (after removing the "-"), and sure enough it did not produce a separator. However, I now realize that you are generating broken messages because you keep the headers of the original message but you exchange the body with notify.moderators.txt. If the original message, like the sample you provided, is a multipart/* MIME message its Content-Type header might confuse whatever processes the generated message (i.e. $SENDMAIL etc.) because it includes a separator that is nowhere to be found in the body.

--
-- Andreas

     :-)
____________________________________________________________
procmail mailing list -- procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de   
Procmail homepage: http://www.procmail.org/
To unsubscribe send an email to 
procmail-leave(_at_)lists(_dot_)rwth-aachen(_dot_)de
https://lists.rwth-aachen.de/postorius/lists/procmail.lists.rwth-aachen.de

<Prev in Thread] Current Thread [Next in Thread>