+#include "h/mh.h"
+#include "distsbr.h"
+#include "sbr/getarguments.h"
+#include "sbr/smatch.h"
+#include "sbr/closefds.h"
+#include "sbr/m_draft.h"
+#include "sbr/context_find.h"
+#include "sbr/brkstring.h"
+#include "sbr/ambigsw.h"
+#include "sbr/path.h"
+#include "sbr/print_version.h"
+#include "sbr/print_help.h"
+#include "sbr/error.h"
+#include "h/done.h"
+#include "h/utils.h"
+#include "h/signals.h"
+#include "sbr/m_maildir.h"
+#include "sbr/m_mktemp.h"
+
+#ifndef CYRUS_SASL
+# define SASLminc(a) (a)
+#else /* CYRUS_SASL */
+# define SASLminc(a) 0
+#endif /* CYRUS_SASL */
+
+#ifndef TLS_SUPPORT
+# define TLSminc(a) (a)
+#else /* TLS_SUPPORT */
+# define TLSminc(a) 0
+#endif /* TLS_SUPPORT */
+
+#define WHOM_SWITCHES \
+ X("alias aliasfile", 0, ALIASW) \
+ X("check", 0, CHKSW) \
+ X("nocheck", 0, NOCHKSW) \
+ X("draft", 0, DRAFTSW) \
+ X("draftfolder +folder", 6, DFOLDSW) \
+ X("draftmessage msg", 6, DMSGSW) \
+ X("nodraftfolder", 0, NDFLDSW) \
+ X("version", 0, VERSIONSW) \
+ X("help", 0, HELPSW) \
+ X("client host", -6, CLIESW) \
+ X("server host", 0, SERVSW) \
+ X("snoop", 0, SNOOPSW) \
+ X("sasl", SASLminc(4), SASLSW) \
+ X("saslmech mechanism", SASLminc(-5), SASLMECHSW) \
+ X("user username", SASLminc(-4), USERSW) \
+ X("port server port name/number", 4, PORTSW) \
+ X("tls", TLSminc(-3), TLSSW) \
+ X("initialtls", TLSminc(-10), INITTLSSW) \
+ X("notls", TLSminc(-5), NTLSSW) \
+ X("mts smtp|sendmail/smtp|sendmail/pipe", 0, MTSSW) \
+
+#define X(sw, minchars, id) id,
+DEFINE_SWITCH_ENUM(WHOM);
+#undef X
+
+#define X(sw, minchars, id) { sw, minchars, id },
+DEFINE_SWITCH_ARRAY(WHOM, switches);
+#undef X