EGroupware Alarm als Windows Popup
Aus MHC-Wiki
/etc/amavis/amavisd.conf
$keep_decoded_original_re = new_RE(
qr'^MAIL$', # retain full original message for virus checking (can be slow)
qr'^MAIL-UNDECIPHERABLE$', # retain full mail if it contains undecipherables
qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
# qr'^Zip archive data',
);
...
@av_scanners = (
['eGroupware Alarm Interface',
['/usr/local/bin/egw_alarm.sh'],
' {}/*', [0,3,6,8], qr/\b(INFECTED|SUSPICION)\b/,
qr/(?:INFECTED|SUSPICION) (.+)/,
],
/usr/local/bin/egw_alarm.sh
#!/bin/sh
for i in `echo $*`
do
echo $i | grep -q "part-00000" && F0=$i
echo $i | grep -q "part-00001" && F1=$i
done
cat $F0 | egrep -q "eGroupWare" && cat $F0 | grep -q "^Subject:*.*Alarm"
if [ $? -eq 0 ]; then
USER=`grep "^To" $F0 | cut -d " " -f 2 | cut -d "@" -f 1`
MACHINE=`smbstatus -b | grep "(" | grep $USER | awk -- '{print $4}'`
cat $F1 | smbclient -M $MACHINE >/dev/null 2>&1
fi
exit 0

