As I Please

MTのいんすとーるの練習と、その他びぼうろく・・・

タグ「milter-manager」が付けられているもの


メールがspamassasin (sa-spamd) を通っていない。

spamassasinは怪しいメールには、メール本文の冒頭に警告メッセージをつけてくれるので、スマートフォンなどのメール通知で怪しいメールが来たかどうかをすぐに見分けることができる。本当はすぐに隔離して mailboxに入らないようにすればいいんでしょうが。。。
ところが最近、別のサーバ(MX secondary)に届くメールにそれが入らなくなってしまった。どうも milterでsa-spamd を通らなくなってしまったようだ。
milter-manager ? spamd ? socketのowner,permission ? 何が悪いのかよくわからないまま、perlのライブラリ、ruby、openssl,gpgなどいろいろアップデートしてみたが、なかなか解決と行かなかった。


/var/log/spamd.log をつぶさに追っかけて、spamdがちゃんと起動していないのが原因のよう。
どうも sendmail をバージョンアップしたときからおかしくなってしまったよう。

error: Can't locate Net/SSLeay.pm in @INC
spamd: error: Bad arg length for Socket::unpack_sockaddr_in, length is 28, should be 16
あたりが問題だったようで、以下の記事を参照に、Socket6 を再インストールしたら解決した。
https://freebsd.sing.ne.jp/daily/09/09/05.html

spf導入メモ(4) milter-manager

最後に、milterを束ねてくれる milter-manager のインストール。FreeBSDだと gmake でインストールしないとうまく入らないかも。 enma については milter-manager の detector.rb が見つけてくれないので、/usr/local/etc/milter-manager/milter-manager.local.confを作成する。
define_milter("milter-enma") do |milter|
  milter.connection_spec = "inet:10025@127.0.0.1"
  milter.description = "yenma milter"
  milter.enabled = true
  milter.fallback_status = "accept"
  milter.evaluation_mode = false
  milter.applicable_conditions = ["Remote Network", "Unauthenticated"]
  #milter.command = "/usr/local/etc/rc.d/milter-enma"
  milter.command = "/usr/local/etc/rc.d/yenma"
  milter.command_options = "start"
  milter.user_name = nil
  milter.connection_timeout = 300.0
  milter.writing_timeout = 10.0
  milter.reading_timeout = 10.0
  milter.end_of_message_timeout = 300.0
end
milter.applicable_conditions に "Unauthenticated" をつけているので、smtp-auth, SSL/TLS認証で投げ込んでこない、spammer MTA clientについては spfチェックを行う。 認証して投げ込んでくるクライアントは spf通らないのでありがたい。

spf導入メモ(4) milter-manager

最後に、milterを束ねてくれる milter-manager のインストール。FreeBSDだと gmake でインストールしないとうまく入らないかも。 enma については milter-manager の detector.rb が見つけてくれないので、/usr/local/etc/milter-manager/milter-manager.local.confを作成する。
define_milter("milter-enma") do |milter|
  milter.connection_spec = "inet:10025@127.0.0.1"
  milter.description = "yenma milter"
  milter.enabled = true
  milter.fallback_status = "accept"
  milter.evaluation_mode = false
  milter.applicable_conditions = ["Remote Network", "Unauthenticated"]
  #milter.command = "/usr/local/etc/rc.d/milter-enma"
  milter.command = "/usr/local/etc/rc.d/yenma"
  milter.command_options = "start"
  milter.user_name = nil
  milter.connection_timeout = 300.0
  milter.writing_timeout = 10.0
  milter.reading_timeout = 10.0
  milter.end_of_message_timeout = 300.0
end
milter.applicable_conditions に "Unauthenticated" をつけているので、smtp-auth, SSL/TLS認証で投げ込んでこない、spammer MTA clientについては spfチェックを行う。 認証して投げ込んでくるクライアントは spf通らないのでありがたい。