From f6853c875abfb186ac07cacdcfbe38804259ce6d Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 11 Sep 1996 23:46:25 +0000 Subject: Option-processing for SMTP forwarding works now. svn path=/trunk/; revision=84 --- fetchmail.h | 8 ++++---- options.c | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/fetchmail.h b/fetchmail.h index 310cec20..6a13dae5 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -43,10 +43,10 @@ #define O_VERBOSE 2 /* excessive */ /* output sink type */ -#define TO_SMTP 0 /* use SMTP forwarding */ -#define TO_FOLDER 1 /* use a mailbox */ -#define TO_STDOUT 2 /* use stdout */ -#define TO_MDA 3 /* use agent */ +#define TO_SMTP 1 /* use SMTP forwarding */ +#define TO_FOLDER 2 /* use a mailbox */ +#define TO_STDOUT 3 /* use stdout */ +#define TO_MDA 4 /* use agent */ struct hostrec { diff --git a/options.c b/options.c index 3d0ab4b9..3d116aa2 100644 --- a/options.c +++ b/options.c @@ -222,7 +222,13 @@ struct hostrec *queryctl; break; case 'S': case LA_SMTPHOST: - strncpy(queryctl->smtphost,optarg,sizeof(queryctl->smtphost)-1); + if (fflag) + errflag++; + else { + fflag++; + queryctl->output = TO_SMTP; + strncpy(queryctl->smtphost,optarg,sizeof(queryctl->smtphost)-1); + } break; case 'L': case LA_LOGFILE: -- cgit v1.2.3