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/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 \
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' >> $@
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.])
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@:>@],
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
default editor : ${editorpath}
default pager : ${pagerpath}
email address masquerading : ${masquerade}
-pop is enabled : ${pop_kinds}
SASL support : ${sasl_support}
TLS support : ${tls_support}"
echo ""])
- 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.
.RB [ \-truncate " | " \-notruncate ]
.RB [ \-width
.IR columns ]
-%nmhbeginpop%
.RB [ \-host
.IR hostname ]
.RB [ \-user
.RB [ \-saslmech
.IR mechanism ]
.RB [ \-snoop ]
-%nmhendpop%
.RB [ \-version ]
.RB [ \-help ]
.ad
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
when viewing the POP transaction with the
.B \-snoop
switch.
-%nmhendpop%
.SH FILES
.fc ^ ~
.RB ` \-nosilent '
.RB ` \-truncate "' if `" \-file " name' not given, `" \-notruncate "' otherwise"
.RB ` \-width "' defaulted to the width of the terminal"
-%nmhbeginpop%
.RB ` \-nopack '
-%nmhendpop%
.fi
.SH CONTEXT
.RB [ \-truncate " | " \-notruncate ]
.RB [ \-width
.IR columns ]
-%nmhbeginpop%
.RB [ \-host
.IR hostname ]
.RB [ \-user
.RB [ \-saslmech
.IR mechanism ]
.RB [ \-snoop ]
-%nmhendpop%
.RB [ \-version ]
.RB [ \-help ]
all/mail/nomail ]
.RB [ \-nonotify
all/mail/nomail ]
-%nmhbeginpop%
.RB [ \-host
.IR hostname ]
.RB [ \-user
.RB [ \-saslmech
.IR mechanism ]
.RB [ \-snoop ]
-%nmhendpop%
.RI [ users
\&... ]
.RB [ \-version ]
all/mail/nomail ]
.RB [ \-nonotify
all/mail/nomail ]
-%nmhbeginpop%
.RB [ \-host
.IR hostname ]
.RB [ \-user
.RB [ \-saslmech
.IR mechanism ]
.RB [ \-snoop ]
-%nmhendpop%
.RI [ users
\&... ]
.RB [ \-version ]
.B msgchk
to print out the last date mail was read, if this can
be determined.
-%nmhbeginpop%
.SS "Using POP"
.B msgchk
with the
.B \-snoop
switch.
-%nmhendpop%
.SH FILES
.fc ^ ~
#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 <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
#define FMTSW 6
{ "format string", 5 },
#define HOSTSW 7
- { "host hostname", POPminc (-4) },
+ { "host hostname", 0 },
#define USERSW 8
- { "user username", POPminc (-4) },
+ { "user username", 0 },
#define PACKSW 9
- { "pack file", POPminc (-4) },
+ { "pack file", 0},
#define NPACKSW 10
- { "nopack", POPminc (-6) },
+ { "nopack", 0 },
#define PORTSW 11
- { "port name/number", POPminc (-4) },
+ { "port name/number", 0 },
#define SILSW 12
{ "silent", 0 },
#define NSILSW 13
#define SASLMECHSW 21
{ "saslmech", SASLminc(-8) },
#define PROXYSW 22
- { "proxy command", POPminc(-5) },
+ { "proxy command", 0 },
{ NULL, 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 num_maildir_entries = 0;
static int snoop = 0;
-#ifdef POP
extern char response[];
static int size;
static int mbx_style = MMDF_FORMAT;
static int pd = NOTOK;
-#endif /* POP */
static long start;
static long stop;
* 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()
- * 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.
*/
#ifdef MAILGROUP
static int return_gid;
-#ifndef POP
-/* easy case; we're not setuid root, so can drop group privs
- * immediately.
- */
#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()
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);
-#endif
int
maildir_srt(const void *va, const void *vb)
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;
-#endif
done=inc_done;
arguments = getarguments (invo_name, argc, argv, 1);
argp = arguments;
-#ifdef POP
/*
* Scheme is:
* use MAILHOST environment variable if present,
if ((cp = getenv ("MHPOPDEBUG")) && *cp)
snoop++;
-#endif /* POP */
while ((cp = *argp++)) {
if (*cp == '-') {
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]);
-#endif /* POP */
continue;
case NPACKSW:
-#ifdef POP
packfile = NULL;
-#endif /* POP */
continue;
case SNOOPSW:
/* NOTE: above this point you should use TRYDROPGROUPPRIVS(),
* not DROPGROUPPRIVS().
*/
-#ifdef POP
if (host && !*host)
host = NULL;
-#endif /* POP */
/* guarantee dropping group priveleges; we might not have done so earlier */
DROPGROUPPRIVS();
*/
if (from)
inc_type = INC_FILE;
-#ifdef POP
else if (host)
inc_type = INC_POP;
-#endif
else
inc_type = INC_FILE;
-#ifdef POP
/*
* Are we getting the mail from
* a POP server?
adios (NULL, "no mail to incorporate");
}
}
-#endif /* POP */
/*
* We will get the mail from a file
newmail = cp;
}
-#ifdef POP
/* skip the folder setup */
if ((inc_type == INC_POP) && packfile)
goto go_to_it;
-#endif /* POP */
if (!context_find ("path"))
free (path ("./", TFOLDER));
if (!(mp = folder_read (folder)))
adios (NULL, "unable to read folder %s", folder);
-#ifdef POP
go_to_it:
-#endif /* POP */
if (inc_type == INC_FILE && Maildir == NULL) {
if (access (newmail, W_OK) != NOTOK) {
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);
-#else /* POP */
- fprintf (aud, from ? "<<inc>> %s -ms %s\n" : "<<inc>> %s\n",
- dtimenow (0), from);
-#endif /* POP */
}
/* Get new format string */
fflush (stdout);
}
-#ifdef POP
/*
* Get the mail from a POP server
*/
pd = NOTOK;
}
}
-#endif /* POP */
/*
* Get the mail from file (usually mail spool)
if (noisy)
fflush (stdout);
-#ifdef POP
if ((inc_type == INC_POP) && packfile)
done (0);
-#endif /* POP */
/*
* truncate file we are incorporating from
static void
inc_done (int status)
{
-#ifdef POP
if (packfile && pd != NOTOK)
mbx_close (packfile, pd);
-#endif /* POP */
if (locked)
{
GETGROUPPRIVS();
exit (status);
}
-#ifdef POP
static int
pop_action (char *s)
{
close (md);
return (d.d_id);
}
-#endif /* POP */
#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)
#define NNOTESW 3
{ "nonotify type", 0 },
#define HOSTSW 4
- { "host hostname", POPminc (-4) },
+ { "host hostname", 0 },
#define USERSW 5
- { "user username", POPminc (-4) },
+ { "user username", 0 },
#define PORTSW 6
- { "port name/number", POPminc(-4) },
+ { "port name/number", 0 },
#define VERSIONSW 7
{ "version", 0 },
#define HELPSW 8
#define SASLMECHSW 11
{ "saslmech", SASLminc(-5) },
#define PROXYSW 12
- { "proxy command", POPminc(-5) },
+ { "proxy command", 0 },
{ NULL, 0 }
};
*/
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 *);
-#endif
int
arguments = getarguments (invo_name, argc, argv, 1);
argp = arguments;
-#ifdef POP
if ((cp = getenv ("MHPOPDEBUG")) && *cp)
snoop++;
-#endif
while ((cp = *argp++)) {
if (*cp == '-') {
vec[vecp++] = cp;
}
-#ifdef POP
/*
* If -host is not specified by user
*/
}
if (!host || !*host)
host = NULL;
-#endif /* POP */
if (vecp != 0)
vec[vecp] = NULL;
-#ifdef POP
if (host) {
if (vecp == 0) {
status = remotemail (host, port, user, proxy, notifysw, 1,
snoop, sasl, saslmech);
}
} else {
-#endif /* POP */
if (vecp == 0) {
char *home;
advise (NULL, "no such user as %s", vec[vecp]);
}
}
-#ifdef POP
} /* host == NULL */
-#endif
done (status);
return 1;
}
-#ifdef POP
extern char response[];
static int
return status;
}
-#endif /* POP */