summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@users.sourceforge.net>2003-07-03 18:59:40 +0000
committerJosé Fonseca <jrfonseca@users.sourceforge.net>2003-07-03 18:59:40 +0000
commit15350708d628c8be91ca0ac00ec7956bbf3f6c80 (patch)
treee9d05b827d16b7b948416f9e971b041bad03ef78
parent15ff73b9843c79c1709f4a521aaa09285105f8bc (diff)
Documentation and packaging fixes for the latest changes.
-rw-r--r--Makefile.am2
-rw-r--r--NEWS2
-rw-r--r--TODO2
-rw-r--r--local.c4
-rw-r--r--main.c23
-rw-r--r--sample.esmtprc11
6 files changed, 28 insertions, 16 deletions
diff --git a/Makefile.am b/Makefile.am
index 8402471..db28af1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ bin_PROGRAMS = esmtp
dist_man_MANS = esmtp.1
-esmtp_SOURCES = main.h main.c parser.y lexer.l list.h message.h message.c smtp.h smtp.c local.h local.c rfc822.c
+esmtp_SOURCES = main.h main.c parser.y lexer.l list.h message.h message.c smtp.h smtp.c local.h local.c rfc822.c xmalloc.h
EXTRA_DIST = README.mutt sample.esmtprc
diff --git a/NEWS b/NEWS
index 80af49a..4036167 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ Version 0.4 (under development)
* Debian packaging.
* Fixes to compile on FreeBSD (Tim Hemel).
+ * Local delivery via a MDA.
+ * Extraction of the recipients from the headers ('-t' option).
Version 0.3
diff --git a/TODO b/TODO
index 7d844d1..094a84d 100644
--- a/TODO
+++ b/TODO
@@ -1 +1 @@
-- safer memory allocation
+- add a man page for the configuration file
diff --git a/local.c b/local.c
index eadfa3a..24c11af 100644
--- a/local.c
+++ b/local.c
@@ -15,11 +15,7 @@
#include "xmalloc.h"
-#if 0
char *mda = NULL;
-#else
-char *mda = "/usr/bin/procmail -d %T";
-#endif
FILE *mda_fp = NULL;
diff --git a/main.c b/main.c
index 2188542..022c8d7 100644
--- a/main.c
+++ b/main.c
@@ -15,6 +15,15 @@
#include "local.h"
+/** Modes of operation. */
+typedef enum {
+ ENQUEUE, /**< delivery mode */
+ NEWALIAS, /**< initialize alias database */
+ MAILQ, /**< list mail queue */
+ FLUSHQ /**< flush the mail queue */
+} opmode_t;
+
+
int verbose = 0;
FILE *log_fp = NULL;
@@ -26,16 +35,8 @@ int main (int argc, char **argv)
enum notify_flags notify = Notify_NOTSET;
char *from = NULL;
message_t *message;
- int local, remote;
- int parse_headers;
-
- /* Modes of operation. */
- enum {
- ENQUEUE, /* delivery mode */
- NEWALIAS, /* initialize alias database */
- MAILQ, /* list mail queue */
- FLUSHQ /* flush the mail queue */
- } mode;
+ int parse_headers, local, remote;
+ opmode_t mode;
identities_init();
@@ -346,5 +347,7 @@ int main (int argc, char **argv)
message_free(message);
+ identities_cleanup();
+
exit(EX_OK);
}
diff --git a/sample.esmtprc b/sample.esmtprc
index d5ab87b..8ff89f0 100644
--- a/sample.esmtprc
+++ b/sample.esmtprc
@@ -52,3 +52,14 @@ identity myself@somewhere.com
# NOTE: the default indentity settings aren't shared by the other identities.
# Everything (username, password, etc.) must be specified for every identity
# even if they don't differ from the default identity.
+
+
+# Set the Mail Delivery Agent (MDA)
+#
+mda = "/usr/bin/procmail -d %T"
+#
+# Some possible MDAs are
+# - "/usr/bin/procmail -d %T"
+# - "/usr/bin/deliver"
+# - "/usr/sbin/sendmail -i -f %F %T"
+# - "/usr/lib/mail.local %s"