summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtp.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2011-04-15 17:01:06 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2011-04-15 17:01:06 +0000
commit90577f3ea3ac8dd575ea47a6cab5ca32ea6f379e (patch)
tree3a4f7b0efe70331a6e8a0c5ab18b1325bf438032 /usr.sbin/smtpd/smtp.c
parentb36a9bc6cf702ad5f5f043755f100e39d0db2a83 (diff)
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.
Diffstat (limited to 'usr.sbin/smtpd/smtp.c')
-rw-r--r--usr.sbin/smtpd/smtp.c5
1 files changed, 2 insertions, 3 deletions
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 <gilles@openbsd.org>
@@ -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;