From 90577f3ea3ac8dd575ea47a6cab5ca32ea6f379e Mon Sep 17 00:00:00 2001 From: Gilles Chehade Date: Fri, 15 Apr 2011 17:01:06 +0000 Subject: kill message_id and message_uid smtpd now has an evpid associated to each delivery message, the evpid is an u_int64_t where the upper 32 bits are the msgid, and the 32 bits are the envelope unique identifier for that message. this results in lots of space saved in both disk-based and ram-based queues, but also simplifies a lot of code. change has been stressed on my desktop, and has ran on my MX for the entire afternoon without a regression. --- usr.sbin/smtpd/smtp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'usr.sbin/smtpd/smtp.c') diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c index 83e126c77ff..1908db95caa 100644 --- a/usr.sbin/smtpd/smtp.c +++ b/usr.sbin/smtpd/smtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp.c,v 1.81 2011/03/15 19:24:55 gilles Exp $ */ +/* $OpenBSD: smtp.c,v 1.82 2011/04/15 17:01:05 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -99,8 +99,7 @@ smtp_imsg(struct smtpd *env, struct imsgev *iev, struct imsg *imsg) s = session_lookup(env, ss->id); if (s == NULL) return; - strlcpy(s->s_msg.message_id, ss->u.msgid, - sizeof s->s_msg.message_id); + s->s_msg.evpid = (u_int64_t)ss->u.msgid << 32; session_pickup(s, ss); return; -- cgit v1.2.3