From 6806ee378011e2764662a9d508e71e773fdb50f1 Mon Sep 17 00:00:00 2001 From: Gilles Chehade Date: Mon, 9 Nov 2009 22:28:09 +0000 Subject: support the userpart+foobar@domainpart syntax which got wiped when i wrote the virtual domains support as it was in my way. this time, make it work as it should: userpart+foobar@domainpart becomes: path->user = userpart+foobar path->domain = domainpart path->pw_name = userpart discussed quickly with jacekm@ --- usr.sbin/smtpd/lka.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usr.sbin') diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c index 71849263256..e49642e648f 100644 --- a/usr.sbin/smtpd/lka.c +++ b/usr.sbin/smtpd/lka.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka.c,v 1.83 2009/11/08 23:08:56 gilles Exp $ */ +/* $OpenBSD: lka.c,v 1.84 2009/11/09 22:28:08 gilles Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard @@ -1014,10 +1014,15 @@ lka_resolve_path(struct smtpd *env, struct lkasession *lkasession, struct path * case C_NET: case C_DOM: { char username[MAXLOGNAME]; + char *sep; struct passwd *pw; lowercase(username, path->user, sizeof(username)); + sep = strchr(username, '+'); + if (sep != NULL) + *sep = '\0'; + if (aliases_exist(env, path->rule.r_amap, username)) { path->flags |= F_PATH_ALIAS; return 1; -- cgit v1.2.3