diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-04-16 15:35:07 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-04-16 15:35:07 +0000 |
commit | dd6deb459c9ab0661ccbdc8771cdfe58f41d505d (patch) | |
tree | 1945ddb895a10f363aab71f084b07d38c9a1b703 /usr.sbin/smtpd/smtpd.h | |
parent | 9a62f48680726b99408b4681140b0a804c4596a9 (diff) |
Total rewrite of the sendmail interface. Adds support for -t, -v,
and -F cmdline args. Also, date and Message-Id headers are added
when missing.
The main trouble with the current enqueue code is that it requires
dealing with problems in the control process that are already solved
in the smtp process, ie. duplicating a lot of code which interacts
with untrusted clients. This diff solves this by making sendmail
obtain a SMTP socket from smtp via smtpd.sock, and using that socket
to deliver the message. For smtpd it looks as if connection was
made from the network, only difference being the F_MESSAGE_ENQUEUED
message flag, handy when differentation between local and remote
deliveries is wanted.
Most of the features come from the femail program, created by henning@.
Additional testing by Nigel J. Taylor.
ok gilles@, henning@ happy with smtpd using femail code
Diffstat (limited to 'usr.sbin/smtpd/smtpd.h')
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index bb8207271eb..99c6bca3455 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.98 2009/04/15 20:34:59 jacekm Exp $ */ +/* $OpenBSD: smtpd.h,v 1.99 2009/04/16 15:35:06 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -216,7 +216,9 @@ enum imsg_type { IMSG_MTA_RESUME, IMSG_SMTP_RESUME, - IMSG_STATS + IMSG_STATS, + + IMSG_SMTP_ENQUEUE }; #define IMSG_HEADER_SIZE sizeof(struct imsg_hdr) @@ -227,20 +229,11 @@ enum blockmodes { BM_NONBLOCK }; -enum ctl_state { - CS_NONE = 0, - CS_INIT, - CS_RCPT, - CS_FD, - CS_DONE -}; - struct ctl_conn { TAILQ_ENTRY(ctl_conn) entry; u_int8_t flags; #define CTL_CONN_NOTIFY 0x01 struct imsgbuf ibuf; - enum ctl_state state; }; TAILQ_HEAD(ctl_connlist, ctl_conn); |