diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2012-09-29 10:32:09 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2012-09-29 10:32:09 +0000 |
commit | 91fe15e08e22b91c8065eaa8e504ce74be8e62f1 (patch) | |
tree | 48ea66559a3efa5a23fc8f8661103674796cf7a8 /usr.sbin | |
parent | 842955802c6a1214fc7bfc345d205e94568ac103 (diff) |
Remove support for "as user" for local deliveries.
It's not documented and not implemented.
ok gilles@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/parse.y | 27 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 3 |
2 files changed, 6 insertions, 24 deletions
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y index daf9895fee4..a2cdde9bccc 100644 --- a/usr.sbin/smtpd/parse.y +++ b/usr.sbin/smtpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.101 2012/09/26 09:49:43 halex Exp $ */ +/* $OpenBSD: parse.y,v 1.102 2012/09/29 10:32:08 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -133,7 +133,7 @@ typedef struct { %type <v.tv> interval %type <v.object> mapref %type <v.maddr> relay_as -%type <v.string> certname user tag on alias credentials compression +%type <v.string> certname tag on alias credentials compression %% grammar : /* empty */ @@ -636,20 +636,6 @@ conditions : condition { | '{' condition_list '}' ; -user : AS STRING { - struct passwd *pw; - - pw = getpwnam($2); - if (pw == NULL) { - yyerror("user '%s' does not exist.", $2); - free($2); - YYERROR; - } - $$ = $2; - } - | /* empty */ { $$ = NULL; } - ; - relay_as : AS STRING { struct mailaddr maddr, *maddrp; char *p; @@ -720,16 +706,14 @@ relay_as : AS STRING { | /* empty */ { $$ = NULL; } ; -action : DELIVER TO MAILDIR user { - rule->r_user = $4; +action : DELIVER TO MAILDIR { rule->r_action = A_MAILDIR; if (strlcpy(rule->r_value.buffer, "~/Maildir", sizeof(rule->r_value.buffer)) >= sizeof(rule->r_value.buffer)) fatal("pathname too long"); } - | DELIVER TO MAILDIR STRING user { - rule->r_user = $5; + | DELIVER TO MAILDIR STRING { rule->r_action = A_MAILDIR; if (strlcpy(rule->r_value.buffer, $4, sizeof(rule->r_value.buffer)) >= @@ -744,8 +728,7 @@ action : DELIVER TO MAILDIR user { >= sizeof(rule->r_value.buffer)) fatal("pathname too long"); } - | DELIVER TO MDA STRING user { - rule->r_user = $5; + | DELIVER TO MDA STRING { rule->r_action = A_MDA; if (strlcpy(rule->r_value.buffer, $4, sizeof(rule->r_value.buffer)) diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index c5ffda30dc6..024777cacb4 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.372 2012/09/28 17:28:30 eric Exp $ */ +/* $OpenBSD: smtpd.h,v 1.373 2012/09/29 10:32:08 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -307,7 +307,6 @@ struct rule { struct relayhost relayhost; } r_value; - char *r_user; struct mailaddr *r_as; objid_t r_amap; time_t r_qexpire; |