diff options
-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: |