Postfix + AntiVir on FedoraCore3

Last updated @ 01/May/2006

めにゅ~


Postfix2.1.5の設定

FC3には,Postfix2.1.5が含まれているので,インストール作業は不要です.
FC3上で,「Mail Transport Agent Switcher」を使って,『postfix』を選択しておきます.


ソースファイルの取得(参考)

コンパイル(参考)


/etc/postfix/main.cfの設定

以下に設定例を示します(SASL認証を使う場合の例です).
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix

myhostname = mail.kmisu.net	#メールサーバのドメイン名を含めたホスト名
mydomain = kmisu.net	# メールサーバのドメイン名
myorigin = $mydomain

inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, $mydomain, thisserver.$mydomain	# 受信するドメイン名
unknown_local_recipient_reject_code = 450
mynetworks_style = subnet
mynetworks = 192.168.0.0/24, 127.0.0.0/8	# ルータの内側にいるので,プライベートアドレスで指定
relay_domains = $mydestination

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
manpage_directory = /usr/local/man
sample_directory = /etc/postfix
readme_directory = no
allow_mail_to_commands = alias,forward,include	# fmlのための設定

## SASL認証のための設定
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes

## Reject_Listのための設定
smtpd_client_restrictions=permit_mynetworks,check_client_access hash:/etc/postfix/reject_list,reject_unauth_destination

content_filter = smtp:127.0.0.1:10024	# 後述のAntiVir用の設定
html_directory = no


Reject_Listの設定

/etc/postfix/reject_listに内容を記載し,
# /usr/sbin/postmap /etc/postfix/reject_list
# service postfix reload
とコマンド入力します.

/etc/postfix/master.cfの設定

以下に設定例を示します(AntiVirを使う場合以外は変更の必要ありません).
smtp      inet  n       -       n       -       -       smtpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp

localhost:smtp-backdoor inet n - n - - smtpd -o content_filter=		# AntiVir用

maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
old-cyrus unix  -       n       n       -       -       pipe
  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
cyrus     unix  -       n       n       -       -       pipe
  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify

SASL認証用パスワードの設定


AntiVirのインストール

ファイルの取得

AntiVir MailGateのインストール

メールサーバの構築に当たり,
http://www.aconus.com/‾oyaji/
を参考にさせて頂きました.
この場を借りてお礼申し上げます.

注 意

このサイト上で提供しているインストール法,設定例を,
適用した結果生じたいかなる障害・損害に対しても,
私(K.Misu)は責任を負いません.
このサイト上で提供している情報を利用する場合は,
各人の自己責任にて判断,適用して下さい.


[ Top of This Page | Index-Page (FC3) | Index-Page (SW settings) ]


by K.Misu <webmaster <at> DeleteThiskmisu.net>
(DeleteThisを除いたアドレスに送信して下さい)