Postfix on FreeBSD
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
#contents
*Postfix on FreeBSD [#tcf5761f]
&lastmod;
* newaliases の db 出力先 & 参照先 2014/02/19 [#f6f67...
これまで、newaliases すると、/etc/mail/aliase.db が更新さ...
しかし、newaliases での出力先が、/etc/aliases.db になって...
これは、/usr/local/etc/postfix/main.cf に明示的に記述して...
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
に従うため、というのを知った、今日この頃(^^ゞ
** webmaster 宛にスパムを送ってくる奴がいる [#qcdd2725]
ので、
***送信元アドレスにより,拒否 [#p0b5dddc]
したい.
送信者アドレス(From行ではなく,SMTPセッションにおけるMAIL...
rootで以下のコマンドを実行します.
main.cfにsmtpd_sender_restrictionsを追加する.
# grep _sender main.cf
smtpd_sender_restrictions =
reject_unknown_sender_domain
reject_non_fqdn_sender hash:/etc/postfix/reject_sender
#
/etc/postfix/reject_senderに除外したいアドレスやドメイン...
# cat /etc/postfix/reject_sender
twostep21.biz REJECT
hoge.co.jp REJECT
spammer@hogehoge.co.jp REJECT
#
リストテーブルを更新する.
# /usr/local/postfix/postmap /etc/postfix/reject_sender
# ll /etc/postfix/reject_sender*
-rw-r--r-- 1 root wheel 50 Feb 22 15:29 /etc/postf...
-rw-r--r-- 1 root wheel 32768 Feb 22 15:30 /etc/postf...
#
** main.cf debugメールの設定 [#b9ba989e]
ちかごろやたらとエラーメールが増えたので・・・
#notify_classes = bounce,delay,policy,protocol,resource,...
notify_classes = 2bounce,resource,software
**postfix-2.8.7,1 [#m7ba4bdd]
Would you like to activate Postfix in /etc/mail/mailer.c...
# Fix compressed man pages
To enable postfix startup script please add postfix_enab...
your rc.conf
If you not need sendmail anymore, please add in your rc....
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
And you can disable some sendmail specific daily mainten...
/etc/periodic.conf file:
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
If /etc/periodic.conf does not exist please create it an...
If you are using SASL, you need to make sure that postfi...
the sasldb file. This is accomplished by adding postfix...
making the /usr/local/etc/sasldb* file(s) readable by gr...
be the default for new installs).
If you are upgrading from Postfix 2.6 or earlier, review...
familiarize yourself with new features and incompatabili...
===> Correct pkg-plist sequence to create group(s) and u...
===> Compressing manual pages for postfix-2.8.7,1
===> Registering installation for postfix-2.8.7,1
===> SECURITY REPORT:
This port has installed the following binaries whi...
increased privileges.
/usr/local/sbin/postdrop
/usr/local/sbin/postqueue
This port has installed the following files which ...
servers and may therefore pose a remote security r...
/usr/local/libexec/postfix/nqmgr
**Postfix 2.4.5.1 のインストール [#xe23f0bb]
# cd /usr/ports/mail/postfix
# make
#ref(Postfix-ports-options.png)
-lkrb -lcrypto -lcom_err -L/usr/local/lib/mysql -lmysqlc...
lm -L/usr/local/lib -L/usr/local/pgsql/lib -lpq -lcrypt ...
lldap -llber -L/usr/local/lib -lcdb
/usr/bin/ld: cannot find -lkrb
*** Error code 1
Stop in /usr/ports/mail/postfix/work/postfix-2.4.5/src/m...
*** Error code 1
Stop in /usr/ports/mail/postfix/work/postfix-2.4.5.
*** Error code 1
Stop in /usr/ports/mail/postfix.
*** Error code 1
Stop in /usr/ports/mail/postfix.
*** Error code 1
Stop in /usr/ports/mail/postfix.
# rm -R work
# make rmconfig
#ref(PostfixPortsOptions.png)
#make
#make install
Would you like to activate Postfix in /etc/mail/mailer.c...
To enable postfix startup script please add postfix_enab...
your rc.conf
If you not need sendmail anymore, please add in your rc....
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
And you can disable some sendmail specific daily mainten...
/etc/periodic.conf file:
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
If you are using SASL, you need to make sure that postfi...
the sasldb file. This is accomplished by adding postfix...
making the /usr/local/etc/sasldb* file(s) readable by gr...
be the default for new installs).
If you are upgrading from postfix version prior to 2.0, ...
files for recommended changes to your configuration.
===> Installing rc.d startup script(s)
ので、/etc/rc.conf に
postfix_enable="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
上記書き加え
/etc/defaults/で
# cp periodic.conf periodic.conf-dist-sendamil-on
して
#vi /etc/periodic.conf して、
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
を置いておく
postfix を導入すると sendmail は不要になりますので、FreeB...
/etc/make.conf
# added by KUJI 2007-09-10 13:21:52
NO_SENDMAIL= true
/etc/mail/aliases
postfix: root
オリジナルの sendmail のログローテーションを止めるため /e...
#/var/log/sendmail.st 640 10 * 168 B
**/usr/local/etc/postfix/main.cfの設定 [#k091c44c]
# cp main.cf main.cf-dist
して待避しておく
queue_directory = /var/spool/postfix
command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix
mail_owner = postfix
myhostname = tfc.thousand-winds.jp
mydomain = thousand-winds.jp
myorigin = $myhostname
#myorigin = $mydomain
#inet_interfaces = all
#mydestination = $myhostname, localhost.$mydomain, local...
#mydestination = $myhostname, localhost.$mydomain, local...
#mydestination = $myhostname, localhost.$mydomain, local...
# mail.$mydomain, www.$mydomain, ftp.$mydomain
mydestination = $myhostname, localhost.$mydomain
# REJECTING MAIL FOR UNKNOWN LOCAL USERS
unknown_local_recipient_reject_code = 550
mynetworks_style = host
mynetworks = 210.255.122.208/28, 127.0.0.0/8
alias_maps = hash:/etc/mail/aliases
alias_database = hash:/etc/mail/aliases
mail_spool_directory = /var/mail
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sl...
sendmail_path = /usr/local/sbin/sendmail
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
setgid_group = maildrop
html_directory = no
manpage_directory = /usr/local/man
sample_directory = /usr/local/etc/postfix
readme_directory = no
# ファイルの最後に追記するもの
# alias, forward, include の有効化
allow_mail_to_commands = alias,forward,include
# デバッグメールの有効化
notify_classes = bounce,delay,policy,protocol,resource,s...
**/usr/local/etc/postfix/master.cfの設定 [#v357229e]
*Pflogsummのインストール [#z93bde16]
# cd /usr/ports/mail/pflogsumm
# make install
----
http://sakura.take-labo.jp/freebsd/mail_postfix_simple.html
終了行:
#contents
*Postfix on FreeBSD [#tcf5761f]
&lastmod;
* newaliases の db 出力先 & 参照先 2014/02/19 [#f6f67...
これまで、newaliases すると、/etc/mail/aliase.db が更新さ...
しかし、newaliases での出力先が、/etc/aliases.db になって...
これは、/usr/local/etc/postfix/main.cf に明示的に記述して...
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
に従うため、というのを知った、今日この頃(^^ゞ
** webmaster 宛にスパムを送ってくる奴がいる [#qcdd2725]
ので、
***送信元アドレスにより,拒否 [#p0b5dddc]
したい.
送信者アドレス(From行ではなく,SMTPセッションにおけるMAIL...
rootで以下のコマンドを実行します.
main.cfにsmtpd_sender_restrictionsを追加する.
# grep _sender main.cf
smtpd_sender_restrictions =
reject_unknown_sender_domain
reject_non_fqdn_sender hash:/etc/postfix/reject_sender
#
/etc/postfix/reject_senderに除外したいアドレスやドメイン...
# cat /etc/postfix/reject_sender
twostep21.biz REJECT
hoge.co.jp REJECT
spammer@hogehoge.co.jp REJECT
#
リストテーブルを更新する.
# /usr/local/postfix/postmap /etc/postfix/reject_sender
# ll /etc/postfix/reject_sender*
-rw-r--r-- 1 root wheel 50 Feb 22 15:29 /etc/postf...
-rw-r--r-- 1 root wheel 32768 Feb 22 15:30 /etc/postf...
#
** main.cf debugメールの設定 [#b9ba989e]
ちかごろやたらとエラーメールが増えたので・・・
#notify_classes = bounce,delay,policy,protocol,resource,...
notify_classes = 2bounce,resource,software
**postfix-2.8.7,1 [#m7ba4bdd]
Would you like to activate Postfix in /etc/mail/mailer.c...
# Fix compressed man pages
To enable postfix startup script please add postfix_enab...
your rc.conf
If you not need sendmail anymore, please add in your rc....
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
And you can disable some sendmail specific daily mainten...
/etc/periodic.conf file:
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
If /etc/periodic.conf does not exist please create it an...
If you are using SASL, you need to make sure that postfi...
the sasldb file. This is accomplished by adding postfix...
making the /usr/local/etc/sasldb* file(s) readable by gr...
be the default for new installs).
If you are upgrading from Postfix 2.6 or earlier, review...
familiarize yourself with new features and incompatabili...
===> Correct pkg-plist sequence to create group(s) and u...
===> Compressing manual pages for postfix-2.8.7,1
===> Registering installation for postfix-2.8.7,1
===> SECURITY REPORT:
This port has installed the following binaries whi...
increased privileges.
/usr/local/sbin/postdrop
/usr/local/sbin/postqueue
This port has installed the following files which ...
servers and may therefore pose a remote security r...
/usr/local/libexec/postfix/nqmgr
**Postfix 2.4.5.1 のインストール [#xe23f0bb]
# cd /usr/ports/mail/postfix
# make
#ref(Postfix-ports-options.png)
-lkrb -lcrypto -lcom_err -L/usr/local/lib/mysql -lmysqlc...
lm -L/usr/local/lib -L/usr/local/pgsql/lib -lpq -lcrypt ...
lldap -llber -L/usr/local/lib -lcdb
/usr/bin/ld: cannot find -lkrb
*** Error code 1
Stop in /usr/ports/mail/postfix/work/postfix-2.4.5/src/m...
*** Error code 1
Stop in /usr/ports/mail/postfix/work/postfix-2.4.5.
*** Error code 1
Stop in /usr/ports/mail/postfix.
*** Error code 1
Stop in /usr/ports/mail/postfix.
*** Error code 1
Stop in /usr/ports/mail/postfix.
# rm -R work
# make rmconfig
#ref(PostfixPortsOptions.png)
#make
#make install
Would you like to activate Postfix in /etc/mail/mailer.c...
To enable postfix startup script please add postfix_enab...
your rc.conf
If you not need sendmail anymore, please add in your rc....
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
And you can disable some sendmail specific daily mainten...
/etc/periodic.conf file:
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
If you are using SASL, you need to make sure that postfi...
the sasldb file. This is accomplished by adding postfix...
making the /usr/local/etc/sasldb* file(s) readable by gr...
be the default for new installs).
If you are upgrading from postfix version prior to 2.0, ...
files for recommended changes to your configuration.
===> Installing rc.d startup script(s)
ので、/etc/rc.conf に
postfix_enable="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
上記書き加え
/etc/defaults/で
# cp periodic.conf periodic.conf-dist-sendamil-on
して
#vi /etc/periodic.conf して、
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
を置いておく
postfix を導入すると sendmail は不要になりますので、FreeB...
/etc/make.conf
# added by KUJI 2007-09-10 13:21:52
NO_SENDMAIL= true
/etc/mail/aliases
postfix: root
オリジナルの sendmail のログローテーションを止めるため /e...
#/var/log/sendmail.st 640 10 * 168 B
**/usr/local/etc/postfix/main.cfの設定 [#k091c44c]
# cp main.cf main.cf-dist
して待避しておく
queue_directory = /var/spool/postfix
command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix
mail_owner = postfix
myhostname = tfc.thousand-winds.jp
mydomain = thousand-winds.jp
myorigin = $myhostname
#myorigin = $mydomain
#inet_interfaces = all
#mydestination = $myhostname, localhost.$mydomain, local...
#mydestination = $myhostname, localhost.$mydomain, local...
#mydestination = $myhostname, localhost.$mydomain, local...
# mail.$mydomain, www.$mydomain, ftp.$mydomain
mydestination = $myhostname, localhost.$mydomain
# REJECTING MAIL FOR UNKNOWN LOCAL USERS
unknown_local_recipient_reject_code = 550
mynetworks_style = host
mynetworks = 210.255.122.208/28, 127.0.0.0/8
alias_maps = hash:/etc/mail/aliases
alias_database = hash:/etc/mail/aliases
mail_spool_directory = /var/mail
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sl...
sendmail_path = /usr/local/sbin/sendmail
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
setgid_group = maildrop
html_directory = no
manpage_directory = /usr/local/man
sample_directory = /usr/local/etc/postfix
readme_directory = no
# ファイルの最後に追記するもの
# alias, forward, include の有効化
allow_mail_to_commands = alias,forward,include
# デバッグメールの有効化
notify_classes = bounce,delay,policy,protocol,resource,s...
**/usr/local/etc/postfix/master.cfの設定 [#v357229e]
*Pflogsummのインストール [#z93bde16]
# cd /usr/ports/mail/pflogsumm
# make install
----
http://sakura.take-labo.jp/freebsd/mail_postfix_simple.html
ページ名: