summaryrefslogtreecommitdiff
path: root/gnu/dist/postfix/src/local/command.c
diff options
context:
space:
mode:
authorperry <perry@NetBSD.org>2002-02-02 23:10:24 +0000
committerperry <perry@NetBSD.org>2002-02-02 23:10:24 +0000
commit6f59dc7aebbf705da79e61ef3fd24b48ed99d327 (patch)
treec6e9fd356c8aac78b966a9dd53f5d0d14d5e62cd /gnu/dist/postfix/src/local/command.c
parentecf43984517b4cfb837e78958769cc8207ea5288 (diff)
Postfix 1.1.2
(Postfix releases are now numbered -- 1.1.2 means 1.1, patchlevel 2.) Lots of new features, same great security.
Diffstat (limited to 'gnu/dist/postfix/src/local/command.c')
-rw-r--r--gnu/dist/postfix/src/local/command.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/gnu/dist/postfix/src/local/command.c b/gnu/dist/postfix/src/local/command.c
index 23fffdf2ff3..8a86ac63a05 100644
--- a/gnu/dist/postfix/src/local/command.c
+++ b/gnu/dist/postfix/src/local/command.c
@@ -9,7 +9,7 @@
/* int deliver_command(state, usr_attr, command)
/* LOCAL_STATE state;
/* USER_ATTR exp_attr;
-/* char *command;
+/* const char *command;
/* DESCRIPTION
/* deliver_command() runs a command with a message as standard
/* input. A limited amount of standard output and standard error
@@ -79,7 +79,7 @@
/* deliver_command - deliver to shell command */
-int deliver_command(LOCAL_STATE state, USER_ATTR usr_attr, char *command)
+int deliver_command(LOCAL_STATE state, USER_ATTR usr_attr, const char *command)
{
char *myname = "deliver_command";
VSTRING *why;
@@ -107,16 +107,6 @@ int deliver_command(LOCAL_STATE state, USER_ATTR usr_attr, char *command)
return (0);
/*
- * DELIVERY POLICY
- *
- * Do we permit mail to shell commands? Allow delivery via mailbox_command.
- */
- if (command != var_mailbox_command
- && (local_cmd_deliver_mask & state.msg_attr.exp_type) == 0)
- return (bounce_append(BOUNCE_FLAG_KEEP, BOUNCE_ATTR(state.msg_attr),
- "mail to command is restricted"));
-
- /*
* DELIVERY RIGHTS
*
* Choose a default uid and gid when none have been selected (i.e. values
@@ -205,6 +195,9 @@ int deliver_command(LOCAL_STATE state, USER_ATTR usr_attr, char *command)
BOUNCE_ATTR(state.msg_attr),
"%s", vstring_str(why));
break;
+ case PIPE_STAT_CORRUPT:
+ deliver_status = DEL_STAT_DEFER;
+ break;
default:
msg_panic("%s: bad status %d", myname, cmd_status);
/* NOTREACHED */