aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/mailsync5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/mailsync b/bin/mailsync
index 00e6d2c..a3b7308 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -94,7 +94,7 @@ def save_state(listid,n):
file = absdir(conf['core']['htmlrootdir'] + "/" + listid + "/.state")
try:
with open(file, 'w') as f:
- f.write(str(n + 1) + "\n")
+ f.write(str(n) + "\n")
except IOError:
print("cannot write %s: %s" % (file,sys.exc_info()), file=sys.stderr)
status = EX_FAILURE
@@ -125,7 +125,6 @@ def mboxtohtml(listid):
n = get_state(listid)
t = 0
for message in inbox.values()[n:]:
- n += 1
frm = message.get_from()
s = frm.split(' ', 1)
t = strptime(s[1], '%a %b %d %H:%M:%S %Y')
@@ -159,7 +158,7 @@ def mboxtohtml(listid):
print("\"%s\": %s" % (str(cmd), err), file=sys.stderr)
status = EX_FAILURE
- save_state(listid, n)
+ save_state(listid, len(inbox))
if t > 0:
save_timestamp(listid, t)

Return to:

Send suggestions and report system problems to the System administrator.