Skip to content

Commit

Permalink
Add error logging to mailparse.sh and update master.cf to pipe emails…
Browse files Browse the repository at this point in the history
… through mailparse.
  • Loading branch information
nsouto committed Aug 21, 2024
1 parent 176095d commit f9aff8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions postfix/etc/postfix/master.cf
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,5 @@ scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FRX user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}
catchall unix - n n - - pipe
flags=F user=nobody argv=/usr/local/bin/mailparse.sh
4 changes: 4 additions & 0 deletions postfix/usr/local/bin/mailparse.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

exec 2>>/var/log/email_pipe_error.log

env > /tmp/mailparse_env.log

# Configuration from environment variables
KINESIS_STREAM_NAME="${KINESIS_STREAM_NAME:-}"
KINESIS_REGION="${KINESIS_REGION:-}"
Expand Down

0 comments on commit f9aff8c

Please sign in to comment.