Mailscanner maillog SQL auto cleanup script 
#!/usr/local/bin/php
<?php
$host = "localhost";
$user = "mailwatch";
$pass = "";
$db = "mailscanner";
$linkptr = mysql_pconnect ($host,$user,$pass);
mysql_select_db($db,$linkptr);


$DATENOW="-3 MONTH";

$QUERY_DELETE="DELETE FROM maillog WHERE timestamp <= DATE_ADD(DATE_FORMAT(NOW(),'%Y-%m-%d'),INTERVAL $DATENOW);";
$QUERY_REPAIR="REPAIR TABLE maillog ";

mysql_query($QUERY_DELETE,$linkptr);
mysql_query($QUERY_REPAIR,$linkptr);

?>


[ 發表回應 ] ( 18預覽 )   |  常註連結  |   ( 3 / 1974 )
Solaris ps berkley version, 'ps ax' 
Solaris does support the x option, you're just not using the right ps to get it to work, you need the berkley version;

use /usr/ucb/ps and you'll be able to use the x option.

[ 發表回應 ] ( 39預覽 )   |  常註連結  |   ( 3 / 1918 )
Solaris 10 SendMail service modify SMF for MailScanner 
# svcadm disable smtp:sendmail
# cd /lib/svc/method
# cp smtp-sendmail smtp-sendmail.orig
# {Editor} smtp-sendmail <- use your Editor Program.


----------------
Find
----------------
$SENDMAIL $MODE -q$QUEUEOPTION$QUEUEINTERVAL $OPTIONS &
----------------
Modify
----------------
OPTIONS="-OPrivacyOptions=noetrn -ODeliveryMode=queueonly -OQueueDirectory=/var/spool/mqueue.in"
$SENDMAIL $MODE -q$QUEUEOPTION$QUEUEINTERVAL $OPTIONS &
----------------
Save
----------------


# svcadm enable smtp:sendmail


[ 發表回應 ] ( 60預覽 )   |  常註連結  |   ( 2.9 / 2090 )
SpeedyCGI Install on Solaris 10 
http://www.daemoninc.com/SpeedyCGI/

Downaload SpeedyCGI 2.22 Source Code

tar -zxvf CGI-SpeedyCGI-2.22.tar.gz
cd CGI-SpeedyCGI-2.22
/usr/perl5/5.8.4/bin/perlgcc Makefile.PL (Answer No)
make (Forget any error message)
make test
make install

cd /usr/bin
ln -s /usr/perl5/5.8.4/bin/speedy
cp /usr/bin/speedy /usr/bin/speedy_suid
chmod 4555 /usr/perl5/5.8.4/bin/speedy


[ 發表回應 ] ( 22預覽 )   |  常註連結  |   ( 3 / 2179 )
檢驗 saslauthd 
檢驗 saslauthd 這支程式是否可行!

# 在 cyrus-sasl 的原始碼裡面提供了一支小程式用來判斷 saslauthd 的認證機制
# 是否成功的啟動了,這個小程式就是 testsaslauthd 囉!在剛剛原始碼目錄下,
# 所以你可以這樣做:
[root@test sasl2]# /usr/local/cyrus-sasl2/sbin/saslauthd -a shadow
# 執行之後, saslauthd 的 PID 會被紀錄到 /var/run/mux.pid 這個檔案!
[root@test sasl2]# cd /usr/local/src/cyrus-sasl-2.1.12/saslauthd/
[root@test saslauthd]# make testsaslauthd
[root@test saslauthd]# ./testsaslauthd -u userID -p 'yours.passwd'
0: OK "Success."

# 若顯示 OK 的話!那麼就是成功啦!

[ 發表回應 ] ( 50預覽 )   |  常註連結  |   ( 2.9 / 2019 )

<< <前一頁 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 下一頁> >>