aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-03-03 16:05:53 +0000
committerLouise Crow <louise.crow@gmail.com>2014-03-03 16:05:53 +0000
commit8e911d5bd0e60a0e0e4859868662cc176419d2e3 (patch)
treeadc49212c8fe9777967df249fe3811b0ef0ea777
parent17bc0ba1bca6783b76957f5769e2e9d96d0ee8e4 (diff)
parentfe04d4c308568fb6e3466ffde0bfffe959736923 (diff)
Merge branch 'hotfix/0.16.0.8' of ssh://git.mysociety.org/data/git/public/alaveteli into hotfix/0.16.0.80.16.0.8
-rwxr-xr-xscript/mailin3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/mailin b/script/mailin
index f782df215..65f9d06f2 100755
--- a/script/mailin
+++ b/script/mailin
@@ -22,7 +22,8 @@ then
# send error to administators (use mutt for MIME encoding)
SUBJ="Mail import error for $OPTION_DOMAIN"
BODY="There was an error code $ERROR_CODE returned by the RequestMailer.receive command in script/mailin. See attached for details. This might be quite serious, such as the database was down, or might be an email with corrupt headers that Rails is choking on. We returned the email with an exit code 75, which for Exim at least instructs the MTA to try again later. A well configured installation of this code will separately have had Exim make a backup copy of the email in a separate mailbox, just in case."
- /usr/bin/mutt -s "$SUBJ" -a "$OUTPUT" "$INPUT" -- "$OPTION_CONTACT_EMAIL" <<<"$BODY"
+ FROM="$OPTION_BLACKHOLE_PREFIX@$OPTION_INCOMING_EMAIL_DOMAIN"
+ /usr/bin/mutt -e "set use_envelope_from" -e "set envelope_from_address=$FROM" -s "$SUBJ" -a "$OUTPUT" "$INPUT" -- "$OPTION_FORWARD_NONBOUNCE_RESPONSES_TO" <<<"$BODY"
# tell exim error was temporary, so try again later (no point bouncing message to authority)
rm -f "$INPUT" "$OUTPUT"