]> git.ipfire.org Git - people/ms/dma.git/blobdiff - dma.h
debian: build with consistent flags
[people/ms/dma.git] / dma.h
diff --git a/dma.h b/dma.h
index 8422b89d4b18f02b3531941eb63fdb03092b80cd..03139dc25677de083982e9af62090968581a0332 100644 (file)
--- a/dma.h
+++ b/dma.h
 #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;
@@ -111,7 +121,6 @@ struct config {
        const char *certfile;
        int features;
        const char *mailname;
-       const char *mailnamefile;
 
        /* XXX does not belong into config */
        SSL *ssl;
@@ -141,10 +150,12 @@ extern struct aliases aliases;
 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);
@@ -167,7 +178,7 @@ int dns_get_mx_list(const char *, int, struct mx_hostentry **, int);
 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 **);
@@ -186,7 +197,7 @@ int acquirespool(struct qitem *);
 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 *);