Make POP support always be turned on.
authorKen Hornstein <kenh@pobox.com>
Fri, 27 Jan 2012 17:30:52 +0000 (12:30 -0500)
committerKen Hornstein <kenh@pobox.com>
Fri, 27 Jan 2012 17:30:52 +0000 (12:30 -0500)
Makefile.am
configure.ac
docs/pending-release-notes
man/inc.man
man/mh-chart.man
man/msgchk.man
uip/inc.c
uip/msgchk.c

index 65fd867..9d10a03 100644 (file)
@@ -188,10 +188,8 @@ uip_forw_SOURCES = uip/forw.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \
                   uip/annosbr.c uip/distsbr.c
 uip_forw_LDADD = $(LDADD) $(ICONVLIB)
 
                   uip/annosbr.c uip/distsbr.c
 uip_forw_LDADD = $(LDADD) $(ICONVLIB)
 
-uip_inc_SOURCES = uip/inc.c uip/scansbr.c uip/dropsbr.c uip/termsbr.c
-if POP_SUPPORT
-uip_inc_SOURCES += uip/popsbr.c
-endif
+uip_inc_SOURCES = uip/inc.c uip/scansbr.c uip/dropsbr.c uip/termsbr.c \
+                 uip/popsbr.c
 uip_inc_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(SASLLIB)
 
 uip_install_mh_SOURCES = uip/install-mh.c
 uip_inc_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(SASLLIB)
 
 uip_install_mh_SOURCES = uip/install-mh.c
@@ -229,10 +227,7 @@ uip_mhstore_SOURCES = uip/mhstore.c uip/mhparse.c uip/mhcachesbr.c \
                      uip/mhmisc.c uip/mhfree.c uip/termsbr.c uip/md5.c
 uip_mhstore_LDADD = $(LDADD) $(TERMLIB)
 
                      uip/mhmisc.c uip/mhfree.c uip/termsbr.c uip/md5.c
 uip_mhstore_LDADD = $(LDADD) $(TERMLIB)
 
-uip_msgchk_SOURCES = uip/msgchk.c
-if POP_SUPPORT
-uip_msgchk_SOURCES += uip/popsbr.c
-endif
+uip_msgchk_SOURCES = uip/msgchk.c uip/popsbr.c
 uip_msgchk_LDADD = $(LDADD) $(SASLLIB)
 
 uip_msh_SOURCES = uip/msh.c uip/mshcmds.c uip/vmhsbr.c uip/picksbr.c \
 uip_msgchk_LDADD = $(LDADD) $(SASLLIB)
 
 uip_msh_SOURCES = uip/msh.c uip/mshcmds.c uip/vmhsbr.c uip/picksbr.c \
@@ -457,11 +452,6 @@ man/man.sed: Makefile
        echo 's,%manext1%,$(manext1),g' >> $@
        echo 's,%manext5%,$(manext5),g' >> $@
        echo 's,%manext8%,$(manext8),g' >> $@
        echo 's,%manext1%,$(manext1),g' >> $@
        echo 's,%manext5%,$(manext5),g' >> $@
        echo 's,%manext8%,$(manext8),g' >> $@
-if POP_SUPPORT
-       echo '/^%nmhbeginpop%/d;/^%nmhendpop%/d' >> $@
-else
-       echo '/^%nmhbeginpop%/,/^%nmhendpop%/d' >> $@
-endif
        echo '/%components%/r $(top_srcdir)/etc/components' >> $@
        echo ' s,%components%,,g' >> $@
        echo '/%distcomps%/r $(top_srcdir)/etc/distcomps' >> $@
        echo '/%components%/r $(top_srcdir)/etc/components' >> $@
        echo ' s,%components%,,g' >> $@
        echo '/%distcomps%/r $(top_srcdir)/etc/distcomps' >> $@
index 37d7c23..6a75a38 100644 (file)
@@ -43,14 +43,6 @@ AC_ARG_ENABLE(masquerade,
   fi], [masquerade="draft_from mmailid username_extension"])
 AC_SUBST(masquerade)dnl
 
   fi], [masquerade="draft_from mmailid username_extension"])
 AC_SUBST(masquerade)dnl
 
