harumaki.net

インフラ屋の覚書や、ラーメン食べある記とか。

infra MAIL postfix

postfinger

投稿日:2006年7月5日

Last Updated on 2014年8月8日 by かんりにん

postfinger

Simon Mudd氏作のpostfix用ユーティリティスクリプト。

#postfixのsrc.rpmを探していてたまたま見つけた…
postfixのインストール環境とコンフィグが表示される便利コマンド。

【ダウンロード元】
http://ftp.wl0.org/postfinger/

ダウンロード

シェルスクリプトがテキスト状態でサイトにおかれているので
ダウンロードして、実行権限をつければ即利用可。
最新版のpostfinger-1.30を/usr/local/bin/に落としてくる。
リネームは任意で。シンボリックリンクでもいいと思う。

# cd /usr/local/bin/
# wget http://ftp.wl0.org/postfinger/postfinger-1.30
# mv postfinger-1.30 postfinger
# chmod 755 postfinger 

実行例

postfixのバージョンのほか、main.cfの設定パラメータ(デフォルトから変更したもの)や
master.cfの内容を表示できる。
オプションで見たい情報だけ指定することも可能。

# postfinger 
postfinger - postfix configuration on Wed Jul  5 17:03:16 JST 2006
version: 1.30

Warning: postfinger output may show private configuration information,
such as ip addresses and/or domain names which you do not want to show
to the public.  If this is the case it is your responsibility to modify
the output to hide this private information.  [Remove this warning with
the --nowarn option.]

--System Parameters--
mail_version = 2.1.5
hostname = test2
uname = Linux test2 2.6.9-34.EL #1 Wed Mar 8 00:07:35 CST 2006 i686 i686 i386 GNU/Linux

--Packaging information--
looks like this postfix comes from RPM package: postfix-2.1.5-4.2.RHEL4 

--main.cf non-default parameters--
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
home_mailbox = Maildir/
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = local.hde.co.jp
myhostname = vm13
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.1.5/README_FILES
sample_directory = /usr/share/doc/postfix-2.1.5/samples
sendmail_path = /usr/sbin/sendmail.postfix
transport_maps = hash:/etc/postfix/transport

--master.cf--
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
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
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
anvil     unix  -       -       n       -       1       anvil
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=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
cyrus     unix  -       n       n       -       -       pipe
  user=cyrus argv=/usr/lib/cyrus-imapd/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 

-- end of postfinger output --
# 

manのアーカイブは無いが、postfinger –helpでオプションを確認できる。

# postfinger --help
postfinger version: 1.30: a Postfix configuration extraction utility
Usage: postfinger [options]

Options can be any of:
    --all               Show all configuration information
    --system            Show basic system environment (os/kernel/...)   [default]
    --package           Show packaging information [default]
    --locking           Show mailbox locking methods
    --tables            Show supported lookup tables
    --main              Show main.cf non-default configuration values  [default]
    --defaultsinmain    Show main.cf defined values which are identical to  defaults
    --master            Show master.cf configuration [default]
    --permissions       Show some of the spool_directory permissions
    --libraries         Show the Postfix libraries dependencies 

    --nosystem          Do not show basic system environment (os/kernel/...)
    --nomain            Do not show main.cf non-default configuration values
    --nomaster          Do not show master.cf configuration
    --nowarn            Do not warn about private information being leaked to
                        outsiders
    --version           print the version of postfinger being used and exit

Mail bug reports and suggestions to <postfinger@WL0.org>.
#

-infra, MAIL, postfix

執筆者:


comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA


関連記事

no image

サーバ運用でよく使うスクリプト(netstat)

最近ご無沙汰なのでシェルの書式を忘れてきた…ということで自分用に備忘録。 – netstatでステータスが”ESTABLISHED”のセッションを一覧表示し、1秒更 …

no image

iperf

iperf † 帯域を測定する、ネットワーク性能測定ツール。 こまかい使い方についてはこれから要検証。 [本家サイト] NLANR http://dast.nlanr.net/proje …

SNMPのTX/RXカウンタについて(YAMAHA RTX1200)

  会社のGWルーターに使用しているRTX1200のインターフェースのTX/RXカウントを LinuxサーバーからSNMPを使って累積でログに書き出していたところ、 32ビット長分に達するとリセットさ …

[redash] メール通知設定の追加(redashAMI限定)

redashへ、パスワードリセット時のリマインダメール通知を有効にするため、メール周りの設定を追加。 (googleアカウントと連携していない環境でのメモです) 参考: Redash: Mail Co …

no image

postfix設定変更(inet_protocols)

参考:お世話になっております。 Postfix IPv6サポート http://www.postfix-jp.info/trans-2.2/jhtml/IPV6_README.html EC2のCen …