ipcrm,ipcs: make them NOEXEC
[oweals/busybox.git] / mailutils / popmaildir.c
index 642657919c38f5960f4cd68691f868dc9a53f25d..5756eaa764bc097e9d8c029f5e9b51415c4a4d56 100644 (file)
@@ -9,12 +9,31 @@
  *
  * 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:     "\nOptions:"
 /* //usage:  "\n       -b              Binary mode. Ignored" */
 /* //usage:  "\n       -d              Debug. Ignored" */
 /* //usage:  "\n       -m              Show used memory. Ignored" */
@@ -106,9 +125,9 @@ int popmaildir_main(int argc UNUSED_PARAM, char **argv)
        INIT_G();
 
        // parse options
-       opt_complementary = "-1:dd:t+:R+:L+:H+";
-       opts = getopt32(argv,
-               "bdmVcasTkt:" "R:Z:L:H:" IF_FEATURE_POPMAILDIR_DELIVERY("M:F:"),
+       opts = getopt32(argv, "^"
+               "bdmVcasTkt:+" "R:+Z:L:+H:+" IF_FEATURE_POPMAILDIR_DELIVERY("M:F:")
+               "\0" "-1:dd",
                &timeout, NULL, NULL, NULL, &opt_nlines
                IF_FEATURE_POPMAILDIR_DELIVERY(, &delivery, &delivery) // we treat -M and -F the same
        );