From 6bde84180d254953697a5968a64897be7a5b9489 Mon Sep 17 00:00:00 2001 From: Eric Faurot Date: Sat, 29 Sep 2012 10:35:02 +0000 Subject: finally remove rule member from struct envelope. "wow!" gilles@ --- usr.sbin/smtpd/lka.c | 12 ++---------- usr.sbin/smtpd/lka_session.c | 3 ++- usr.sbin/smtpd/smtpd.h | 3 +-- 3 files changed, 5 insertions(+), 13 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c index e7aad3db9a0..7f855d88e77 100644 --- a/usr.sbin/smtpd/lka.c +++ b/usr.sbin/smtpd/lka.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka.c,v 1.141 2012/09/28 14:03:00 chl Exp $ */ +/* $OpenBSD: lka.c,v 1.142 2012/09/29 10:35:00 eric Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard @@ -84,16 +84,8 @@ lka_imsg(struct imsgev *iev, struct imsg *imsg) ss = imsg->data; ss->code = 530; rule = ruleset_match(&ss->envelope); - if (rule) { + if (rule) ss->code = 250; - ss->envelope.rule = *rule; - ss->envelope.expire = rule->r_qexpire; - if (rule->r_action == A_RELAY || - rule->r_action == A_RELAYVIA) - ss->envelope.type = D_MTA; - else - ss->envelope.type = D_MDA; - } imsg_compose_event(iev, IMSG_LKA_RULEMATCH, 0, 0, -1, ss, sizeof *ss); return; diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c index 9afa1bb731f..88be6d8b656 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.36 2012/09/27 18:57:25 eric Exp $ */ +/* $OpenBSD: lka_session.c,v 1.37 2012/09/29 10:35:01 eric Exp $ */ /* * Copyright (c) 2011 Gilles Chehade @@ -293,6 +293,7 @@ lka_submit(struct lka_session *lks, struct rule *rule, struct expandnode *xn) const char *tag; ep = xmemdup(&lks->envelope, sizeof *ep, "lka_submit"); + ep->expire = rule->r_qexpire; switch (rule->r_action) { case A_RELAY: diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index 024777cacb4..737ca5c633c 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.373 2012/09/29 10:32:08 eric Exp $ */ +/* $OpenBSD: smtpd.h,v 1.374 2012/09/29 10:35:01 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -380,7 +380,6 @@ struct envelope { TAILQ_ENTRY(envelope) entry; char tag[MAX_TAG_SIZE]; - struct rule rule; uint64_t session_id; uint64_t batch_id; -- cgit v1.2.3