サーバー設定 · 1 min read · Oct 09, 2025
Ubuntu-Server 6.06 LTSをファイアウォール/ゲートウェイとして設定する - ページ 7
sasl認証を設定します。
mkdir -p /var/spool/postfix/var/run/saslauthd次に、/etc/default/saslauthdを編集します。以下のようになります。
# この行は、saslauthdが自動的に実行される前にコメントを外す必要があります
START=yes
PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"
# 使用したい認証メカニズムを指定する必要があります。
# これはPAMサポートのためにデフォルトで"pam"ですが、
# "shadow"や"sasldb"も含めることができます。
# MECHANISMS="pam shadow"
MECHANISMS="pam"次に、/etc/init.d/saslauthdを編集し、saslauthdのPIDファイルの場所を変更します。PIDFILEの値を/var/spool/postfix/var/run/${NAME}/saslauthd.pidに変更し、以下のようにします。
PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"次に、実際のユーザーでシステムを構成します。ユーザーのシェルを/bin/falseに設定して、セキュリティホールを避けます。
次に、/etc/postfix/virtualをお好みで埋めます。私はこれにWebminが好きです。もちろん、直接編集することもできます。しかし、webminは素晴らしい仕事をします。
注意!: “some.domain”などは、/etc/postfix/main.cfの”mydestination”行に記載されているものと等しくすることはできません。
私の/etc/postfix/virtualは以下の構造になっています。
some.domain virtual domain
some.other.domain virtual domain
some.really.other.domain virtual domain
[email protected] user
[email protected] otheruser
[email protected] user
[email protected] otheruser
[email protected] user
[email protected] someoneidontlike
[email protected] someoneidontlike [email protected]
[email protected] differentuser [email protected] someoneidontlike
@some.really.other.domain someonidontlike [email protected]などなど。したがって、/etc/aliasesでrootとpostmasterのエイリアスを設定するだけで済みます。他のすべてのエイリアスはこのファイルに含めるべきです。複数のアドレスへのメールの転送や配信なども、このファイルで設定できます(そして、私はそうすべきだと思います)。
このような設定では、ユーザーは好きなだけエイリアスを持つことができます(あなたがそれにうんざりするまで)が、各ユーザーについては、ホームディレクトリを持つ実際のユーザーを追加する必要があります。
完了したら、忘れずに
postmap /etc/postfix/virtualを実行してください。
次に、spamassassinがより良い仕事をするためのルールを設定します。
まず、/etc/MailScanner/spam.assassin.prefs.confを編集します。
dcc_path /usr/bin/dccprocのコメントを外します。また、razor_timeout 10とscore RCVD_IN_RSL 0のコメントも外します。
次に、以下を実行します。
cd ..wget http://www.fsl.com/support/Rules_Du_Jour.tar.gztar -zxvf Rules_Du_Jour.tar.gzcd rules_du_jourmkdir /etc/rulesdujourcp config /etc/rulesdujour/configcp rules_du_jour /usr/bincp rules_du_jour_wrapper /etc/cron.daily/etc/cron.daily/rules_du_jour_wrapper次に、DHCPサーバーを設定します。
/etc/dhcp3/dhcpd.confを編集します。私のは今、以下のようになっています。
# ローカルネットワーク
subnet 192.168.1.0 netmask 255.255.255.0 {
option netbios-name-servers 192.168.1.1;
option domain-name-servers 192.168.1.1;
option domain-name "your.domain.here";
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
range 192.168.1.100 192.168.1.130;
}/etc/default/dhcp3-serverを編集します。以下のようにします。
INTERFACES=eth1次に、以下を実行します。
/etc/init.d/dhcp3-server start次に、ソースからdccをインストールします。
cd /rootwget http://www.dcc-servers.net/dcc/source/dcc.tar.Zgunzip dcc.tar.Ztar -xvf dcc.tarcd dcc*./configuremakemake installshutdown -r nowそして、再起動するまで待ちます。
新しい投稿を受信箱で受け取る
スパムはありません。いつでも購読を解除できます。