total overhaul of mail applets. again. Vladimir as usual.
diff --git a/include/applets.h b/include/applets.h
index d52f9f0..0e4cbd5 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -151,7 +151,6 @@
USE_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, _BB_DIR_BIN, _BB_SUID_NEVER, fdflush))
USE_FDFORMAT(APPLET(fdformat, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_FDISK(APPLET(fdisk, _BB_DIR_SBIN, _BB_SUID_NEVER))
-//USE_FETCHMAIL(APPLET(fetchmail, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
USE_FEATURE_GREP_FGREP_ALIAS(APPLET_ODDNAME(fgrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER, fgrep))
USE_FIND(APPLET_NOEXEC(find, find, _BB_DIR_USR_BIN, _BB_SUID_NEVER, find))
USE_FINDFS(APPLET(findfs, _BB_DIR_SBIN, _BB_SUID_MAYBE))
@@ -237,8 +236,8 @@
USE_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
USE_MODPROBE_SMALL(APPLET_ODDNAME(lsmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
USE_UNLZMA(APPLET_ODDNAME(lzmacat, unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lzmacat))
-USE_FEATURE_SENDMAIL_MAILX(APPLET_ODDNAME(mail, sendmail, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sendmail))
USE_MAKEDEVS(APPLET(makedevs, _BB_DIR_SBIN, _BB_SUID_NEVER))
+USE_MAKEMIME(APPLET(makemime, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_MAN(APPLET(man, _BB_DIR_SBIN, _BB_SUID_NEVER))
USE_MATCHPATHCON(APPLET(matchpathcon, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
USE_MD5SUM(APPLET_ODDNAME(md5sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, md5sum))
@@ -281,6 +280,7 @@
USE_PIPE_PROGRESS(APPLET(pipe_progress, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_PIVOT_ROOT(APPLET(pivot_root, _BB_DIR_SBIN, _BB_SUID_NEVER))
USE_PKILL(APPLET_ODDNAME(pkill, pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER, pkill))
+USE_POPMAILDIR(APPLET(popmaildir, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
USE_HALT(APPLET_ODDNAME(poweroff, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, poweroff))
USE_PRINTENV(APPLET(printenv, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_PRINTF(APPLET_NOFORK(printf, printf, _BB_DIR_USR_BIN, _BB_SUID_NEVER, printf))
@@ -295,6 +295,7 @@
USE_READPROFILE(APPLET(readprofile, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
USE_REALPATH(APPLET(realpath, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_HALT(APPLET_ODDNAME(reboot, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, reboot))
+USE_REFORMIME(APPLET(reformime, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_RENICE(APPLET(renice, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_RESET(APPLET(reset, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_RESIZE(APPLET(resize, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
diff --git a/include/usage.h b/include/usage.h
index 4ee8205..19af348 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -1095,18 +1095,6 @@
"\n -H HEADS\n" \
"\n -S SECTORS" \
-#define fetchmail_trivial_usage \
- "[-w timeout] [-H [user:pass@]server[:port]] [-S] [-t] [-z] maildir [prog]"
-#define fetchmail_full_usage "\n\n" \
- "Fetch content of remote mailbox to local maildir\n" \
- "\nOptions:" \
- "\n -w timeout Network timeout" \
- "\n -H [user:pass@]server[:port] Server" \
- "\n -S Use openssl connection helper for secure servers" \
- "\n -t Get only headers" \
- "\n -z Delete messages on server" \
- "\n prog Run 'prog <message_file>' on message delivery" \
-
#define blkid_trivial_usage \
""
#define blkid_full_usage "\n\n" \
@@ -2378,6 +2366,16 @@
"/dev/hda[0-15]\n"
#endif
+#define makemime_trivial_usage \
+ "[OPTION]... [FILE]..."
+#define makemime_full_usage "\n\n" \
+ "Create MIME-encoded message\n" \
+ "\nOptions:" \
+ "\n -C Charset" \
+ "\n -e Tranfer encoding. Ignored. base64 is assumed" \
+ "\n" \
+ "\nOther options are silently ignored." \
+
#define man_trivial_usage \
"[OPTION]... [MANPAGE]..."
#define man_full_usage "\n\n" \
@@ -3095,6 +3093,33 @@
"\n -v Negate the matching" \
"\n -x Match whole name (not substring)" \
+#define popmaildir_trivial_usage \
+ "[OPTIONS] Maildir [connection-helper ...]"
+#define popmaildir_full_usage "\n\n" \
+ "Fetch content of remote mailbox to local maildir\n" \
+ "\nOptions:" \
+ "\n -b Binary mode. Ignored" \
+ "\n -d Debug. Ignored" \
+ "\n -m Show used memory. Ignored" \
+ "\n -V Show version. Ignored" \
+ "\n -c Use tcpclient. Ignored" \
+ "\n -a Use APOP protocol. Implied. If server supports APOP -> use it" \
+ "\n -s Skip authorization" \
+ "\n -T Get messages with TOP instead with RETR" \
+ "\n -k Keep retrieved messages on the server" \
+ "\n -t timeout Set network timeout" \
+ USE_FEATURE_POPMAILDIR_DELIVERY( \
+ "\n -F \"program arg1 arg2 ...\" Filter by program. May be multiple" \
+ "\n -M \"program arg1 arg2 ...\" Deliver by program" \
+ ) \
+ "\n -R size Remove old messages on the server >= size (in bytes). Ignored" \
+ "\n -Z N1-N2 Remove messages from N1 to N2 (dangerous). Ignored" \
+ "\n -L size Do not retrieve new messages >= size (in bytes). Ignored" \
+ "\n -H lines Type specified number of lines of a message. Ignored"
+#define popmaildir_example_usage \
+ "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n" \
+ "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n"
+
#define poweroff_trivial_usage \
"[-d delay] [-n] [-f]"
#define poweroff_full_usage "\n\n" \
@@ -3250,6 +3275,17 @@
"\n -n No call to sync()" \
"\n -f Force reboot (don't go through init)" \
+#define reformime_trivial_usage \
+ "[OPTION]... [FILE]..."
+#define reformime_full_usage "\n\n" \
+ "Parse MIME-encoded message\n" \
+ "\nOptions:" \
+ "\n -x prefix Extract content of MIME sections to files" \
+ "\n -X prog [args] Filter content of MIME sections through prog." \
+ "\n Must be the last option" \
+ "\n" \
+ "\nOther options are silently ignored." \
+
#define renice_trivial_usage \
"{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]"
#define renice_full_usage "\n\n" \
@@ -3484,9 +3520,7 @@
#define selinuxenabled_full_usage ""
#define sendmail_trivial_usage \
- "[-w timeout] [-H [user:pass@]server[:port]] [-S]\n" \
- "[-N type] [-f sender] [-F fullname] " \
- USE_FEATURE_SENDMAIL_MAILX("[-s subject] [-c cc-rcpt]... [-j charset] [-a attach]... [-e err-rcpt] ") "[-t] [rcpt]..."
+ "[OPTIONS] [rcpt]..."
#define sendmail_full_usage "\n\n" \
"Send an email\n" \
"\nOptions:" \
@@ -3498,11 +3532,15 @@
"\n -F fullname Sender full name. Overrides $NAME" \
USE_FEATURE_SENDMAIL_MAILX( \
"\n -s subject Subject" \
- "\n -c rcpt Cc: recipient. May be multiple" \
- "\n -j charset Assume charset for body and subject (" CONFIG_FEATURE_SENDMAIL_CHARSET ")" \
+ "\n -j charset Assume charset for body and subject (" CONFIG_FEATURE_MIME_CHARSET ")" \
"\n -a file File to attach. May be multiple" \
+ "\n -H \"prog args...\" Use external connection helper. E.g. openssl for secure servers" \
+ "\n -S server[:port] Server" \
+ ) \
+ USE_FEATURE_SENDMAIL_MAILXX( \
+ "\n -c rcpt Cc: recipient. May be multiple" \
"\n -e rcpt Errors-To: recipient" \
- )
+ )
"\n -t Read recipients and subject from body" \
"\n" \
"\nOther options are silently ignored; -oi is implied" \