diff options
author | 2011-05-16 21:42:03 +0000 | |
---|---|---|
committer | 2011-05-16 21:42:03 +0000 | |
commit | 92ef89887898cff1b00c0a1f99b87e197c55ab19 (patch) | |
tree | 63f5341ea7a799c2a1a4ef33a17a6d9346453848 | |
parent | plug leak in make_aliases() (diff) | |
download | wireguard-openbsd-92ef89887898cff1b00c0a1f99b87e197c55ab19.tar.xz wireguard-openbsd-92ef89887898cff1b00c0a1f99b87e197c55ab19.zip |
when a C_VDOM recipient expands to a local user, envelope expansion will
reprocess the envelope. since the original condition we matched is still
C_VDOM, it triggers an expansion loop causing recipient to be rejected.
this *should* fix the issue experienced by armani@, it does on my laptop.
-rw-r--r-- | usr.sbin/smtpd/lka_session.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c index c2ff1ff5eef..f93adff8b71 100644 --- a/usr.sbin/smtpd/lka_session.c +++ b/usr.sbin/smtpd/lka_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_session.c,v 1.1 2011/05/16 21:05:51 gilles Exp $ */ +/* $OpenBSD: lka_session.c,v 1.2 2011/05/16 21:42:03 gilles Exp $ */ /* * Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org> @@ -425,6 +425,16 @@ lka_session_resolve_node(struct envelope *ep, struct expandnode *xn) dlv->type = D_MDA; dlv->agent.mda.to = xn->u; + /* overwrite the initial condition before we expand the + * envelope again. if we came from a C_VDOM, not doing + * so would lead to a VDOM loop causing recipient to be + * rejected. + * + * i'll find a more elegant solution later, for now it + * fixes an annoying bug. + */ + ep->rule.r_condition.c_type = C_DOM; + /* if expansion of a user results in same user ... deliver */ if (strcmp(xn->u.user, xn->as_user) == 0) break; |