aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2020-11-12 19:22:37 -0300
committerSilvio Rhatto <rhatto@riseup.net>2020-11-12 19:22:37 -0300
commit336023055c3f469e5943d32fe2478516fecabb16 (patch)
tree9758c086e6531f181fc88cf7905a8a12e7fdb618
parentd4a2c219491eaf9d4f8c7d11be19cb8bc5647864 (diff)
downloadutils-mail-336023055c3f469e5943d32fe2478516fecabb16.tar.gz
utils-mail-336023055c3f469e5943d32fe2478516fecabb16.tar.bz2
Feat: adds alternative getmails wrapper
-rwxr-xr-xgetmails-alternative17
1 files changed, 17 insertions, 0 deletions
diff --git a/getmails-alternative b/getmails-alternative
new file mode 100755
index 0000000..982f7aa
--- /dev/null
+++ b/getmails-alternative
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# Simple wrapper around getmail to fetch from all active accounts.
+# Alternative to the getmails(1) wrapper.
+# See http://pyropus.ca/software/getmail/configuration.html#running-commandline-options
+#
+
+# Parameters
+CONFIG_FOLDER="$HOME/.getmail/config"
+
+# Check
+if [ ! -d "$CONFIG_FOLDER" ]; then
+ exit
+fi
+
+# Dispatch
+ls -1 $CONFIG_FOLDER | grep -v '^oldmail-' | grep '@' | grep -v '.disabled$' | xargs echo | sed -e 's/ / --rcfile /g' | xargs echo getmail --rcfile