From b74be27d28d068af81ba7d9fce43f548b59d2513 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Fri, 31 Jul 2015 01:20:08 +0200 Subject: sfeed_maildir: check if procmail config exists and is readable --- sfeed_maildir | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sfeed_maildir b/sfeed_maildir index 099bc13..b6dc0ee 100755 --- a/sfeed_maildir +++ b/sfeed_maildir @@ -10,6 +10,12 @@ procmailconfig="$HOME/.sfeed/procmailrc" # message-id cache to prevent duplicates. mkdir -p "${maildir}/.cache" +if ! test -r "${procmailconfig}"; then + echo "Procmail configuration file \"${procmailconfig}\" does not exist or is not readable." >&2 + echo "See procmailrc.example for an example." >&2 + exit 1 +fi + find "${feedsdir}" -type f -exec printf '%s\n' {} \; | while read -r d; do (name=$(basename "${d}") mkdir -p "${maildir}/${name}/cur" -- cgit v1.2.3