static struct pair *lookup(struct pair *, char *);
static int logged_in(void);
static int timely(char *, char *);
-static int usr_file(int, char *, int);
+static int usr_file(int, char *);
static int usr_pipe(int, char *, char *, char **, int);
static int usr_folder(int, char *);
static RETSIGTYPE alrmser(int);
if (mbox == NULL) {
snprintf(mailbox, sizeof(mailbox), "%s/%s",
- mmdfldir[0] ? mmdfldir : pw->pw_dir,
- mmdflfil[0] ? mmdflfil : pw->pw_name);
+ mailspool, pw->pw_name);
mbox = mailbox;
}
if (home == NULL)
verbose_printf("(delivering to standard mail spool)\n");
/* last resort - deliver to standard mail spool */
-#ifdef SLOCAL_MBOX
- return usr_file(fd, mbox, MBOX_FORMAT);
-#else
- return usr_file(fd, mbox, MMDF_FORMAT);
-#endif
+ return usr_file(fd, mbox);
}
case 'f':
/* mbox format */
if (!mh_strcasecmp(action, "file")) {
- status = usr_file(fd, string,
- MBOX_FORMAT);
+ status = usr_file(fd, string);
break;
}
/* deliver to nmh folder */
break;
case 'm':
- /* mmdf format */
- if (!mh_strcasecmp(action, "mmdf")) {
- status = usr_file(fd, string,
- MMDF_FORMAT);
- break;
- }
/* mbox format */
- else if (mh_strcasecmp(action, "mbox"))
+ if (mh_strcasecmp(action, "mbox"))
continue; /* else fall */
case '>':
/* mbox format */
- status = usr_file(fd, string, MBOX_FORMAT);
+ status = usr_file(fd, string);
break;
case 'd':
*/
static int
-usr_file(int fd, char *mailbox, int mbx_style)
+usr_file(int fd, char *mailbox)
{
- int md, mapping;
+ int md;
if (verbose)
verbose_printf("delivering to file \"%s\"", mailbox);
- if (mbx_style == MBOX_FORMAT) {
- if (verbose)
- verbose_printf(" (mbox style)");
- mapping = 0;
- } else {
- if (verbose)
- verbose_printf(" (mmdf style)");
- mapping = 1;
- }
+ if (verbose)
+ verbose_printf(" (mbox style)");
/* open and lock the file */
- if ((md = mbx_open(mailbox, mbx_style, pw->pw_uid, pw->pw_gid,
+ if ((md = mbx_open(mailbox, pw->pw_uid, pw->pw_gid,
m_gmprot())) == -1) {
if (verbose)
adorn("", "unable to open:");
lseek(fd, (off_t) 0, SEEK_SET);
/* append message to file */
- if (mbx_copy(mailbox, mbx_style, md, fd, mapping, NULL, verbose)
+ if (mbx_copy(mailbox, md, fd, NULL, verbose)
== -1) {
if (verbose)
adorn("", "error writing to:");
while (fgets(buffer, sizeof(buffer), qfp)) {
if (first) {
first = 0;
- if (!strncmp(buffer, "From ", i)) {
+ if (strncmp(buffer, "From ", i)==0) {
#ifdef RPATHS
char *fp, *cp, *hp, *ep;
#endif