-dnl Do you want client-side support for pop?
-AC_ARG_ENABLE([pop],
-  AS_HELP_STRING([--enable-pop], [enable client-side support for plain POP3]))
-dnl The old redundant --enable-nmh-pop is deprecated and undocumented.
-if test x"$enable_nmh_pop" = x"yes"; then
-  enable_pop=yes
-fi
-
 dnl Do you want to disable use of locale functions
 AH_TEMPLATE([LOCALE],
 [Undefine if you don't want locale features.  By default this is defined.])
 dnl Do you want to disable use of locale functions
 AH_TEMPLATE([LOCALE],
 [Undefine if you don't want locale features.  By default this is defined.])
@@ -106,13 +98,6 @@ fi
 AC_DEFINE_UNQUOTED([BACKUP_PREFIX], "$backup_prefix",
     [The prefix that is prepended to the name of message files when they are "removed" by rmm. This should typically be `,' or `#'.])dnl
 
 AC_DEFINE_UNQUOTED([BACKUP_PREFIX], "$backup_prefix",
     [The prefix that is prepended to the name of message files when they are "removed" by rmm. This should typically be `,' or `#'.])dnl
 
-dnl After we know if we're including apop and kpop support, do pop stuff
-if test x"$enable_pop" = x"yes"; then
-  AC_DEFINE([POP], 1,
-    [Define this to compile client-side support for pop into inc and msgchk.])dnl
-fi
-AM_CONDITIONAL([POP_SUPPORT], [test x"$enable_pop" = x"yes"])
-
 dnl What method of locking to use?
 AC_ARG_WITH(locking,
   AS_HELP_STRING([--with-locking=@<:@dot|fcntl|flock|lockf@:>@],
 dnl What method of locking to use?
 AC_ARG_WITH(locking,
   AS_HELP_STRING([--with-locking=@<:@dot|fcntl|flock|lockf@:>@],
@@ -761,11 +746,6 @@ eval "nmhlib=${libdir}";         eval "nmhlib=${nmhlib}"
 eval "nmhman=${mandir}";         eval "nmhman=${nmhman}"
 eval "nmhrpm=${nmhrpm}";
 
 eval "nmhman=${mandir}";         eval "nmhman=${nmhman}"
 eval "nmhrpm=${nmhrpm}";
 
-pop_kinds=no
-if test x"$enable_pop" = x"yes"; then
-  pop_kinds="yes (POP3)"
-fi
-
 dnl
 dnl Sigh, this is required because under the new world order autoconf has
 dnl nothing to create in a few of the build directories when doing an object
 dnl
 dnl Sigh, this is required because under the new world order autoconf has
 dnl nothing to create in a few of the build directories when doing an object
@@ -800,7 +780,6 @@ default smtp servers       : ${smtpservers}
 default editor             : ${editorpath}
 default pager              : ${pagerpath}
 email address masquerading : ${masquerade}
 default editor             : ${editorpath}
 default pager              : ${pagerpath}
 email address masquerading : ${masquerade}
-pop is enabled             : ${pop_kinds}
 SASL support               : ${sasl_support}
 TLS support                : ${tls_support}"
 echo ""])
 SASL support               : ${sasl_support}
 TLS support                : ${tls_support}"
 echo ""])
index f7e0ac7..e6de6fd 100644 (file)
@@ -15,3 +15,5 @@ Things to add to the release notes for the next full release:
 - fileproc and mhlproc mh-profile entries will now be obeyed by
   send, rcvdist, and whatnow.
 - New format instructions %(putlit) and %(concataddr) have been implemented.
 - fileproc and mhlproc mh-profile entries will now be obeyed by
   send, rcvdist, and whatnow.
 - New format instructions %(putlit) and %(concataddr) have been implemented.
+- The --enable-pop configure option has been removed; POP support is now
+  compiled in always.
index 44153a5..b9c34f9 100644 (file)
@@ -23,7 +23,6 @@ inc \- incorporate new mail
 .RB [ \-truncate " | " \-notruncate ]
 .RB [ \-width
 .IR columns ]
 .RB [ \-truncate " | " \-notruncate ]
 .RB [ \-width
 .IR columns ]
-%nmhbeginpop%
 .RB [ \-host
 .IR hostname ]
 .RB [ \-user
 .RB [ \-host
 .IR hostname ]
 .RB [ \-user
@@ -37,7 +36,6 @@ inc \- incorporate new mail
 .RB [ \-saslmech
 .IR mechanism ]
 .RB [ \-snoop ]
 .RB [ \-saslmech
 .IR mechanism ]
 .RB [ \-snoop ]
-%nmhendpop%
 .RB [ \-version ]
 .RB [ \-help ]
 .ad
 .RB [ \-version ]
 .RB [ \-help ]
 .ad
@@ -180,7 +178,6 @@ switch directs
 to be quiet and not ask any questions at all.  This is useful for putting
 .B inc
 in the background and going on to other things.
 to be quiet and not ask any questions at all.  This is useful for putting
 .B inc
 in the background and going on to other things.
-%nmhbeginpop%
 .PP
 .SS "Using POP"
 .B inc
 .PP
 .SS "Using POP"
 .B inc
@@ -286,7 +283,6 @@ Encrypted traffic is labelled with `(encrypted)' and `(decrypted)'
 when viewing the POP transaction with the
 .B \-snoop
 switch.
 when viewing the POP transaction with the
 .B \-snoop
 switch.
-%nmhendpop%
 
 .SH FILES
 .fc ^ ~
 
 .SH FILES
 .fc ^ ~
@@ -322,9 +318,7 @@ mhmail(1), scan(1), mh\-mail(5), post(8)
 .RB ` \-nosilent '
 .RB ` \-truncate "' if `" \-file " name' not given, `" \-notruncate "' otherwise"
 .RB ` \-width "' defaulted to the width of the terminal"
 .RB ` \-nosilent '
 .RB ` \-truncate "' if `" \-file " name' not given, `" \-notruncate "' otherwise"
 .RB ` \-width "' defaulted to the width of the terminal"
-%nmhbeginpop%
 .RB ` \-nopack '
 .RB ` \-nopack '
-%nmhendpop%
 .fi
 
 .SH CONTEXT
 .fi
 
 .SH CONTEXT
index 793562f..d5be463 100644 (file)
@@ -242,7 +242,6 @@ is equivalent to
 .RB [ \-truncate " | " \-notruncate ]
 .RB [ \-width
 .IR columns ]
 .RB [ \-truncate " | " \-notruncate ]
 .RB [ \-width
 .IR columns ]
-%nmhbeginpop%
 .RB [ \-host
 .IR hostname ]
 .RB [ \-user
 .RB [ \-host
 .IR hostname ]
 .RB [ \-user
@@ -254,7 +253,6 @@ is equivalent to
 .RB [ \-saslmech
 .IR mechanism ]
 .RB [ \-snoop ]
 .RB [ \-saslmech
 .IR mechanism ]
 .RB [ \-snoop ]
-%nmhendpop%
 .RB [ \-version ]
 .RB [ \-help ]
 
 .RB [ \-version ]
 .RB [ \-help ]
 
@@ -434,7 +432,6 @@ is equivalent to
 all/mail/nomail ]
 .RB [ \-nonotify
 all/mail/nomail ]
 all/mail/nomail ]
 .RB [ \-nonotify
 all/mail/nomail ]
-%nmhbeginpop%
 .RB [ \-host
 .IR hostname ]
 .RB [ \-user
 .RB [ \-host
 .IR hostname ]
 .RB [ \-user
@@ -443,7 +440,6 @@ all/mail/nomail ]
 .RB [ \-saslmech
 .IR mechanism ]
 .RB [ \-snoop ]
 .RB [ \-saslmech
 .IR mechanism ]
 .RB [ \-snoop ]
-%nmhendpop%
 .RI [ users
 \&... ]
 .RB [ \-version ]
 .RI [ users
 \&... ]
 .RB [ \-version ]
index 55d4a18..7505d48 100644 (file)
@@ -13,7 +13,6 @@ msgchk \- check for messages
 all/mail/nomail ]
 .RB [ \-nonotify
 all/mail/nomail ]
 all/mail/nomail ]
 .RB [ \-nonotify
 all/mail/nomail ]
-%nmhbeginpop%
 .RB [ \-host
 .IR hostname ]
 .RB [ \-user
 .RB [ \-host
 .IR hostname ]
 .RB [ \-user
@@ -22,7 +21,6 @@ all/mail/nomail ]
 .RB [ \-saslmech
 .IR mechanism ]
 .RB [ \-snoop ]
 .RB [ \-saslmech
 .IR mechanism ]
 .RB [ \-snoop ]
-%nmhendpop%
 .RI [ users
 \&... ]
 .RB [ \-version ]
 .RI [ users
 \&... ]
 .RB [ \-version ]
@@ -77,7 +75,6 @@ switch directs
 .B msgchk
 to print out the last date mail was read, if this can
 be determined.
 .B msgchk
 to print out the last date mail was read, if this can
 be determined.
-%nmhbeginpop%
  
 .SS "Using POP"
 .B msgchk
  
 .SS "Using POP"
 .B msgchk
@@ -150,7 +147,6 @@ with `(encrypted)' and `(decrypted)' when viewing the POP transaction
 with the
 .B \-snoop
 switch.
 with the
 .B \-snoop
 switch.
-%nmhendpop%
 
 .SH FILES
 .fc ^ ~
 
 .SH FILES
 .fc ^ ~
index 9310ae1..edb288f 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
 #include <h/utils.h>
 #include <fcntl.h>
 
 #include <h/utils.h>
 #include <fcntl.h>
 
-#ifdef POP
-# include <h/dropsbr.h>
-# include <h/popsbr.h>
-#endif
-
+#include <h/dropsbr.h>
+#include <h/popsbr.h>
 #include <h/fmt_scan.h>
 #include <h/scansbr.h>
 #include <h/signals.h>
 #include <h/fmt_scan.h>
 #include <h/scansbr.h>
 #include <h/signals.h>
 #include <errno.h>
 #include <signal.h>
 
 #include <errno.h>
 #include <signal.h>
 
-#ifndef        POP
-# define POPminc(a) (a)
-#else
-# define POPminc(a)  0
-#endif
-
 #ifndef CYRUS_SASL
 # define SASLminc(a) (a)
 #else
 #ifndef CYRUS_SASL
 # define SASLminc(a) (a)
 #else
@@ -71,15 +62,15 @@ static struct swit switches[] = {
 #define        FMTSW                      6
     { "format string", 5 },
 #define        HOSTSW                     7
 #define        FMTSW                      6
     { "format string", 5 },
 #define        HOSTSW                     7
-    { "host hostname", POPminc (-4) },
+    { "host hostname", 0 },
 #define        USERSW                     8
 #define        USERSW                     8
-    { "user username", POPminc (-4) },
+    { "user username", 0 },
 #define        PACKSW                     9
 #define        PACKSW                     9
-    { "pack file", POPminc (-4) },
+    { "pack file", 0},
 #define        NPACKSW                   10
 #define        NPACKSW                   10
-    { "nopack", POPminc (-6) },
+    { "nopack", 0 },
 #define PORTSW                   11
 #define PORTSW                   11
-    { "port name/number", POPminc (-4) },
+    { "port name/number", 0 },
 #define        SILSW                     12
     { "silent", 0 },
 #define        NSILSW                    13
 #define        SILSW                     12
     { "silent", 0 },
 #define        NSILSW                    13
@@ -101,7 +92,7 @@ static struct swit switches[] = {
 #define SASLMECHSW                21
     { "saslmech", SASLminc(-8) },
 #define PROXYSW                   22
 #define SASLMECHSW                21
     { "saslmech", SASLminc(-8) },
 #define PROXYSW                   22
-    { "proxy command", POPminc(-5) },
+    { "proxy command", 0 },
     { NULL, 0 }
 };
 
     { NULL, 0 }
 };
 
@@ -109,9 +100,7 @@ static struct swit switches[] = {
  * flags for the mail source
  */
 #define INC_FILE  0
  * flags for the mail source
  */
 #define INC_FILE  0
-#ifdef POP
-# define INC_POP   1
-#endif /* POP */
+#define INC_POP   1
 
 static int inc_type;
 static struct Maildir_entry {
 
 static int inc_type;
 static struct Maildir_entry {
@@ -121,7 +110,6 @@ static struct Maildir_entry {
 static int num_maildir_entries = 0;
 static int snoop = 0;
 
 static int num_maildir_entries = 0;
 static int snoop = 0;
 
-#ifdef POP
 extern char response[];
 
 static int size;
 extern char response[];
 
 static int size;
@@ -129,7 +117,6 @@ static long pos;
 
 static int mbx_style = MMDF_FORMAT;
 static int pd = NOTOK;
 
 static int mbx_style = MMDF_FORMAT;
 static int pd = NOTOK;
-#endif /* POP */
 
 static long start;
 static long stop;
 
 static long start;
 static long stop;
@@ -141,13 +128,9 @@ static FILE *pf = NULL;
  * privilege ops into macros.
  * *GROUPPRIVS() is related to handling the setgid MAIL property,
  * and only applies if MAILGROUP is defined.
  * privilege ops into macros.
  * *GROUPPRIVS() is related to handling the setgid MAIL property,
  * and only applies if MAILGROUP is defined.
- * *USERPRIVS() is related to handling the setuid root property,
- * and only applies if POP is defined [why does POP => setuid root?]
  * Basically, SAVEGROUPPRIVS() is called right at the top of main()
  * to initialise things, and then DROPGROUPPRIVS() and GETGROUPPRIVS()
  * Basically, SAVEGROUPPRIVS() is called right at the top of main()
  * to initialise things, and then DROPGROUPPRIVS() and GETGROUPPRIVS()
- * do the obvious thing. TRYDROPGROUPPRIVS() has to be safe to call
- * before DROPUSERPRIVS() is called [this is needed because setgid()
- * sets both effective and real uids if euid is root.]
+ * do the obvious thing.
  *
  * There's probably a better implementation if we're allowed to use
  * BSD-style setreuid() rather than using POSIX saved-ids.
  *
  * There's probably a better implementation if we're allowed to use
  * BSD-style setreuid() rather than using POSIX saved-ids.
@@ -164,15 +147,7 @@ static FILE *pf = NULL;
  */
 #ifdef MAILGROUP
 static int return_gid;
  */
 #ifdef MAILGROUP
 static int return_gid;
-#ifndef POP
-/* easy case; we're not setuid root, so can drop group privs
- * immediately.
- */
 #define TRYDROPGROUPPRIVS() DROPGROUPPRIVS()
 #define TRYDROPGROUPPRIVS() DROPGROUPPRIVS()
-#else /* POP ie we are setuid root */
-#define TRYDROPGROUPPRIVS() \
-if (geteuid() != 0) DROPGROUPPRIVS()
-#endif
 #define DROPGROUPPRIVS() setgid(getgid())
 #define GETGROUPPRIVS() setgid(return_gid)
 #define SAVEGROUPPRIVS() return_gid = getegid()
 #define DROPGROUPPRIVS() setgid(getgid())
 #define GETGROUPPRIVS() setgid(return_gid)
 #define SAVEGROUPPRIVS() return_gid = getegid()
@@ -195,11 +170,9 @@ static FILE *in;
 char *map_name(char *);
 
 static void inc_done(int) NORETURN;
 char *map_name(char *);
 
 static void inc_done(int) NORETURN;
-#ifdef POP
 static int pop_action(char *);
 static int pop_pack(char *);
 static int map_count(void);
 static int pop_action(char *);
 static int pop_pack(char *);
 static int map_count(void);
-#endif
 
 int
 maildir_srt(const void *va, const void *vb)
 
 int
 maildir_srt(const void *va, const void *vb)
@@ -232,11 +205,9 @@ main (int argc, char **argv)
     char b[MAXPATHLEN + 1];
     char *maildir_copy = NULL; /* copy of mail directory because the static gets overwritten */
 
     char b[MAXPATHLEN + 1];
     char *maildir_copy = NULL; /* copy of mail directory because the static gets overwritten */
 
-#ifdef POP
     int nmsgs, nbytes;
     char *pass = NULL;
     char *MAILHOST_env_variable;
     int nmsgs, nbytes;
     char *pass = NULL;
     char *MAILHOST_env_variable;
-#endif
 
     done=inc_done;
 
 
     done=inc_done;
 
@@ -258,7 +229,6 @@ main (int argc, char **argv)
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
-#ifdef POP
     /*
      * Scheme is:
      *        use MAILHOST environment variable if present,
     /*
      * Scheme is:
      *        use MAILHOST environment variable if present,
@@ -277,7 +247,6 @@ main (int argc, char **argv)
 
     if ((cp = getenv ("MHPOPDEBUG")) && *cp)
        snoop++;
 
     if ((cp = getenv ("MHPOPDEBUG")) && *cp)
        snoop++;
-#endif /* POP */
 
     while ((cp = *argp++)) {
        if (*cp == '-') {
 
     while ((cp = *argp++)) {
        if (*cp == '-') {
@@ -379,18 +348,11 @@ main (int argc, char **argv)
                continue;
 
            case PACKSW:
                continue;
 
            case PACKSW:
-#ifndef        POP
-               if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
-#else /* POP */
                if (!(packfile = *argp++) || *packfile == '-')
                    adios (NULL, "missing argument to %s", argp[-2]);
                if (!(packfile = *argp++) || *packfile == '-')
                    adios (NULL, "missing argument to %s", argp[-2]);
-#endif /* POP */
                continue;
            case NPACKSW:
                continue;
            case NPACKSW:
-#ifdef POP
                packfile = NULL;
                packfile = NULL;
-#endif /* POP */
                continue;
 
            case SNOOPSW:
                continue;
 
            case SNOOPSW:
@@ -424,10 +386,8 @@ main (int argc, char **argv)
     /* NOTE: above this point you should use TRYDROPGROUPPRIVS(),
      * not DROPGROUPPRIVS().
      */
     /* NOTE: above this point you should use TRYDROPGROUPPRIVS(),
      * not DROPGROUPPRIVS().
      */
-#ifdef POP
     if (host && !*host)
        host = NULL;
     if (host && !*host)
        host = NULL;
-#endif /* POP */
 
     /* guarantee dropping group priveleges; we might not have done so earlier */
     DROPGROUPPRIVS();
 
     /* guarantee dropping group priveleges; we might not have done so earlier */
     DROPGROUPPRIVS();
@@ -437,14 +397,11 @@ main (int argc, char **argv)
      */
     if (from)
        inc_type = INC_FILE;
      */
     if (from)
        inc_type = INC_FILE;
-#ifdef POP
     else if (host)
        inc_type = INC_POP;
     else if (host)
        inc_type = INC_POP;
-#endif
     else
        inc_type = INC_FILE;
 
     else
        inc_type = INC_FILE;
 
-#ifdef POP
     /*
      * Are we getting the mail from
      * a POP server?
     /*
      * Are we getting the mail from
      * a POP server?
@@ -473,7 +430,6 @@ main (int argc, char **argv)
            adios (NULL, "no mail to incorporate");
        }
     }
            adios (NULL, "no mail to incorporate");
        }
     }
-#endif /* POP */
 
     /*
      * We will get the mail from a file
 
     /*
      * We will get the mail from a file
@@ -548,11 +504,9 @@ main (int argc, char **argv)
        newmail = cp;
     }
 
        newmail = cp;
     }
 
-#ifdef POP
     /* skip the folder setup */
     if ((inc_type == INC_POP) && packfile)
        goto go_to_it;
     /* skip the folder setup */
     if ((inc_type == INC_POP) && packfile)
        goto go_to_it;
-#endif /* POP */
 
     if (!context_find ("path"))
        free (path ("./", TFOLDER));
 
     if (!context_find ("path"))
        free (path ("./", TFOLDER));
@@ -580,9 +534,7 @@ main (int argc, char **argv)
     if (!(mp = folder_read (folder)))
        adios (NULL, "unable to read folder %s", folder);
 
     if (!(mp = folder_read (folder)))
        adios (NULL, "unable to read folder %s", folder);
 
-#ifdef POP
 go_to_it:
 go_to_it:
-#endif /* POP */
 
     if (inc_type == INC_FILE && Maildir == NULL) {
        if (access (newmail, W_OK) != NOTOK) {
 
     if (inc_type == INC_FILE && Maildir == NULL) {
        if (access (newmail, W_OK) != NOTOK) {
@@ -619,15 +571,10 @@ go_to_it:
        else if (i == NOTOK)
            chmod (audfile, m_gmprot ());
 
        else if (i == NOTOK)
            chmod (audfile, m_gmprot ());
 
-#ifdef POP
        fprintf (aud, from ? "<<inc>> %s -ms %s\n"
                 : host ? "<<inc>> %s -host %s -user %s\n"
                 : "<<inc>> %s\n",
                 dtimenow (0), from ? from : host, user);
        fprintf (aud, from ? "<<inc>> %s -ms %s\n"
                 : host ? "<<inc>> %s -host %s -user %s\n"
                 : "<<inc>> %s\n",
                 dtimenow (0), from ? from : host, user);
-#else /* POP */
-       fprintf (aud, from ? "<<inc>> %s  -ms %s\n" : "<<inc>> %s\n",
-                dtimenow (0), from);
-#endif /* POP */
     }
 
     /* Get new format string */
     }
 
     /* Get new format string */
@@ -638,7 +585,6 @@ go_to_it:
        fflush (stdout);
     }
 
        fflush (stdout);
     }
 
-#ifdef POP
     /*
      * Get the mail from a POP server
      */
     /*
      * Get the mail from a POP server
      */
@@ -767,7 +713,6 @@ go_to_it:
            pd = NOTOK;
        }
     }
            pd = NOTOK;
        }
     }
-#endif /* POP */
 
     /*
      * Get the mail from file (usually mail spool)
 
     /*
      * Get the mail from file (usually mail spool)
@@ -970,10 +915,8 @@ go_to_it:
     if (noisy)
        fflush (stdout);
 
     if (noisy)
        fflush (stdout);
 
-#ifdef POP
     if ((inc_type == INC_POP) && packfile)
        done (0);
     if ((inc_type == INC_POP) && packfile)
        done (0);
-#endif /* POP */
 
     /*
      * truncate file we are incorporating from
 
     /*
      * truncate file we are incorporating from
@@ -1066,10 +1009,8 @@ cpymsg (FILE *in, FILE *out)
 static void
 inc_done (int status)
 {
 static void
 inc_done (int status)
 {
-#ifdef POP
     if (packfile && pd != NOTOK)
        mbx_close (packfile, pd);
     if (packfile && pd != NOTOK)
        mbx_close (packfile, pd);
-#endif /* POP */
     if (locked)
     {
         GETGROUPPRIVS();
     if (locked)
     {
         GETGROUPPRIVS();
@@ -1079,7 +1020,6 @@ inc_done (int status)
     exit (status);
 }
 
     exit (status);
 }
 
-#ifdef POP
 static int
 pop_action (char *s)
 {
 static int
 pop_action (char *s)
 {
@@ -1123,4 +1063,3 @@ map_count (void)
     close (md);
     return (d.d_id);
 }
     close (md);
     return (d.d_id);
 }
-#endif /* POP */
index a958351..8294d46 100644 (file)
 #include <h/tws.h>
 #include <pwd.h>
 
 #include <h/tws.h>
 #include <pwd.h>
 
-#ifdef POP
-# include <h/popsbr.h>
-#endif
-
-#ifndef        POP
-# define POPminc(a) (a)
-#else
-# define POPminc(a)  0
-#endif
+#include <h/popsbr.h>
 
 #ifndef CYRUS_SASL
 # define SASLminc(a) (a)
 
 #ifndef CYRUS_SASL
 # define SASLminc(a) (a)
@@ -38,11 +30,11 @@ static struct swit switches[] = {
 #define        NNOTESW                  3
     { "nonotify type", 0 },
 #define        HOSTSW                   4
 #define        NNOTESW                  3
     { "nonotify type", 0 },
 #define        HOSTSW                   4
-    { "host hostname", POPminc (-4) },
+    { "host hostname", 0 },
 #define        USERSW                   5
 #define        USERSW                   5
-    { "user username", POPminc (-4) },
+    { "user username", 0 },
 #define PORTSW                  6
 #define PORTSW                  6
-    { "port name/number", POPminc(-4) },
+    { "port name/number", 0 },
 #define VERSIONSW                7
     { "version", 0 },
 #define        HELPSW                   8
 #define VERSIONSW                7
     { "version", 0 },
 #define        HELPSW                   8
@@ -54,7 +46,7 @@ static struct swit switches[] = {
 #define SASLMECHSW             11
     { "saslmech", SASLminc(-5) },
 #define PROXYSW                12
 #define SASLMECHSW             11
     { "saslmech", SASLminc(-5) },
 #define PROXYSW                12
-    { "proxy command", POPminc(-5) },
+    { "proxy command", 0 },
     { NULL, 0 }
 };
 
     { NULL, 0 }
 };
 
@@ -85,11 +77,8 @@ static struct swit switches[] = {
  */
 static int donote (char *, int);
 static int checkmail (char *, char *, int, int, int);
  */
 static int donote (char *, int);
 static int checkmail (char *, char *, int, int, int);
-
-#ifdef POP
 static int remotemail (char *, char *, char *, char *, int, int, int, int,
                       char *);
 static int remotemail (char *, char *, char *, char *, int, int, int, int,
                       char *);
-#endif
 
 
 int
 
 
 int
@@ -122,10 +111,8 @@ main (int argc, char **argv)
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
-#ifdef POP
     if ((cp = getenv ("MHPOPDEBUG")) && *cp)
        snoop++;
     if ((cp = getenv ("MHPOPDEBUG")) && *cp)
        snoop++;
-#endif
 
     while ((cp = *argp++)) {
        if (*cp == '-') {
 
     while ((cp = *argp++)) {
        if (*cp == '-') {
@@ -207,7 +194,6 @@ main (int argc, char **argv)
            vec[vecp++] = cp;
     }
 
            vec[vecp++] = cp;
     }
 
-#ifdef POP
     /*
      * If -host is not specified by user
      */
     /*
      * If -host is not specified by user
      */
@@ -221,12 +207,10 @@ main (int argc, char **argv)
     }
     if (!host || !*host)
        host = NULL;
     }
     if (!host || !*host)
        host = NULL;
-#endif /* POP */
 
     if (vecp != 0)
        vec[vecp] = NULL;
 
 
     if (vecp != 0)
        vec[vecp] = NULL;
 
-#ifdef POP
     if (host) {
        if (vecp == 0) {
            status = remotemail (host, port, user, proxy, notifysw, 1,
     if (host) {
        if (vecp == 0) {
            status = remotemail (host, port, user, proxy, notifysw, 1,
@@ -237,7 +221,6 @@ main (int argc, char **argv)
                                      snoop, sasl, saslmech);
        }
     } else {
                                      snoop, sasl, saslmech);
        }
     } else {
-#endif /* POP */
 
     if (vecp == 0) {
        char *home;
 
     if (vecp == 0) {
        char *home;
@@ -258,9 +241,7 @@ main (int argc, char **argv)
                advise (NULL, "no such user as %s", vec[vecp]);
        }
     }
                advise (NULL, "no such user as %s", vec[vecp]);
        }
     }
-#ifdef POP
     }          /* host == NULL */
     }          /* host == NULL */
-#endif
 
     done (status);
     return 1;
 
     done (status);
     return 1;
@@ -351,7 +332,6 @@ checkmail (char *user, char *home, int datesw, int notifysw, int personal)
 }
 
 
 }
 
 
-#ifdef POP
 extern char response[];
 
 static int
 extern char response[];
 
 static int
@@ -399,4 +379,3 @@ remotemail (char *host, char *port, char *user, char *proxy, int notifysw,
 
     return status;
 }
 
     return status;
 }
-#endif /* POP */