Commit 79e4c4b7 authored by rswindell's avatar rswindell
Browse files

Another change for Bill:

Added (back) the '-d' command-line option to disable the deletion of processed
(e.g. imported) inbound netmail messages.
- This option has no effect if DeleteNetmail is set to "false" in sbbsecho.ini.
- This option *only* disables deletion of incoming netmail (no effect on
  outbound netmail deletion)
- In SBBSecho v2, the '-d' option disabled all netmail deletion, even though
  the help output only mentioned "netmail after import" (it was wrong).
parent b18ee75f
......@@ -64,6 +64,7 @@
smb_t *smb,*email;
bool opt_import_packets = true;
bool opt_import_netmail = true;
bool opt_delete_netmail = true; /* delete after importing (no effect on exported netmail) */
bool opt_import_echomail = true;
bool opt_export_echomail = true;
bool opt_export_netmail = true;
......@@ -3677,7 +3678,7 @@ int import_netmail(const char* path, fmsghdr_t hdr, FILE* fidomsg, const char* i
if(!stricmp(,"AREAFIX") || !stricmp(,"SBBSECHO")) {
if(path[0]) {
if(cfg.delete_netmail) {
if(cfg.delete_netmail && opt_delete_netmail) {
delfile(path, __LINE__);
......@@ -4971,6 +4972,7 @@ int main(int argc, char **argv)
"sbbsecho, by default, will:\n\n"
" * Process packets (*.pkt) from all inbound directories (-p to disable)\n"
" * Process netmail (*.msg) files and import netmail messages (-n to disable)\n"
" * Delete netmail messages/files after importing them (-d to disable)\n"
" * Import and forward packetized echomail messages (-i to disable)\n"
" * Export local netmail messages from SMB to *.msg (-c to disable)\n"
" * Export echomail messages from selected and linked sub(s) (-e to disable)\n"
......@@ -5028,6 +5030,9 @@ int main(int argc, char **argv)
case 'C':
opt_export_netmail = false;
case 'D':
opt_delete_netmail = false;
case 'E':
opt_export_echomail = false;
......@@ -5074,7 +5079,6 @@ int main(int argc, char **argv)
printf("%s", usage);
case 'B':
case 'D':
case 'F':
case 'J':
case 'L':
......@@ -5408,7 +5412,7 @@ int main(int argc, char **argv)
/* Delete source netmail if specified */
if(i==0) {
if(cfg.delete_netmail) {
if(cfg.delete_netmail && opt_delete_netmail) {
delfile(path, __LINE__);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment