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 |
State ⇒ Resolved
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
Due ⇒ 03/31/2007
State ⇒ Feedback
Assigned to Jan Schneider
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
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ patch for "newline" with procmail and vacation
Due ⇒ 03/31/2007
Queue ⇒ Ingo
State ⇒ Unconfirmed
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[] = '';
}
-----------