Plesk – QMail und Spamdyke

Eine SQL DB erstellen.

mysql -uadmin -p`cat /etc/psa/.psa.shadow`

CREATE DATABASE spamdyke;
USE spamdyke;
CREATE TABLE `spamdyke_log_table` (
`id` bigint(7) NOT NULL auto_increment,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP,
`reason` varchar(20) character set utf8 NOT NULL,
`from` varchar(50) character set utf8 NOT NULL,
`to` varchar(50) character set utf8 NOT NULL,
`ip` varchar(15) character set utf8 NOT NULL,
`rdns` varchar(50) character set utf8 NOT NULL,
`auth` varchar(25) character set utf8 NOT NULL,
PRIMARY KEY (`id`),
KEY `time` (`time`),
KEY `reason` (`reason`,`from`,`to`,`ip`,`rdns`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

GRANT ALL ON spamdyke.* TO 'spamdyke'@'localhost' IDENTIFIED BY 'spamdyke';
FLUSH PRIVILEGES;
exit

Kompilieren und Installieren

cd /usr/local/src
wget http://www.haggybear.de/download/spamdyke-mysql.tgz
tar xzf spamdyke-mysql.tgz
cd spamdyke-*
cd spamdyke/
./configure
make
make install

nano /etc/spamdyke.conf
log-level=info

local-domains-file=/var/qmail/control/rcpthosts
tls-certificate-file=/var/qmail/control/servercert.pem
#Copy&Paste from xinetd-conf
smtp-auth-command=/var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /bin/qmail/bin/true
smtp-auth-level=ondemand-encrypted
#wichtiger Timeout:
idle-timeout-secs=100
graylist-level=always-create-dir
graylist-dir=/var/qmail/spamdyke/greylist
#(300 Sek. = 5 Min.)
graylist-min-secs=300
#1814400 Sek. = 3 Wochen
graylist-max-secs=1814400
sender-blacklist-file=/var/qmail/spamdyke/blacklist_senders
recipient-blacklist-file=/var/qmail/spamdyke/blacklist_recipients
ip-in-rdns-keyword-blacklist-file=/var/qmail/spamdyke/blacklist_keywords
ip-blacklist-file=/var/qmail/spamdyke/blacklist_ip
rdns-whitelist-file=/var/qmail/spamdyke/whitelist_rdns
ip-whitelist-file=/var/qmail/spamdyke/whitelist_ip
sender-whitelist-file=/var/qmail/spamdyke/whitelist_senders
greeting-delay-secs=2
#ggf. ein-/auskommentieren:
#MySQL-Logging:
config-mysql-database=spamdyke
config-mysql-username=spamdyke
config-mysql-password=spamdyke
connection-timeout-secs=1720
config-dir=/var/qmail/spamdyke/conf.d
config-dir=/var/qmail/spamdyke/conf.s
dns-blacklist-entry=ix.dnsbl.manitu.net
dns-blacklist-entry=sbl.spamhaus.org
dns-blacklist-entry=zen.spamhaus.org
#dns-blacklist-entry=list.dsbl.org
#dns-blacklist-entry=zombie.dnsbl.sorbs.net
#dns-blacklist-entry=dul.dnsbl.sorbs.net
dns-blacklist-entry=bogons.cymru.com
reject-missing-sender-mx
reject-empty-rdns

Ordner erstellen

mkdir /var/qmail/spamdyke
mkdir /var/qmail/spamdyke/greylist
touch /var/qmail/spamdyke/blacklist_ip
touch /var/qmail/spamdyke/blacklist_recipients
touch /var/qmail/spamdyke/whitelist_ip
touch /var/qmail/spamdyke/whitelist_senders
touch /var/qmail/spamdyke/blacklist_keywords
touch /var/qmail/spamdyke/blacklist_senders
touch /var/qmail/spamdyke/whitelist_rdns
chown -R qmaild:qmail /var/qmail/spamdyke

Xinetd anpassen
nano /etc/xinetd.d/smtp_psa
nano /etc/xinetd.d/smtps_psa

service smtp {
...
server = /var/qmail/bin/tcp-env
server_args = -Rt0 /var/qmail/bin/relaylock /usr/local/bin/spamdyke -f /etc/spamdyke.conf /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}

Script nach cron
cp -p ../cron/spamdyke-mysql-cleanup /etc/cron.daily/.
nano /etc/cron.daily/spamdyke-mysql-cleanup

use constant DBD => 'DBI:mysql:spamdyke:localhost:3306';
use constant DBUSER => 'spamdyke';
use constant DBPASS => 'spamdyke';

$dbh->disconnect;
exit;

my $rec = MAIL_RECIPIENT;

SCP installieren
runter laden und nach cd /opt/psa/admin/htdocs entpacken

nach dem entpacken

cd /opt/psa/admin/htdocs/spamdyke
chmod 755 ../spamdyke
chown -R root:psaadm *
chmod 644 -R *
chmod +x lang *.sh
chown root:root wrapper
chmod 4755 wrapper
chmod 777 rights.txt

Plesk
Button-Beschriftung Spamdyke
Hintergrundbild (z.B. das dslogo.gif aus dem Zip)
URL /spamdyke/index.php
Domain-ID einfügen [klick]
Domainname einfügen [klick]
Kunden-ID einfügen [klick]
Kontexthilfe-Inhalt Spamdyke-Control-Panel
URL im Control Panel öffnen [klick]
Sichtbar für andere Benutzer [klick]

Exchange 2010 diverses

Protokollname: Anwendung
Quelle: MSExchangeSA
Ereignis-ID: 9327
Ebene: Warnung
Get-OfflineAddressBook | Update-OfflineAddressBook

Wenn im Outlook die Postfachgröße nicht angezeigt wird muß mann die Grenzen erst setzen.
set-MailboxDatabase "TestDB" -ProhibitSendReceiveQuota 100GB -ProhibitSendQuota 95GB -IssueWarningQuota 90GB

OWA Standard-Sprache setzen: (1031) ist deutsch
Set-OwaVirtualDirectory -identity "Owa (Default Web Site)" -LogonAndErrorLanguage 1031
Set-OwaVirtualDirectory -identity "Owa (Default Web Site)" -DefaultClientLanguage 1031

Freetz mit OSCam

Aus

svn co http://svn.freetz.org/trunk freetz-7390-devel
cd freetz-7390-devel/
make menuconfig
make

http://ulc.zebradem.com/filemanager.php?action=downloadfile&filename=tbflex-0.6.patch.tar.gz&directory=7.%20Router/Fritz!%20Boxen/Addons/trunk%20Addons/toolboxflex&
tar xfvz tbflex.patch.tar.gz
chmod 755 tbflex.patch

Pushmail: nur bestimme Geräte zulassen

mit folgendem Befehl kann mann den aktuellen Status abfragen:

Get-ActiveSyncOrganizationSettings |fl

Quarantäne für Push setzen

Set-ActiveSyncOrganizationSettings -DefaultAccessLevel Quarantine -AdminMailRecipients postmaster@domain.de

Quarantäne für einzelne User ausschalten

Set-CASMailbox User -ActiveSyncAllowedDeviceIDs $null

Abfrage wer schon eine IMEI hat.

Get-CASMailbox | select name, ActiveSyncAllowedDeviceIDs |fl >> c:IMEI.log

LSI MegaRAID SAS 9260-4i überwachen

aktuellen SMIS Provider downloaden
wget http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/VMW-ESX-5.0.0-lsiprovider-500.04.V0.38-0006-offline_bundle-1154845.zip

entpacken
unzip VMW-ESX-5.0.0-lsiprovider-500.04.V0.38-0006-offline_bundle-1154845.zip

ins Verzeichnis wechseln
cd vib20/lsiprovider

installieren

Kontrolle
esxcli software vib list