summaryrefslogtreecommitdiffstats
path: root/maildrop/recipenode.C
diff options
context:
space:
mode:
authorSam Varshavchik2017-07-23 23:16:48 -0400
committerSam Varshavchik2017-07-23 23:16:48 -0400
commit4238d38f75d45793521a3b49ba421413d2b53a21 (patch)
tree241d230890014f5e69ae4738cdf0f520dafc1992 /maildrop/recipenode.C
parentde2a130974e1a76daa1893e18442154c7fc90321 (diff)
downloadcourier-libs-4238d38f75d45793521a3b49ba421413d2b53a21.tar.bz2
maildrop: add the "system" command.
Diffstat (limited to 'maildrop/recipenode.C')
-rw-r--r--maildrop/recipenode.C13
1 files changed, 12 insertions, 1 deletions
diff --git a/maildrop/recipenode.C b/maildrop/recipenode.C
index c69c017..031eec0 100644
--- a/maildrop/recipenode.C
+++ b/maildrop/recipenode.C
@@ -496,7 +496,7 @@ RecipeNode *c;
debug += '\0';
r.errmsg(*this, debug);
}
-
+
long l=bb.Length();
if (n < 0 || n > l) n=l;
@@ -622,6 +622,17 @@ RecipeNode *c;
throw "Unable to filter message.";
b = "0";
break;
+ case system:
+ if (!firstChild)
+ throw "Internal error in system statement.";
+ firstChild->Evaluate(r,b);
+ b += '\0';
+ if (VerboseLevel() > 0)
+ merr << "maildrop: Executing system command " <<
+ (const char *)b << "\n";
+ executesystem(b);
+ b = "0";
+ break;
case exception:
if (!firstChild)
throw "Internal error in delivery statement.";