6 |
#include <errno.h> |
#include <errno.h> |
7 |
#include <setjmp.h> |
#include <setjmp.h> |
8 |
|
|
9 |
|
#if defined SSL_TLS || defined ENCRYPTED_PASSWORDS |
10 |
|
#include <openssl/crypto.h> |
11 |
|
#endif |
12 |
|
|
13 |
#include "config.h" |
#include "config.h" |
14 |
#include "imapfilter.h" |
#include "imapfilter.h" |
15 |
#include "data.h" |
#include "data.h" |
57 |
#ifdef ENCRYPTED_PASSWORDS |
#ifdef ENCRYPTED_PASSWORDS |
58 |
"p" |
"p" |
59 |
#endif |
#endif |
60 |
"qv")) != -1) { |
"qvV")) != -1) { |
61 |
switch (c) { |
switch (c) { |
62 |
case 'c': |
case 'c': |
63 |
confile = optarg; |
confile = optarg; |
92 |
options &= OPTION_DETAILS_CLEAR; |
options &= OPTION_DETAILS_CLEAR; |
93 |
options |= OPTION_DETAILS_VERBOSE; |
options |= OPTION_DETAILS_VERBOSE; |
94 |
break; |
break; |
95 |
|
case 'V': |
96 |
|
version(); |
97 |
|
exit(ERROR_UNDEFINED); |
98 |
|
break; |
99 |
default: |
default: |
100 |
usage(); |
usage(); |
101 |
exit(ERROR_UNDEFINED); |
exit(ERROR_UNDEFINED); |
230 |
#ifdef ENCRYPTED_PASSWORDS |
#ifdef ENCRYPTED_PASSWORDS |
231 |
"p" |
"p" |
232 |
#endif |
#endif |
233 |
"qv] [-c configfile] [-d interval] [-l logfile]\n"); |
"qvV] [-c configfile] [-d interval] [-l logfile]\n"); |
234 |
|
} |
235 |
|
|
236 |
|
|
237 |
|
/* |
238 |
|
* Print program's version, and if it is built in, OpenSSL's version number. |
239 |
|
*/ |
240 |
|
void version(void) |
241 |
|
{ |
242 |
|
fprintf(stderr, "IMAPFilter %s" |
243 |
|
#if defined SSL_TLS || defined ENCRYPTED_PASSWORDS |
244 |
|
", OpenSSL 0x%8.8lx" |
245 |
|
#endif |
246 |
|
"\n", IMAPFILTER_VERSION |
247 |
|
#if defined SSL_TLS || defined ENCRYPTED_PASSWORDS |
248 |
|
,SSLeay() |
249 |
|
#endif |
250 |
|
); |
251 |
} |
} |