This reverts commit 507aea2c66
.
tags/ipasserelle-groupware-0.2.37-1
parent
507aea2c66
commit
17873c7a6e
7 changed files with 2 additions and 72 deletions
@ -1,38 +0,0 @@ |
||||
#!/bin/bash |
||||
|
||||
HOME=/root |
||||
|
||||
SOGOWL=$(/sbin/e-smith/db configuration getprop sogod AutoWhiteList || $(echo no)) |
||||
|
||||
if [ "$SOGOWL" != 'yes' ]; then |
||||
exit 0 |
||||
fi |
||||
|
||||
OLDMD5=$(md5sum /etc/mail/spamassassin/sogo_whitelist) |
||||
|
||||
/usr/bin/mysql <<'EOF' | grep -iE "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$" \ |
||||
| tr '[:upper:]' '[:lower:]' | sed -e 's/^/whitelist_from /' > /etc/mail/spamassassin/sogo_whitelist |
||||
connect sogo; |
||||
SELECT CONCAT( |
||||
'SELECT * FROM (SELECT c_mail FROM ', |
||||
GROUP_CONCAT(tb SEPARATOR ' UNION SELECT c_mail FROM '), |
||||
') AS emails ORDER BY c_mail' |
||||
) |
||||
INTO @mailquery FROM |
||||
( |
||||
SELECT TABLE_NAME tb |
||||
FROM INFORMATION_SCHEMA.COLUMNS |
||||
WHERE column_name LIKE 'c_mail' |
||||
AND TABLE_SCHEMA='sogo' |
||||
) AS tbls; |
||||
PREPARE stmt FROM @mailquery; |
||||
EXECUTE stmt; |
||||
DEALLOCATE PREPARE stmt; |
||||
EOF |
||||
|
||||
NEWMD5=$(md5sum /etc/mail/spamassassin/sogo_whitelist) |
||||
|
||||
if [ "$OLDMD5" != "$NEWMD5" ]; then |
||||
/usr/bin/sv h /service/spamd |
||||
fi |
||||
|
@ -1 +0,0 @@ |
||||
no |
@ -1,12 +0,0 @@ |
||||
{ |
||||
|
||||
my $sogowl = $sogod{'AutoWhiteList'} || 'no'; |
||||
|
||||
if ($sogowl eq 'yes'){ |
||||
$OUT .= 'include sogo_whitelist'; |
||||
} |
||||
else{ |
||||
$OUT .= ''; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue