summaryrefslogtreecommitdiff
path: root/frm
diff options
context:
space:
mode:
authorAlain Magloire <alainm@gnu.org>2001-11-12 03:37:38 +0000
committerAlain Magloire <alainm@gnu.org>2001-11-12 03:37:38 +0000
commitf25ebf2f2f634e731a7b5ffd5828bec325e0926f (patch)
tree0b818da345d165f37f43c30a7592658a9cacf858 /frm
parent5a79e104e2b745587db5532ec730d1c99384d111 (diff)
downloadmailutils-f25ebf2f2f634e731a7b5ffd5828bec325e0926f.tar.gz
mailutils-f25ebf2f2f634e731a7b5ffd5828bec325e0926f.tar.bz2
Support in POP3 maibox client for APOP authentication.
This should work, now: #MAIL='pop://alain;AUTH=+APOP@localhost' ./frm Pop passwd: secret <--- apop secret ... * mailbox/folder_pop.c (folder_pop_get_authority): Enable APOP code. * mailbx/mbx_pop.c: Add md5-rsa.h. (_pop_apop): New function to do APOP authentication. (_pop_user): Factor some code in pop_get_user() and pop_get_passwd() to share with _pop_apop(). (pop_get_user): New function, get the user login. (pop_get_passwd): New function, get the user passwd. (pop_get_md5): New function get timestamp. * mailbox/url_pop.c: Add 2001 in Copyright. * pop3d/apop.c: Remove trailing spaces. * frm/frm.c: New option -d, --debug. To put the mailbox_t in debug mode, very practicle to watch the traffic.
Diffstat (limited to 'frm')
-rw-r--r--frm/frm.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/frm/frm.c b/frm/frm.c
index 8fa95e4d6..bcd8b9da3 100644
--- a/frm/frm.c
+++ b/frm/frm.c
@@ -37,6 +37,7 @@ static void usage (const char *argv);
static struct option long_options[] =
{
+ {"debug", no_argument, 0, 'd'},
{"help", no_argument, 0, 'h'},
{"field", required_argument, 0, 'f'},
{"to", no_argument, 0, 'l'},
@@ -50,7 +51,7 @@ static struct option long_options[] =
{0, 0, 0, 0}
};
-const char *short_options ="hf:lnQqSs:tv";
+const char *short_options ="dhf:lnQqSs:tv";
static char* show_field;
static int show_to;
@@ -62,6 +63,7 @@ static int be_quiet;
static int align = 1;
static int show_query;
static int have_new_mail;
+static int dbug;
#define IS_READ 0x001
#define IS_OLD 0x010
@@ -199,6 +201,7 @@ usage (const char *argv)
{
printf ("GNU Mailutils.\n");
printf ("Usage: %s [OPTIONS]\n\n", argv);
+ printf (" -d, --debug display debuging information\n");
printf (" -h, --help display this help and exit\n");
printf (" -f, --field=string header field to display\n");
printf (" -l, --to include the To: information\n");
@@ -235,6 +238,10 @@ main(int argc, char **argv)
{
switch (c)
{
+ case 'd':
+ dbug++;
+ break;
+
case 'h':
usage (argv[0]);
break;
@@ -325,13 +332,27 @@ main(int argc, char **argv)
observer_t observer;
observable_t observable;
- if ((status = mailbox_create_default (&mbox, mailbox_name) != 0)
- || (status = mailbox_open (mbox, MU_STREAM_READ) != 0))
+ status = mailbox_create_default (&mbox, mailbox_name);
+ if (status != 0)
{
- fprintf (stderr, "could not open mailbox\n");
+ fprintf (stderr, "could not create mailbox object\n");
exit (3);
}
+ if (dbug)
+ {
+ mu_debug_t debug;
+ mailbox_get_debug (mbox, &debug);
+ mu_debug_set_level (debug, MU_DEBUG_TRACE|MU_DEBUG_PROT);
+ }
+
+ status = mailbox_open (mbox, MU_STREAM_READ);
+ if (status != 0)
+ {
+ fprintf (stderr, "could not open mailbox\n");
+ exit (4);
+ }
+
if (! be_quiet)
{
observer_create (&observer, mbox);

Return to:

Send suggestions and report system problems to the System administrator.