#!/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