chiark / gitweb /
tiocnotty: sort imports
[bin.git] / bsmtp-pull
index 600763d58e4540b7cd1c6f2ee912aea9fbd3cbd1..ebaee7ed7a652a2962456ab9756e907e40757cae 100755 (executable)
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 # Depends: lockfile-progs, ssh
 set -e
 
@@ -24,10 +24,11 @@ lockfile-create "$HOST"
 lockfile-touch "$HOST" &
 TOUCH="$!"
 trap 'kill "$TOUCH"; lockfile-remove "$HOST"' EXIT ERR HUP INT QUIT TERM
+disown %1
 
 ssh -2 -i "$HOME/.ssh/id-bsmtp-$HOST" -C "$HOST" bsmtp-pull-server > "$HOST"
 [ -s "$HOST" ] || exit 0
-/usr/sbin/sendmail -bS < "$HOST"
+/usr/sbin/sendmail -bS -odq < "$HOST"
 rm -f "$HOST"
 
 exit 0