6.0.0-beta1
7/11/25

[#5273] patch for "newline" with procmail and vacation
Summary patch for "newline" with procmail and vacation
Queue Ingo
Queue Version 1.1.3
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester krause (at) biochem (dot) mpg (dot) de
Created 04/20/2007 (6657 days ago)
Due 03/31/2007 (6677 days ago)
Updated 04/25/2007 (6652 days ago)
Assigned 04/25/2007 (6652 days ago)
Resolved 04/25/2007 (6652 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/25/2007 09:42:40 PM Jan Schneider Comment #4
State ⇒ Resolved
Reply to this comment
This was not quite sufficient.
what do you mean by that?
That your changes alone didn't fix it.
04/25/2007 06:11:00 PM krause (at) biochem (dot) mpg (dot) de Comment #3 Reply to this comment
This was not quite sufficient.
what do you mean by that?
it seems to work here ... (ingo 1.1.3)
04/25/2007 05:32:37 PM Jan Schneider Comment #2
Due ⇒ 03/31/2007
State ⇒ Feedback
Assigned to Jan Schneider
Reply to this comment
This was not quite sufficient. Can you folks please try the following 
patch: 
http://cvs.horde.org/diff.php?f=ingo%2Flib%2FScript%2Fprocmail.php&r1=1.46.10.16&r2=1.46.10.17&t=unified
04/20/2007 10:44:52 PM krause (at) biochem (dot) mpg (dot) de Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ patch for "newline" with procmail and vacation
Due ⇒ 03/31/2007
Queue ⇒ Ingo
State ⇒ Unconfirmed
Reply to this comment
using ingo/procmail for setting vacation messages:

if a user enters text which contains line breaks (carriage return, 
newline ...(?)) e.g. to seperate the complimentary close from the text 
or additional information .procmail then has each linebreak translated 
into "\r\n", example:



----- entered into ingo form:

I am currently on vacation.

As soon as i return i will answer your mail personally.



With best regards

     M. Krause

-----



this leads to the following in the procmail script:

----- .procmailrc

echo "I am currently on vacation.\\r\\nAs soon as i return i will

answer your mail personally.\\r\\n\\r\\nWith best regards\\r\\n   M.

Krause" \

-----



which is then display (e.g. in thunderbird) as one line:

-----

I am currently on vacation.\\r\\nAs soon as i return i will answer

your mail personally.\\r\\n\\r\\nWith best regards\\r\\n   M. Krause

-----



i think there is a command line option missing in the .procmailrc 
which is created by ingo in the "vacation part" to tell "echo" to 
enable interpretation of backslash escapes: -e



patch -Naur:

-----------

--- procmail.php.orig   2007-04-11 14:25:03.000000000 +0200

+++ procmail.php.patched        2007-04-11 14:25:48.000000000 +0200

@@ -456,7 +456,7 @@

                       $this->_action[] = '    | (formail 
-rI"Precedence: junk" \\';

                       $this->_action[] = '       -A"X-Loop: ' . 
$address . '" \\';

                       $this->_action[] = '       -i"Subject: ' . 
$params['action-value']['subject'] . '" ; \\';

-                    $this->_action[] = '       echo "' . 
str_replace("\r\n", '"; echo "', $reason) . '" \\';

+                    $this->_action[] = '       echo -e "' . 
str_replace("\r\n", '"; echo "', $reason) . '" \\';

                       $this->_action[] = '      ) | $SENDMAIL -oi -t';

                       $this->_action[] = '';

                   }

-----------




Saved Queries