summaryrefslogtreecommitdiff
path: root/localgotallmail
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2007-06-10 09:57:44 +0000
committerJonas Smedegaard <dr@jones.dk>2007-06-10 09:57:44 +0000
commitdc53363a43c0b5818e0df98f6d3c0c7538721e12 (patch)
tree9190540555e312997125c6d1a5691b7ae7960e49 /localgotallmail
parentfcd748c2a54d7ca165ee4c1cc98844e6eb814e64 (diff)
Simplify user config by simply relying on a standard .gotmailrc file.
Diffstat (limited to 'localgotallmail')
-rwxr-xr-xlocalgotallmail12
1 files changed, 2 insertions, 10 deletions
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