Do not run aws mail fetching script if not configured

This commit is contained in:
Lukas Matt 2017-10-25 22:03:06 +02:00
parent 65b9be15df
commit 856e79af57
1 changed files with 4 additions and 0 deletions

View File

@ -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##*/};