#include <openssl/ssl.h>
#include <netdb.h>
-#define VERSION "DragonFly Mail Agent"
+#define VERSION "DragonFly Mail Agent " DMA_VERSION
#define BUF_SIZE 2048
+#define ERRMSG_SIZE 200
+#define USERNAME_SIZE 50
#define MIN_RETRY 300 /* 5 minutes */
#define MAX_RETRY (3*60*60) /* retry at least every 3 hours */
#define MAX_TIMEOUT (5*24*60*60) /* give up after 5 days */
#define CONF_PATH "/etc/dma/dma.conf" /* Default path to dma.conf */
#endif
+#ifndef LIBEXEC_PATH
+#error Please define LIBEXEC_PATH
+#endif
+
+#define DMA_ROOT_USER "mail"
+#define DMA_GROUP "mail"
+
+
struct stritem {
SLIST_ENTRY(stritem) next;
char *str;
const char *certfile;
int features;
const char *mailname;
- const char *mailnamefile;
/* XXX does not belong into config */
SSL *ssl;
extern struct config config;
extern struct strlist tmpfs;
extern struct authusers authusers;
-extern const char *username;
+extern char username[USERNAME_SIZE];
+extern uid_t useruid;
extern const char *logident_base;
-extern char neterr[BUF_SIZE];
+extern char neterr[ERRMSG_SIZE];
+extern char errmsg[ERRMSG_SIZE];
/* aliases_parse.y */
int yyparse(void);
char *ssl_errstr(void);
int read_remote(int, int, char *);
ssize_t send_remote_command(int, const char*, ...);
-int deliver_remote(struct qitem *, const char **);
+int deliver_remote(struct qitem *);
/* base64.c */
int base64_encode(const void *, int, char **);
void dropspool(struct queue *, struct qitem *);
/* local.c */
-int deliver_local(struct qitem *, const char **errmsg);
+int deliver_local(struct qitem *);
/* mail.c */
void bounce(struct qitem *, const char *);