From dc53363a43c0b5818e0df98f6d3c0c7538721e12 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 10 Jun 2007 09:57:44 +0000 Subject: Simplify user config by simply relying on a standard .gotmailrc file. --- localgotallmail | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'localgotallmail') diff --git a/localgotallmail b/localgotallmail index 6bce78c..54f3ced 100755 --- a/localgotallmail +++ b/localgotallmail @@ -2,7 +2,7 @@ set -e -configfile=".gotmailauth" +configfile=".gotmailrc" if [ -e /etc/adduser.conf ]; then . /etc/adduser.conf @@ -36,14 +36,6 @@ for user in $USERS; do # [ -L $HOME ] && continue if [ -e $HOME/$configfile ]; then - for line in `cat $HOME/$configfile | egrep -v '^[[:blank:]]*#'`; do - login=`echo "$line" | awk -F: '{print $1}'` - pw=`echo "$line" | awk -F: '{print $2}'` - target=`echo "$line" | awk -F: '{print $3}'` - if [ -z "$target" ]; then - target=$user - fi - su mail -c "gotmail -u $login -p $pw --delete --use-sa --delete-spam $opts --forwarding-email $target || echo \"Gotmail from $login@hotmail.com to $target failed with error \$?\"" - done + su "$user" -s /bin/sh -c 'gotmail --silent' fi done -- cgit v1.2.3