]> git.ipfire.org Git - people/ms/dma.git/commitdiff
Teach dbounce-simple-safecat about the M*/Q* spool scheme.
authorPeter Pentchev <roam@ringlet.net>
Thu, 17 Jun 2010 14:29:46 +0000 (14:29 +0000)
committerPeter Pentchev <roam@ringlet.net>
Thu, 17 Jun 2010 14:29:46 +0000 (14:29 +0000)
changelog
dbounce-simple-safecat

index 8c54f35fb3d6c3fa13918908ad5907a2e8b0e3d9..d587e896755522679d2ab8affee1338361f22708 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,7 +1,5 @@
 dma (0.0.2009.08.29-1) UNRELEASED; urgency=low
 
-  TODO: make sure the double-bounce program works with the new queue format
-
   * New upstream version:
     - remove the 20-parse-recipient patch, implemented upstream in
       a different way
@@ -21,6 +19,8 @@ dma (0.0.2009.08.29-1) UNRELEASED; urgency=low
     - refresh 01-debian-build, 03-debian-locations, 04-debian-setgid,
       09-typos, 10-liblockfile, 11-double-bounce, 17-mailname,
       23-dirent-d_type, 24-random-message-id, and 25-unsupported-starttls
+    - teach the dbounce-simple-safecat handler about the M*/Q* spool
+      files scheme
   * Bump Standards-Version to 3.8.4 with no changes.
   * Bring the copyright file up to the latest revision of the DEP 5
     proposed format and bump the year on my copyright notice.
index 429e3e8f884a62b24b150f60aed2dac3f37d9443..d1697ede7dc71dd8edc8005258abb27e3aeca859 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2009  Peter Pentchev
+# Copyright (c) 2009, 2010  Peter Pentchev
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -69,7 +69,20 @@ if [ ! -r "$FILENAME" ]; then
        exit 1
 fi
 
-F=`safecat "$BOUNCEDIR/tmp" "$BOUNCEDIR/new" < "$FILENAME"`
+bname=`basename "$FILENAME"`
+dname=`dirname "$FILENAME"`
+if expr "$bname" : 'M' > /dev/null; then
+       qname="Q${bname#M}"
+       qfile="$dname/$qname"
+       if [ ! -r "$qfile" ]; then
+               echo "Nonexistent or unreadable bounce queue file $qfile" 1>&2
+               exit 1
+       fi
+else
+       qfile=''
+fi
+
+F=`cat ${qfile:+"$qfile"} "$FILENAME" | safecat "$BOUNCEDIR/tmp" "$BOUNCEDIR/new"`
 OUTFILE="$BOUNCEDIR/new/$F"
 if [ ! -f "$OUTFILE" ]; then
        echo "safecat indicated success, but '$OUTFILE' does not exist" 1>&2