diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-09-11 23:46:25 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-09-11 23:46:25 +0000 |
commit | f6853c875abfb186ac07cacdcfbe38804259ce6d (patch) | |
tree | 7e2c9d1ab1146324e65b0145d8a338e4d6e5fd1f | |
parent | 903f2bf037665afec0b0dd3124619d4c9798089c (diff) | |
download | fetchmail-f6853c875abfb186ac07cacdcfbe38804259ce6d.tar.gz fetchmail-f6853c875abfb186ac07cacdcfbe38804259ce6d.tar.bz2 fetchmail-f6853c875abfb186ac07cacdcfbe38804259ce6d.zip |
Option-processing for SMTP forwarding works now.
svn path=/trunk/; revision=84
-rw-r--r-- | fetchmail.h | 8 | ||||
-rw-r--r-- | 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 { @@ -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: |