From 15350708d628c8be91ca0ac00ec7956bbf3f6c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Thu, 3 Jul 2003 18:59:40 +0000 Subject: Documentation and packaging fixes for the latest changes. --- Makefile.am | 2 +- NEWS | 2 ++ TODO | 2 +- local.c | 4 ---- main.c | 23 +++++++++++++---------- sample.esmtprc | 11 +++++++++++ 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" -- cgit v1.2.3