From 8562f99161e0cb34e6e0994adbdef31e0b5b63fc Mon Sep 17 00:00:00 2001 From: "Pierre Habouzit (MadCoder" Date: Tue, 21 Dec 2004 14:22:58 +0000 Subject: [PATCH] wibble git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-119 --- bin/sendmail | 6 ++++-- bin/smtp_bounce_proxy.py | 17 +++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/bin/sendmail b/bin/sendmail index e887936..e9d6a26 100755 --- a/bin/sendmail +++ b/bin/sendmail @@ -1,4 +1,6 @@ #!/bin/ash +# vim:set syntax=sh: + export LANG=C UID="$1" @@ -26,5 +28,5 @@ TO=`mysql -u web -h localhost --password="$3" -B -N x4dat -e \ exec cat > /dev/null } -OURSENDER=`echo "${ALIAS}__${SENDER}" | sed -e s/@/__/` -exec /usr/lib/sendmail -oi -V+= -f "${OURSENDER}@bounces.m4x.org" $TO +OURSENDER=`echo "${ALIAS}__${SENDER}" | sed -e s/@/__/`@bounces.m4x.org +exec /usr/lib/sendmail -oi -V+= -f "${OURSENDER}" $TO diff --git a/bin/smtp_bounce_proxy.py b/bin/smtp_bounce_proxy.py index 5be333d..675540c 100755 --- a/bin/smtp_bounce_proxy.py +++ b/bin/smtp_bounce_proxy.py @@ -89,7 +89,7 @@ class BounceMessage(Message.Message): it seems to be designed like this : ============================================= - [...QMAIL crap... + [...QMAIL crap...] --- Below this line is a copy of the message. Return-Path: <...> @@ -160,7 +160,7 @@ class BounceMessage(Message.Message): if int(mysql.rowcount) is not 1: return None uid = mysql.fetchone()[0] - mysql.execute("UPDATE emails SET panne = NOW() WHERE uid='%s' AND email='%s'""" % (uid, dest)) + mysql.execute("UPDATE emails SET panne = NOW() WHERE uid='%s' AND email='%s'" % (uid, dest)) mysql.execute("REPLACE INTO emails_broken (uid,email) VALUES(%s, '%s')" % (uid, dest)) mysql.execute("""SELECT COUNT(*), IFNULL(SUM(panne=0 OR (last!=0 AND ( TO_DAYS(NOW())-TO_DAYS(last) )>7 AND panne