Now echomail also honors the pack mail switch
This commit is contained in:
parent
3528a2e67e
commit
7cb2fc2f54
@ -35,6 +35,8 @@ v0.35.05 19-Oct-2002
|
||||
Added in screen 1.14 settings for Plus All, Notify, Passwd and
|
||||
Pause.
|
||||
Removed the default Virnet record from the fidonet setup.
|
||||
In node setup the pack netmail switch is renamed and is now
|
||||
for all mail.
|
||||
|
||||
mbfido:
|
||||
With ticfile processing, the KeepDate setup setting now works.
|
||||
@ -42,6 +44,9 @@ v0.35.05 19-Oct-2002
|
||||
Plus All, Notify, Passwd, Message, Tic on/off and Pause.
|
||||
The AreaMgr reuqests now honor the setting of the switches
|
||||
Plus All, Notify, Passwd and Pause.
|
||||
Echomail is now also packed or not according to the packmail
|
||||
switch in mbsetup.
|
||||
Statistics count for exported echomail now works.
|
||||
|
||||
mbtask:
|
||||
Removed debug logging of "does" info.
|
||||
|
2
TODO
2
TODO
@ -90,8 +90,6 @@ mbfido:
|
||||
N: Force processing of arealists so that all tags are forced to
|
||||
uppercase.
|
||||
|
||||
N: Echomail is packed when mail for a node is set to unpacked.
|
||||
|
||||
mbcico:
|
||||
L: Implement modem connect response translation for ISDN lines, i.e.
|
||||
make the CAUSE responses human readable. see McMail for this
|
||||
|
@ -12,7 +12,7 @@
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<BLOCKQUOTE>
|
||||
<div align=right><h5>Last update 28-Sep-2002</h5></div>
|
||||
<div align=right><h5>Last update 31-Oct-2002</h5></div>
|
||||
|
||||
<div align=center><H1>MBSE BBS Setup - Fidonet nodes.</H1></div>
|
||||
<P>
|
||||
@ -61,7 +61,7 @@ netmail to this node.</td></tr>
|
||||
to this node.</td></tr>
|
||||
<tr><th nowrap align=left valign=top>Netmail hold</th><td>Put mail on "hold" for this
|
||||
node.</td></tr>
|
||||
<tr><th nowrap align=left valign=top>Pack netmail</th><td>Should netmail be packed in
|
||||
<tr><th nowrap align=left valign=top>Pack mail</th><td>Should net- and echomail be packed in
|
||||
arcmail archives.</td></tr>
|
||||
<tr><th nowrap align=left valign=top>Send notify</th><td>Send automatic generated
|
||||
notify messages.</td></tr>
|
||||
|
@ -179,7 +179,7 @@ maketags.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/
|
||||
mbmsg.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/dbcfg.h ../lib/mberrors.h post.h mbmsg.h
|
||||
newspost.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/mbinet.h newspost.h
|
||||
postemail.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/dbuser.h ../lib/common.h ../lib/clcomm.h ../lib/mbinet.h postemail.h
|
||||
scan.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/msg.h ../lib/clcomm.h ../lib/msgtext.h ../lib/dbnode.h ../lib/dbmsgs.h addpkt.h tracker.h ftn2rfc.h rfc2ftn.h postemail.h scan.h
|
||||
scan.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/msg.h ../lib/clcomm.h ../lib/msgtext.h ../lib/dbnode.h ../lib/dbmsgs.h addpkt.h tracker.h ftn2rfc.h rfc2ftn.h rollover.h postemail.h scan.h
|
||||
toberep.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h tic.h toberep.h
|
||||
atoul.o: ../config.h ../lib/libs.h ../lib/memwatch.h atoul.h
|
||||
filemgr.o: ../config.h ../lib/libs.h ../lib/memwatch.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h ../lib/dbcfg.h ../lib/dbnode.h ../lib/dbtic.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h ../lib/diesel.h sendmail.h mgrutil.h createf.h filemgr.h
|
||||
|
@ -80,12 +80,25 @@ int EchoOut(fidoaddr, char *, char *, char *, FILE *, int, int, time_t);
|
||||
*/
|
||||
int EchoOut(fidoaddr aka, char *toname, char *fromname, char *subj, FILE *fp, int flags, int cost, time_t date)
|
||||
{
|
||||
char *buf;
|
||||
char *buf, ext[4];
|
||||
FILE *qp;
|
||||
faddr *From, *To;
|
||||
int rc;
|
||||
|
||||
if ((qp = OpenPkt(msgs.Aka, aka, (char *)"qqq")) == NULL) {
|
||||
/*
|
||||
* Pack flavor for echomail packets.
|
||||
*/
|
||||
memset(&ext, 0, sizeof(ext));
|
||||
if (nodes.PackNetmail)
|
||||
sprintf(ext, (char *)"qqq");
|
||||
else if (nodes.Crash)
|
||||
sprintf(ext, (char *)"ccc");
|
||||
else if (nodes.Hold)
|
||||
sprintf(ext, (char *)"hhh");
|
||||
else
|
||||
sprintf(ext, (char *)"nnn");
|
||||
|
||||
if ((qp = OpenPkt(msgs.Aka, aka, (char *)ext)) == NULL) {
|
||||
WriteError("EchoOut(): OpenPkt failed");
|
||||
return 1;
|
||||
}
|
||||
@ -496,10 +509,12 @@ int postecho(faddr *p_from, faddr *f, faddr *t, char *orig, char *subj, time_t m
|
||||
StatAdd(&nodes.MailSent, 1L);
|
||||
UpdateNode();
|
||||
SearchNode(tmpq->aka);
|
||||
echo_out++;
|
||||
if (EchoOut(tmpq->aka, t->name, f->name, subj, nfp, flags, cost, mdate))
|
||||
WriteError("Forward echomail to %s failed", aka2str(tmpq->aka));
|
||||
} else {
|
||||
WriteError("Forward echomail to %s failed, noderecord not found", aka2str(tmpq->aka));
|
||||
}
|
||||
echo_out++;
|
||||
if (EchoOut(tmpq->aka, t->name, f->name, subj, nfp, flags, cost, mdate))
|
||||
WriteError("Forward echomail to %s failed", aka2str(tmpq->aka));
|
||||
}
|
||||
}
|
||||
|
||||
|
157
mbfido/scan.c
157
mbfido/scan.c
@ -44,6 +44,7 @@
|
||||
#include "tracker.h"
|
||||
#include "ftn2rfc.h"
|
||||
#include "rfc2ftn.h"
|
||||
#include "rollover.h"
|
||||
#include "postemail.h"
|
||||
#include "scan.h"
|
||||
|
||||
@ -573,86 +574,106 @@ int RescanOne(faddr *L, char *marea, unsigned long Num)
|
||||
*/
|
||||
void ExportEcho(sysconnect L, unsigned long MsgNum, fa_list **sbl)
|
||||
{
|
||||
char *p;
|
||||
int seenlen, oldnet, flags = 0;
|
||||
char sbe[16];
|
||||
fa_list *tmpl;
|
||||
FILE *qp;
|
||||
faddr *from, *dest;
|
||||
int is_pid = FALSE;
|
||||
int seenlen, oldnet, flags = 0, is_pid = FALSE;
|
||||
char *p, sbe[16], ext[4];
|
||||
fa_list *tmpl;
|
||||
FILE *qp;
|
||||
faddr *from, *dest;
|
||||
|
||||
if ((!L.sendto) || L.pause || L.cutoff)
|
||||
return;
|
||||
if ((!L.sendto) || L.pause || L.cutoff)
|
||||
return;
|
||||
|
||||
Syslog('M', "Export to %s", aka2str(L.aka));
|
||||
Syslog('M', "Export to %s", aka2str(L.aka));
|
||||
|
||||
if ((qp = OpenPkt(msgs.Aka, L.aka, (char *)"qqq")) == NULL)
|
||||
return;
|
||||
if (!SearchNode(L.aka)) {
|
||||
WriteError("Can't send to %s, noderecord not found", aka2str(L.aka));
|
||||
return;
|
||||
}
|
||||
|
||||
flags |= (Msg.Private) ? M_PVT : 0;
|
||||
from = fido2faddr(msgs.Aka);
|
||||
dest = fido2faddr(L.aka);
|
||||
AddMsgHdr(qp, from, dest, flags, 0, Msg.Written, Msg.To, Msg.From, Msg.Subject);
|
||||
tidy_faddr(from);
|
||||
tidy_faddr(dest);
|
||||
fprintf(qp, "AREA:%s\r", msgs.Tag);
|
||||
/*
|
||||
* Add statistics count
|
||||
*/
|
||||
StatAdd(&nodes.MailSent, 1L);
|
||||
UpdateNode();
|
||||
SearchNode(L.aka);
|
||||
|
||||
if (Msg_Read(MsgNum, 78)) {
|
||||
if ((p = (char *)MsgText_First()) != NULL) {
|
||||
do {
|
||||
if ((strncmp(p, " * Origin:", 10) == 0) && !is_pid) {
|
||||
/*
|
||||
* If there was no PID kludge, insert the TID
|
||||
* kludge anyway.
|
||||
*/
|
||||
fprintf(qp, "\001TID: MBSE-FIDO %s\r", VERSION);
|
||||
}
|
||||
fprintf(qp, "%s", p);
|
||||
if (strncmp(p, " * Origin:", 10) == 0)
|
||||
break;
|
||||
memset(&ext, 0, sizeof(ext));
|
||||
if (nodes.PackNetmail)
|
||||
sprintf(ext, (char *)"qqq");
|
||||
else if (nodes.Crash)
|
||||
sprintf(ext, (char *)"ccc");
|
||||
else if (nodes.Hold)
|
||||
sprintf(ext, (char *)"hhh");
|
||||
else
|
||||
sprintf(ext, (char *)"nnn");
|
||||
|
||||
/*
|
||||
* Only append CR if not the last line
|
||||
*/
|
||||
fprintf(qp, "\r");
|
||||
if ((qp = OpenPkt(msgs.Aka, L.aka, (char *)ext)) == NULL)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Append ^aTID line behind the PID.
|
||||
*/
|
||||
if (strncmp(p, "\001PID", 4) == 0) {
|
||||
fprintf(qp, "\001TID: MBSE-FIDO %s\r", VERSION);
|
||||
is_pid = TRUE;
|
||||
}
|
||||
flags |= (Msg.Private) ? M_PVT : 0;
|
||||
from = fido2faddr(msgs.Aka);
|
||||
dest = fido2faddr(L.aka);
|
||||
AddMsgHdr(qp, from, dest, flags, 0, Msg.Written, Msg.To, Msg.From, Msg.Subject);
|
||||
tidy_faddr(from);
|
||||
tidy_faddr(dest);
|
||||
fprintf(qp, "AREA:%s\r", msgs.Tag);
|
||||
|
||||
} while ((p = (char *)MsgText_Next()) != NULL);
|
||||
if (Msg_Read(MsgNum, 78)) {
|
||||
if ((p = (char *)MsgText_First()) != NULL) {
|
||||
do {
|
||||
if ((strncmp(p, " * Origin:", 10) == 0) && !is_pid) {
|
||||
/*
|
||||
* If there was no PID kludge, insert the TID
|
||||
* kludge anyway.
|
||||
*/
|
||||
fprintf(qp, "\001TID: MBSE-FIDO %s\r", VERSION);
|
||||
}
|
||||
}
|
||||
fprintf(qp, "%s", p);
|
||||
if (strncmp(p, " * Origin:", 10) == 0)
|
||||
break;
|
||||
|
||||
seenlen = MAXSEEN + 1;
|
||||
/*
|
||||
* Ensure that it will not match the first entry.
|
||||
*/
|
||||
oldnet = (*sbl)->addr->net - 1;
|
||||
for (tmpl = *sbl; tmpl; tmpl = tmpl->next) {
|
||||
if (tmpl->addr->net == oldnet)
|
||||
sprintf(sbe, " %u", tmpl->addr->node);
|
||||
else
|
||||
sprintf(sbe, " %u/%u", tmpl->addr->net, tmpl->addr->node);
|
||||
oldnet = tmpl->addr->net;
|
||||
seenlen += strlen(sbe);
|
||||
if (seenlen > MAXSEEN) {
|
||||
seenlen = 0;
|
||||
fprintf(qp, "\rSEEN-BY:");
|
||||
sprintf(sbe, " %u/%u", tmpl->addr->net, tmpl->addr->node);
|
||||
seenlen = strlen(sbe);
|
||||
/*
|
||||
* Only append CR if not the last line
|
||||
*/
|
||||
fprintf(qp, "\r");
|
||||
|
||||
/*
|
||||
* Append ^aTID line behind the PID.
|
||||
*/
|
||||
if (strncmp(p, "\001PID", 4) == 0) {
|
||||
fprintf(qp, "\001TID: MBSE-FIDO %s\r", VERSION);
|
||||
is_pid = TRUE;
|
||||
}
|
||||
fprintf(qp, "%s", sbe);
|
||||
}
|
||||
fprintf(qp, "\r\001PATH: %u/%u\r", msgs.Aka.net, msgs.Aka.node);
|
||||
putc(0, qp);
|
||||
fclose(qp);
|
||||
|
||||
echo_out++;
|
||||
} while ((p = (char *)MsgText_Next()) != NULL);
|
||||
}
|
||||
}
|
||||
|
||||
seenlen = MAXSEEN + 1;
|
||||
/*
|
||||
* Ensure that it will not match the first entry.
|
||||
*/
|
||||
oldnet = (*sbl)->addr->net - 1;
|
||||
for (tmpl = *sbl; tmpl; tmpl = tmpl->next) {
|
||||
if (tmpl->addr->net == oldnet)
|
||||
sprintf(sbe, " %u", tmpl->addr->node);
|
||||
else
|
||||
sprintf(sbe, " %u/%u", tmpl->addr->net, tmpl->addr->node);
|
||||
oldnet = tmpl->addr->net;
|
||||
seenlen += strlen(sbe);
|
||||
if (seenlen > MAXSEEN) {
|
||||
seenlen = 0;
|
||||
fprintf(qp, "\rSEEN-BY:");
|
||||
sprintf(sbe, " %u/%u", tmpl->addr->net, tmpl->addr->node);
|
||||
seenlen = strlen(sbe);
|
||||
}
|
||||
fprintf(qp, "%s", sbe);
|
||||
}
|
||||
fprintf(qp, "\r\001PATH: %u/%u\r", msgs.Aka.net, msgs.Aka.node);
|
||||
putc(0, qp);
|
||||
fclose(qp);
|
||||
|
||||
echo_out++;
|
||||
}
|
||||
|
||||
|
||||
|
@ -667,7 +667,7 @@ void GeneralScreen(void)
|
||||
mvprintw(15, 2, "9. Netmail direct");
|
||||
mvprintw(16, 2, "10. Netmail crash");
|
||||
mvprintw(17, 2, "11. Netmail hold");
|
||||
mvprintw(18, 2, "12. Pack netmail");
|
||||
mvprintw(18, 2, "12. Pack mail");
|
||||
|
||||
mvprintw(16,42, "13. Send notify");
|
||||
mvprintw(17,42, "14. Language");
|
||||
@ -736,7 +736,7 @@ void GeneralEdit(void)
|
||||
if (nodes.Hold)
|
||||
nodes.Crash = FALSE;
|
||||
break;
|
||||
case 12:E_BOOL(18,23, nodes.PackNetmail, "^Pack netmail^ for this node")
|
||||
case 12:E_BOOL(18,23, nodes.PackNetmail, "^Pack mail^ for this node")
|
||||
case 13:E_BOOL(16,63, nodes.Notify, "Send ^notify^ messages to this node")
|
||||
case 14:i = PickLanguage((char *)"7.1.14");
|
||||
if (i != '\0')
|
||||
@ -1464,7 +1464,7 @@ int node_doc(FILE *fp, FILE *toc, int page)
|
||||
fprintf(fp, " Mail direct %s", getboolean(nodes.Direct));
|
||||
fprintf(fp, " Mail crash %s", getboolean(nodes.Crash));
|
||||
fprintf(fp, " Mail hold %s\n", getboolean(nodes.Hold));
|
||||
fprintf(fp, " Pack Netmail %s", getboolean(nodes.PackNetmail));
|
||||
fprintf(fp, " Pack mail %s", getboolean(nodes.PackNetmail));
|
||||
fprintf(fp, " Send notify %s", getboolean(nodes.Notify));
|
||||
fprintf(fp, " Language %c\n", nodes.Language);
|
||||
fprintf(fp, " No EMSI %s", getboolean(nodes.NoEMSI));
|
||||
|
Reference in New Issue
Block a user