scribo

Email-based phlog generator
git clone git://git.z3bra.org/scribo.git
Log | Files | Refs

commit 36223940e8b6524ea73bbbfd801265e8def6dc4e
parent 32d45f430b241c943ea593a9125211e9842013dc
Author: Willy Goiffon <dev@z3bra.org>
Date:   Wed,  9 Sep 2020 17:24:28 +0200

Accept emails from any address if author is NULL

Diffstat:
Mconfig.def.h | 2+-
Mscribo.c | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -1,7 +1,7 @@ char *basedir = "."; char *datefmt = "%c"; -char *author = "contact@z3bra.org"; +char *author = NULL; char *host = "z3bra.org"; int port = 70; diff --git a/scribo.c b/scribo.c @@ -48,7 +48,7 @@ int writeindex(FILE *, char *); void usage(char *pgm) { - fprintf(stderr, "usage: %s [-a author] [-b basedir] [-d fmt] [-io file] [-x cmd]\n", pgm); + fprintf(stderr, "usage: %s [-h] [-a address] [-b basedir] [-d fmt] [-io file] [-x cmd]\n", pgm); } char * @@ -192,7 +192,7 @@ verifyheaders(struct headers *head) /* verify sender's address */ addr = rfc5322_addr(header(head, "From")); - if (strncmp(addr, author, strlen(author))) { + if (author && strncmp(addr, author, strlen(author))) { fprintf(stderr, "<%s> is not authorized to publish content\n", addr); return -1; }