summaryrefslogtreecommitdiff
path: root/sfeed_maildir
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-07-31 01:20:08 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-07-31 01:34:27 +0200
commitb74be27d28d068af81ba7d9fce43f548b59d2513 (patch)
treeaa62b98ab7288ed69d9e4bc2b6f0e944b471f9ca /sfeed_maildir
parent3bdac3dbeb37c4c221a135b18890da018e6d77b3 (diff)
sfeed_maildir: check if procmail config exists and is readable
Diffstat (limited to 'sfeed_maildir')
-rwxr-xr-xsfeed_maildir6
1 files changed, 6 insertions, 0 deletions
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"