From 856e79af57d3611cbbc105b6dfe9e4d712a9454e Mon Sep 17 00:00:00 2001 From: Lukas Matt Date: Wed, 25 Oct 2017 22:03:06 +0200 Subject: [PATCH] Do not run aws mail fetching script if not configured --- target/bin/fetch-aws-ses-mail | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/bin/fetch-aws-ses-mail b/target/bin/fetch-aws-ses-mail index 2ebdc3d8..4377634c 100644 --- a/target/bin/fetch-aws-ses-mail +++ b/target/bin/fetch-aws-ses-mail @@ -1,5 +1,9 @@ #!/bin/bash +if [ -z "$AWS_SES_KEY_ID" ] || [ -z "$AWS_SES_SECRET" ]; then + exit 0; # AWS mail fetching is not configured +fi + find /var/mail -maxdepth 1 -name '*.*' |while read -r domainPath; do domain=${domainPath##*/};