●PDFlib
PHP拡張モジュールをコピーし、php.iniに拡張モジュールエントリを追加します。
bind/php/php-43x/libpdf_php.so
# cp bind/php/php-43x/libpdf_php.so /usr/local/lib/php/20070927/
extension_dir = /usr/local/lib/php/20070927/
extension = libpdf_php.so
« 2007年08月 | メイン | 2007年10月 »
PHP拡張モジュールをコピーし、php.iniに拡張モジュールエントリを追加します。
bind/php/php-43x/libpdf_php.so
# cp bind/php/php-43x/libpdf_php.so /usr/local/lib/php/20070927/
extension_dir = /usr/local/lib/php/20070927/
extension = libpdf_php.so
Redirect permanent /~user/ http://www.xxxxx.jp/user/
ErrorDocument 404 /~user/oshirase.html
function check_spammer(){
$re_flg = 0;
$ip = getenv("REMOTE_ADDR");
if($ip == "127.0.0.1")
$ip = "$HTTP_X_FORWARDED_FOR";
if(preg_match("/^([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})$/", $ip, $matches)){
$q1 = $matches[1];
$q2 = $matches[2];
$q3 = $matches[3];
$q4 = $matches[4];
$ip = "$q4.$q3.$q2.$q1";
}else{
}
// check list.dsbl.org, all.rbl.jp
$i = 0;
$check_list = array(".list.dsbl.org", ".all.rbl.jp");
while($i < count($check_list)){
$check = $ip . $check_list[$i];
$i ++;
$result = gethostbyname($check);
if ($result != $check) {
$re_flg = 1;
break;
} else {
}
}
return $re_flg;
}
?>
qmailadminシステム導入
autorespond
wget http://www.inter7.com/devel/autorespond-2.0.5.tar.gz
tar zxvf autorespond-2.0.5.tar.gz
cd autorespond-2.0.5
vi autorespond.c
static char *binqqargs[2] = { "bin/qmail-queue", 0 };
↓
static char *binqqargs[2] = { "bin/qmail-queue.iso-2022-jp", 0 }; ← 変更
fprintf(fdm,"Date: %u %s %u %02u:%02u:%02u -0000\nMessage-ID: <%lu.%u.blah>\n"
,dt->tm_mday,montab[dt->tm_mon],dt->tm_year+1900,dt->tm_hour,dt->tm_min,dt->tm_sec,msgwhen,getpid() );
fprintf(fdm,"Content-Type: text/plain; charset=\"ISO-2022-JP\"\n" ); ← 追加
mfp = fopen( msg, "rb" );
make && make install
autorespond返信メール日本語化スクリプト
vi /var/qmail/bin/qmail-queue.iso-2022-jp
#!/bin/bash
NKF="/usr/bin/nkf"
PERL="/usr/bin/perl"
QMAILQUEUE="/var/qmail/bin/qmail-queue"
${PERL} -pe 's/\n/\\n/g' |\
${PERL} -pe 's/From:.*?\\n\\n//' |\
${PERL} -pe 's/-------- Original Message --------.*$//' |\
${PERL} -pe 's/\\n/\n/g' |\
${NKF} -j |\
${QMAILQUEUE}
chmod 711 /var/qmail/bin/qmail-queue.iso-2022-jp
chown vpopmail. /var/qmail/bin/qmail-queue.iso-2022-jp
ezmlmインストール
wget http://cr.yp.to/software/ezmlm-0.53.tar.gz
wget http://cr.yp.to/software/ezmlm-idx-0.443.tar.gz
tar zxvf ezmlm-0.53.tar.gz
tar zxvf ezmlm-idx-0.443.tar.gz
cp -r ezmlm-idx-0.443/* ezmlm-0.53
cd ezmlm-0.53
patch < idx.patch
make clean && make
make ja
make setup
ezmlm設定ファイル編集
vi /usr/local/bin/ezmlm/ezmlmrc
最終行へ追加(メールの文字化け対処)
iso-2022-jp
qmailadminインストール
wget http://jaist.dl.sourceforge.net/sourceforge/qmailadmin/qmailadmin-1.2.9.tar.gz
tar zxvf qmailadmin-1.2.9.tar.gz
cd qmailadmin-1.2.9
qmailadmin、vpopmailのバージョン非表示化
vi template.c
/* show version number */
case 'V':
printf("%s %s
",
QA_PACKAGE, QA_VERSION);
printf("%s %s
",
PACKAGE, VERSION);
break;
↓変更
/* show version number */
case 'V':
printf("%s
",
QA_PACKAGE);
printf("%s
",
PACKAGE);
break;
./configure --enable-htmldir=/var/www/qmailadmin \
--enable-imagedir=/var/www/qmailadmin/images \
--enable-imageurl=/qmailadmin/images \
--enable-ezmlm-mysql=n \
--enable-help
make && make install-strip
wget http://jaist.dl.sourceforge.net/sourceforge/qmailadmin/qmailadmin-help-1.0.8.tar.gz
tar zxvf qmailadmin-help-1.0.8.tar.gz
mkdir /var/www/qmailadmin/images/help
cp -rp qmailadmin-help-1.0.8/* /var/www/qmailadmin/images/help
tar -xzvf php-4.4.7.tar.gz
tar -xzvf SQLite-1.0.3.tgz
mv SQLite-1.0.3 php-4.4.7/ext/sqlite
cd php-4.4.7
rm configure
./buildconf --force
./configure --with-sqlite
make
make install