summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpd.h
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-09-04 11:49:24 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-09-04 11:49:24 +0000
commit00603db1c169affae230b22ff5aa4347dd6ae2df (patch)
tree85fccd0ddc749a3e3d5bd67c6f4db42c74b7fb56 /usr.sbin/smtpd/smtpd.h
parentb61e4f581dc2071fa5ca2f5cf7bc0903e21b9efe (diff)
Major mda update:
- Fix: check external mda / mail.local exit code. - Fix: check maildir rename(2) return code. - Fix: check read(2) and write(2) return codes. - Fix: in parent, batchp->env was not set to the env of the current process. - Fix: clean file in tmp if maildir delivery fails. - Fix: mark message as temporarily failed upon start, unmark upon sucessful delivery. (safe default) - Fix: kill all message drops, aka. PERMFAILUREs, with one exception: when the local user no longer exists. - Cleanup: store.c is merged with its only user, mda.c - Feature: in parent, child_add now returns pointer to the new child struct. This is used to store and later access child->mda_batch member in order to associate children with their batches. - Feature: in parent, external mda / mail.local will timeout after 5 minutes.
Diffstat (limited to 'usr.sbin/smtpd/smtpd.h')
-rw-r--r--usr.sbin/smtpd/smtpd.h50
1 files changed, 24 insertions, 26 deletions
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index 60ecd2e5ec2..d539be9b01c 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.138 2009/09/02 12:47:06 jacekm Exp $ */
+/* $OpenBSD: smtpd.h,v 1.139 2009/09/04 11:49:23 jacekm Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -145,8 +145,7 @@ enum imsg_type {
IMSG_LKA_MAIL,
IMSG_LKA_RCPT,
IMSG_LKA_SECRET,
- IMSG_MDA_MAILBOX_FILE,
- IMSG_MDA_MESSAGE_FILE,
+ IMSG_MDA_FINALIZE,
IMSG_MFA_RCPT,
IMSG_MFA_MAIL,
@@ -175,7 +174,8 @@ enum imsg_type {
IMSG_PARENT_FORWARD_OPEN,
IMSG_PARENT_MAILBOX_OPEN,
IMSG_PARENT_MESSAGE_OPEN,
- IMSG_PARENT_MAILBOX_RENAME,
+ IMSG_PARENT_MAILDIR_RENAME,
+ IMSG_PARENT_MAILDIR_FAIL,
IMSG_PARENT_STATS,
IMSG_PARENT_AUTHENTICATE,
@@ -455,21 +455,6 @@ enum batch_type {
T_BOUNCE_BATCH = 0x4
};
-enum child_type {
- CHILD_INVALID,
- CHILD_DAEMON,
- CHILD_MDA,
- CHILD_ENQUEUE_OFFLINE
-};
-
-struct child {
- SPLAY_ENTRY(child) entry;
-
- pid_t pid;
- enum child_type type;
- enum smtp_proc_type title;
-};
-
struct batch {
SPLAY_ENTRY(batch) b_nodes;
@@ -490,9 +475,29 @@ struct batch {
FILE *messagefp;
TAILQ_HEAD(, message) messages;
+ int mboxfd;
+ int datafd;
+ int cleanup_parent;
+
enum batch_status status;
};
+enum child_type {
+ CHILD_INVALID,
+ CHILD_DAEMON,
+ CHILD_MDA,
+ CHILD_ENQUEUE_OFFLINE
+};
+
+struct child {
+ SPLAY_ENTRY(child) entry;
+
+ pid_t pid;
+ enum child_type type;
+ enum smtp_proc_type title;
+ struct batch mda_batch;
+};
+
enum session_state {
S_INIT = 0,
S_GREETED,
@@ -882,13 +887,6 @@ void session_bufferevent_new(struct session *);
SPLAY_PROTOTYPE(sessiontree, session, s_nodes, session_cmp);
-/* store.c */
-int file_copy(FILE *, FILE *, struct path *, enum action_type, int);
-int store_write_header(struct batch *, struct message *, FILE *, int);
-int store_write_message(struct batch *, struct message *);
-int store_write_daemon(struct batch *, struct message *);
-int store_message(struct batch *, struct message *);
-
/* config.c */
#define PURGE_LISTENERS 0x01
#define PURGE_MAPS 0x02