Implemented ^aFLAGS (FSC-0053) for received netmail
This commit is contained in:
parent
136aaff274
commit
d110043489
@ -4102,6 +4102,7 @@ v0.33.18 27-Jul-2001
|
||||
The code for mbmail is now merged into mbfido. A symlink from
|
||||
mbmail to mbfido is created to let mbfido run in mail mode.
|
||||
The syntax to call mbmail is changed.
|
||||
Implemented processing ^aFLAGS for received netmail (FSC-0053).
|
||||
|
||||
mbmail:
|
||||
Obsolete, the functions are now in mbfido.
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbfido/postnetmail.c
|
||||
* Purpose ...............: Post Netmail message from temp file
|
||||
* Last modification date : 03-Aug-2001
|
||||
* Last modification date : 04-Oct-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -70,7 +70,7 @@ extern int most_debug; /* Headvy debugging flag */
|
||||
*/
|
||||
int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t mdate, int flags, int DoPing)
|
||||
{
|
||||
char *p, *msgid = NULL, *reply = NULL;
|
||||
char *p, *msgid = NULL, *reply = NULL, *flagstr = NULL;
|
||||
char name[36], *buf, *l, *r, *q;
|
||||
char System[36], ext[4];
|
||||
int result = 1, email = FALSE, fmpt = 0, topt = 0;
|
||||
@ -80,9 +80,9 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
|
||||
time_t now;
|
||||
struct tm *tm;
|
||||
|
||||
Syslog('m', "Post netmail from: %s", ascfnode(f, 0xff));
|
||||
Syslog('m', "Post netmail to : %s", ascfnode(t, 0xff));
|
||||
Syslog('m', "Post netmail subj: %s", MBSE_SS(subject));
|
||||
Syslog('M', "Post netmail from: %s", ascfnode(f, 0xff));
|
||||
Syslog('M', "Post netmail to : %s", ascfnode(t, 0xff));
|
||||
Syslog('M', "Post netmail subj: %s", MBSE_SS(subject));
|
||||
net_in++;
|
||||
|
||||
/*
|
||||
@ -92,7 +92,7 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
|
||||
rewind(fp);
|
||||
while ((fgets(buf, 2048, fp)) != NULL) {
|
||||
Striplf(buf);
|
||||
Syslogp('m', printable(buf, 0));
|
||||
Syslogp('M', printable(buf, 0));
|
||||
if (!strncmp(buf, "\001MSGID: ", 8)) {
|
||||
msgid = xstrcpy(buf + 8);
|
||||
/*
|
||||
@ -180,6 +180,18 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check FLAGS kludge
|
||||
*/
|
||||
if (!strncmp(buf, "\001FLAGS ", 7)) {
|
||||
flagstr = xstrcpy(buf + 7);
|
||||
Syslog('m', "^aFLAGS %s", flagstr);
|
||||
}
|
||||
if (!strncmp(buf, "\001FLAGS: ", 8)) {
|
||||
flagstr = xstrcpy(buf + 8);
|
||||
Syslog('m', "^aFLAGS: %s", flagstr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for X-FTN- kludges, this could be gated email.
|
||||
* This should be impossible.
|
||||
@ -289,7 +301,7 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
|
||||
* Import if one fits.
|
||||
*/
|
||||
if (SearchUser(name)) {
|
||||
return storenet(f, t, mdate, flags, subject, msgid, reply, fp);
|
||||
return storenet(f, t, mdate, flags, subject, msgid, reply, fp, flagstr);
|
||||
}
|
||||
|
||||
Syslog('+', " \"%s\" is not a known BBS user", name);
|
||||
@ -300,7 +312,7 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
|
||||
Syslog('+', " Readdress from %s to %s", name, CFG.sysop_name);
|
||||
sprintf(name, "%s", CFG.sysop_name);
|
||||
if (SearchUser(name)) {
|
||||
return storenet(f, t, mdate, flags, subject, msgid, reply, fp);
|
||||
return storenet(f, t, mdate, flags, subject, msgid, reply, fp, flagstr);
|
||||
} else {
|
||||
WriteError("Readdress import failed, sysop doesn't exist. CHECK YOUR SETUP");
|
||||
return 0;
|
||||
@ -414,7 +426,8 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
|
||||
*/
|
||||
WriteError("No ROUTE for this netmail");
|
||||
net_bad++;
|
||||
return storenet(f, t, mdate, flags, subject, msgid, reply, fp);
|
||||
flags |= M_ORPHAN;
|
||||
return storenet(f, t, mdate, flags, subject, msgid, reply, fp, flagstr);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: tosser/storenet.c
|
||||
* Purpose ...............: Import a netmail message
|
||||
* Last modification date : 27-Jul-2001
|
||||
* Last modification date : 04-Oct-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -59,7 +59,7 @@ extern int net_bad; /* Bad netmails (tracking errors */
|
||||
* 2 - Can't find a netmail board.
|
||||
*
|
||||
*/
|
||||
int storenet(faddr *f, faddr *t, time_t mdate, int flags, char *Subj, char *msgid, char *reply, FILE *fp)
|
||||
int storenet(faddr *f, faddr *t, time_t mdate, int flags, char *Subj, char *msgid, char *reply, FILE *fp, char *flagstr)
|
||||
{
|
||||
int result, i, empty = TRUE;
|
||||
unsigned long crc2;
|
||||
@ -91,22 +91,31 @@ int storenet(faddr *f, faddr *t, time_t mdate, int flags, char *Subj, char *msgi
|
||||
Msg.Netmail = TRUE;
|
||||
|
||||
/*
|
||||
* These are the only usefull flags in netmail
|
||||
* Set flags for the message base.
|
||||
*/
|
||||
if ((msgs.MsgKinds == BOTH) || (msgs.MsgKinds == PRIVATE))
|
||||
Msg.Private = (flags & M_PVT) ? TRUE:FALSE;
|
||||
Msg.Private = (((flags & M_PVT) ? TRUE:FALSE) || flag_on((char *)"PVT", flagstr));
|
||||
else
|
||||
Msg.Private = TRUE; /* Allways */
|
||||
if (flags & M_CRASH)
|
||||
Msg.Crash = TRUE;
|
||||
if (flags & M_FILE)
|
||||
Msg.FileAttach = TRUE;
|
||||
if (flags & M_TRANSIT)
|
||||
Msg.Intransit = TRUE;
|
||||
if (flags & M_REQ)
|
||||
Msg.FileRequest = TRUE;
|
||||
if (flags & M_RRQ)
|
||||
Msg.ReceiptRequest = TRUE;
|
||||
Msg.Crash = ((flags & M_CRASH) || flag_on((char *)"CRA", flagstr));
|
||||
Msg.FileAttach = ((flags & M_FILE) || flag_on((char *)"FIL", flagstr));
|
||||
Msg.Intransit = ((flags & M_TRANSIT));
|
||||
Msg.FileRequest = ((flags & M_REQ) || flag_on((char *)"FRQ", flagstr));
|
||||
Msg.ReceiptRequest = ((flags & M_RRQ) || flag_on((char *)"RRQ", flagstr));
|
||||
Msg.KillSent = ((flags & M_KILLSENT) || flag_on((char *)"K/S", flagstr));
|
||||
Msg.ArchiveSent = flag_on((char *)"A/S", flagstr);
|
||||
Msg.Hold = ((flags & M_HOLD) || flag_on((char *)"HLD", flagstr));
|
||||
Msg.Immediate = flag_on((char *)"IMM", flagstr);
|
||||
Msg.Direct = flag_on((char *)"DIR", flagstr);
|
||||
Msg.Gate = flag_on((char *)"ZON", flagstr);
|
||||
Msg.TruncFile = flag_on((char *)"TFS", flagstr);
|
||||
Msg.KillFile = flag_on((char *)"KFS", flagstr);
|
||||
Msg.ConfirmRequest = ((flags * M_AUDIT) || flag_on((char *)"CFM", flagstr));
|
||||
Msg.Orphan = ((flags & M_ORPHAN));
|
||||
|
||||
if (Msg.ReceiptRequest) {
|
||||
Syslog('+', "Netmail has ReceiptRequest flag, no message created");
|
||||
}
|
||||
|
||||
/*
|
||||
* Set MSGID and REPLY crc.
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define _STORENET_H
|
||||
|
||||
|
||||
int storenet(faddr *, faddr *, time_t, int, char *, char *, char *, FILE *);
|
||||
int storenet(faddr *, faddr *, time_t, int, char *, char *, char *, FILE *, char*);
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user