X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=mailutils%2Fpopmaildir.c;h=a4aad3662cb85736c8dad9b41d2648cbeeb0b53d;hb=00bd76728d44901a260f2dcdbeed52b3c85d6b6b;hp=f37db03d53080b951fe7804f8cb3de22978ea24e;hpb=0ef64bdb40c54681e8dd5ab8df42ac88e4ab1d4a;p=oweals%2Fbusybox.git diff --git a/mailutils/popmaildir.c b/mailutils/popmaildir.c index f37db03d5..a4aad3662 100644 --- a/mailutils/popmaildir.c +++ b/mailutils/popmaildir.c @@ -9,14 +9,68 @@ * * Licensed under GPLv2, see file LICENSE in this source tree. */ +//config:config POPMAILDIR +//config: bool "popmaildir (10 kb)" +//config: default y +//config: help +//config: Simple yet powerful POP3 mail popper. Delivers content +//config: of remote mailboxes to local Maildir. +//config: +//config:config FEATURE_POPMAILDIR_DELIVERY +//config: bool "Allow message filters and custom delivery program" +//config: default y +//config: depends on POPMAILDIR +//config: help +//config: Allow to use a custom program to filter the content +//config: of the message before actual delivery (-F "prog [args...]"). +//config: Allow to use a custom program for message actual delivery +//config: (-M "prog [args...]"). + +//applet:IF_POPMAILDIR(APPLET(popmaildir, BB_DIR_USR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_POPMAILDIR) += popmaildir.o mail.o + +//usage:#define popmaildir_trivial_usage +//usage: "[OPTIONS] MAILDIR [CONN_HELPER ARGS]" +//usage:#define popmaildir_full_usage "\n\n" +//usage: "Fetch content of remote mailbox to local maildir\n" +/* //usage: "\n -b Binary mode. Ignored" */ +/* //usage: "\n -d Debug. Ignored" */ +/* //usage: "\n -m Show used memory. Ignored" */ +/* //usage: "\n -V Show version. Ignored" */ +/* //usage: "\n -c Use tcpclient. Ignored" */ +/* //usage: "\n -a Use APOP protocol. Implied. If server supports APOP -> use it" */ +//usage: "\n -s Skip authorization" +//usage: "\n -T Get messages with TOP instead of RETR" +//usage: "\n -k Keep retrieved messages on the server" +//usage: "\n -t SEC Network timeout" +//usage: IF_FEATURE_POPMAILDIR_DELIVERY( +//usage: "\n -F 'PROG ARGS' Filter program (may be repeated)" +//usage: "\n -M 'PROG ARGS' Delivery program" +//usage: ) +//usage: "\n" +//usage: "\nFetch from plain POP3 server:" +//usage: "\npopmaildir -k DIR nc pop3.server.com 110 = BYTES. Ignored" */ +/* //usage: "\n -Z N1-N2 Remove messages from N1 to N2 (dangerous). Ignored" */ +/* //usage: "\n -L BYTES Don't retrieve new messages >= BYTES. Ignored" */ +/* //usage: "\n -H LINES Type first LINES of a message. Ignored" */ +//usage: +//usage:#define popmaildir_example_usage +//usage: "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [password" string md5_begin(&md5.ctx); - md5_hash(buf, strlen(buf), &md5.ctx); - md5_hash(G.pass, strlen(G.pass), &md5.ctx); - md5_end(res, &md5.ctx); + md5_hash(&md5.ctx, buf, strlen(buf)); + md5_hash(&md5.ctx, G.pass, strlen(G.pass)); + md5_end(&md5.ctx, res); *bin2hex(md5.hex, (char*)res, 16) = '\0'; // APOP s = xasprintf("%s %s", G.user, md5.hex);