mars-mail/ohmail

27 lines
690 B
Plaintext
Raw Normal View History

2011-11-13 00:46:51 +01:00
#!/bin/bash
2011-11-13 00:46:51 +01:00
#
# Purpose: This shell script will list all users logged in via samba or
# mars and see if it needs to inform them about new mail waiting..
# Please create a generic mail handling user on mars and customize this
# script for your needs...
#
marsserver="YourMarsServerName"
mailusr="auseronmarsthathandlesmailnotification"
mailusrpwd="passwordforyourgenericmailuser"
2011-11-13 00:46:51 +01:00
while [ true ] ;
do
2011-11-13 00:46:51 +01:00
nwuserlist -S $marsserver -U $mailusr -P $mailusrpwd > /tmp/nwusers.list
smbstatus > /tmp/smbusers.list
2011-11-13 00:46:51 +01:00
for x in `cat /etc/ohmaillist`
do
/usr/sbin/ohmessage $x
sleep 1
done
2011-11-13 00:46:51 +01:00
sleep 120
2011-11-13 00:46:51 +01:00
done
2011-11-13 00:46:51 +01:00
# ohmail needs to be installed in /usr/sbin together with ohmessage.