diff mbox

[1/4] parsemail.sh: Always return a zero exit status

Message ID 1459054386-31394-2-git-send-email-jk@ozlabs.org
State Accepted
Headers show

Commit Message

Jeremy Kerr March 27, 2016, 4:53 a.m. UTC
This reverts changes to parsemail.sh introduced by
cbe992d84fba57831d44afb3a21cdf83454018b2.

When parsemail is used as a delivery command from a mail server like
postfix (as it is intended to be), a non-zero exit code will cause a
bounce message to be returned to the user. From the postfix manual:

  When  the  command  fails, a limited amount of command output is
  mailed back to the  sender.   The  file  /usr/include/sysexits.h
  defines  the expected exit status codes.

For cases where patchwork is unavailable, we absolutely do not want to
start bouncing messages to all patch contributors.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---
 patchwork/bin/parsemail.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Finucane March 29, 2016, 8:44 a.m. UTC | #1
On 27 Mar 12:53, Jeremy Kerr wrote:
> This reverts changes to parsemail.sh introduced by
> cbe992d84fba57831d44afb3a21cdf83454018b2.
> 
> When parsemail is used as a delivery command from a mail server like
> postfix (as it is intended to be), a non-zero exit code will cause a
> bounce message to be returned to the user. From the postfix manual:
> 
>   When  the  command  fails, a limited amount of command output is
>   mailed back to the  sender.   The  file  /usr/include/sysexits.h
>   defines  the expected exit status codes.
> 
> For cases where patchwork is unavailable, we absolutely do not want to
> start bouncing messages to all patch contributors.
> 
> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

Quite correct, and a good spot. Merged and backported to 'stable/1.1'.

Stephen
Stephen Finucane March 29, 2016, 8:51 a.m. UTC | #2
On 27 Mar 12:53, Jeremy Kerr wrote:
> This reverts changes to parsemail.sh introduced by
> cbe992d84fba57831d44afb3a21cdf83454018b2.
> 
> When parsemail is used as a delivery command from a mail server like
> postfix (as it is intended to be), a non-zero exit code will cause a
> bounce message to be returned to the user. From the postfix manual:
> 
>   When  the  command  fails, a limited amount of command output is
>   mailed back to the  sender.   The  file  /usr/include/sysexits.h
>   defines  the expected exit status codes.
> 
> For cases where patchwork is unavailable, we absolutely do not want to
> start bouncing messages to all patch contributors.
> 
> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

Acked-by: Stephen Finucane <stephen.finucane@intel.com>
diff mbox

Patch

diff --git a/patchwork/bin/parsemail.sh b/patchwork/bin/parsemail.sh
index c8220a7..9973392 100755
--- a/patchwork/bin/parsemail.sh
+++ b/patchwork/bin/parsemail.sh
@@ -26,4 +26,4 @@  PYTHONPATH="$PATCHWORK_BASE":"$PATCHWORK_BASE/lib/python:$PYTHONPATH" \
         DJANGO_SETTINGS_MODULE=patchwork.settings.production \
         "$PATCHWORK_BASE/patchwork/bin/parsemail.py"
 
-exit $@
+exit 0