Uses archiver from the setup to pack mail for a node
This commit is contained in:
parent
32a4763f32
commit
646a39fd06
@ -12,6 +12,9 @@ $Id$
|
|||||||
|
|
||||||
v0.83.14 23-Feb-2006
|
v0.83.14 23-Feb-2006
|
||||||
|
|
||||||
|
mbfido:
|
||||||
|
Uses archiver from the setup to pack mail for a node.
|
||||||
|
|
||||||
mbsetup:
|
mbsetup:
|
||||||
Added archiver selection for nodes in node setup.
|
Added archiver selection for nodes in node setup.
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Mail and file queue operations
|
* Purpose ...............: Mail and file queue operations
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2005
|
* Copyright (C) 1997-2006
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -265,14 +265,14 @@ void flush_dir(char *ndir)
|
|||||||
closedir(dp);
|
closedir(dp);
|
||||||
sort_fdlist(&fdl);
|
sort_fdlist(&fdl);
|
||||||
|
|
||||||
if (getarchiver((char *)"ZIP")) {
|
if (getarchiver(nodes.Archiver)) {
|
||||||
flavor = 'f';
|
flavor = 'f';
|
||||||
if (nodes.Crash)
|
if (nodes.Crash)
|
||||||
flavor = 'c';
|
flavor = 'c';
|
||||||
if (nodes.Hold)
|
if (nodes.Hold)
|
||||||
flavor = 'h';
|
flavor = 'h';
|
||||||
} else {
|
} else {
|
||||||
WriteError("Archiver ZIP not found");
|
WriteError("Archiver %s not found", nodes.Archiver);
|
||||||
if (noden.domain)
|
if (noden.domain)
|
||||||
free(noden.domain);
|
free(noden.domain);
|
||||||
free(temp);
|
free(temp);
|
||||||
@ -374,7 +374,7 @@ void flush_dir(char *ndir)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (first) {
|
if (first) {
|
||||||
Syslog('+', "Pack ARCmail for %s via %s", aka2str(nodenr), ascfnode(&noden, 0x1f));
|
Syslog('+', "Pack ARCmail for %s via %s with %s", aka2str(nodenr), ascfnode(&noden, 0x1f), nodes.Archiver);
|
||||||
if (!do_quiet) {
|
if (!do_quiet) {
|
||||||
printf("\rAdding ARCmail for %s ", ascfnode(&noden, 0x1f));
|
printf("\rAdding ARCmail for %s ", ascfnode(&noden, 0x1f));
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
@ -386,15 +386,8 @@ void flush_dir(char *ndir)
|
|||||||
if (execute_str(archiver.marc, arcfile, fname, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) {
|
if (execute_str(archiver.marc, arcfile, fname, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) {
|
||||||
unlink(fname);
|
unlink(fname);
|
||||||
} else {
|
} else {
|
||||||
WriteError("Create ARCmail failed, trying again after sync()");
|
WriteError("Can't add %s to ARCmail archive", fname);
|
||||||
sync();
|
Attach = FALSE;
|
||||||
sleep(1);
|
|
||||||
if (execute_str(archiver.marc, arcfile, fname, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) {
|
|
||||||
unlink(fname);
|
|
||||||
} else {
|
|
||||||
WriteError("Can't add %s to ARCmail archive", fname);
|
|
||||||
Attach = FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user