diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-01-14 23:36:53 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-01-14 23:36:53 +0000 |
commit | 1510cd231b9fa25f455beed1d9df8f614f0c6c02 (patch) | |
tree | 953ae0cdf394a468a3f2f4a525d4a512f227315b /usr.sbin/smtpd/parse.y | |
parent | b105ce2ff78a37862e13b9259eb6c8f95fef7af3 (diff) |
slightly change "relay via" so that it can differentiate "ssmtp", "tls" and
"ssl" while providing mta with the informations it needs to do its work.
Diffstat (limited to 'usr.sbin/smtpd/parse.y')
-rw-r--r-- | usr.sbin/smtpd/parse.y | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y index a23cdf97f54..93addf568cb 100644 --- a/usr.sbin/smtpd/parse.y +++ b/usr.sbin/smtpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.21 2009/01/04 16:40:58 gilles Exp $ */ +/* $OpenBSD: parse.y,v 1.22 2009/01/14 23:36:52 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -117,11 +117,11 @@ typedef struct { %token DNS DB TFILE EXTERNAL DOMAIN CONFIG SOURCE %token RELAY VIA DELIVER TO MAILDIR MBOX HOSTNAME %token ACCEPT REJECT INCLUDE NETWORK ERROR MDA FROM FOR -%token ARROW ENABLE AUTH +%token ARROW ENABLE AUTH TLS %token <v.string> STRING %token <v.number> NUMBER %type <v.map> map -%type <v.number> quantifier decision port ssmtp from auth +%type <v.number> quantifier decision port ssmtp from auth ssl %type <v.cond> condition %type <v.tv> interval %type <v.object> mapref @@ -225,6 +225,11 @@ ssmtp : SSMTP { $$ = 1; } | /* empty */ { $$ = 0; } ; +ssl : SSMTP { $$ = F_SSMTP; } + | TLS { $$ = F_STARTTLS; } + | SSL { $$ = F_SSL; } + | /* empty */ { $$ = 0; } + auth : ENABLE AUTH { $$ = 1; } | /* empty */ { $$ = 0; } ; @@ -672,11 +677,11 @@ action : DELIVER TO MAILDIR STRING { | RELAY { rule->r_action = A_RELAY; } - | RELAY VIA ssmtp STRING port { + | RELAY VIA ssl STRING port { rule->r_action = A_RELAYVIA; if ($3) - rule->r_value.relayhost.flags = F_SSMTP; + rule->r_value.relayhost.flags = $3; if (strlcpy(rule->r_value.relayhost.hostname, $4, MAXHOSTNAMELEN) >= MAXHOSTNAMELEN) @@ -872,6 +877,7 @@ lookup(char *s) { "source", SOURCE }, { "ssl", SSL }, { "ssmtp", SSMTP }, + { "tls", TLS }, { "to", TO }, { "type", TYPE }, { "use", USE }, |