[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[plamo:11229] Re: MTA (sendmail 8.11)



川俣です。
sendmail-8.11.6を使っています。

From: MOUE Kiyoshi<zebra7@seagreen.ocn.ne.jp>
Subject: [plamo:11194] Re: MTA (sendmail 8.11)
Date: Mon, 10 Sep 2001 14:59:09 +0900
Message-ID: <20010910145831T.zebra7@seagreen.ocn.ne.jp>

> (A) の環境では、起こらないのですが、(B) では、ISP からメール受信
> 時( fetchmail )に、内部で delay が 少ない時で 5秒、多い時は 稀に
> ですが、1 分以上あったりします。( 10 秒前後が一番多いです。)

  早間さんの記事 <20010910.150739.41634234.yossi@yedo.src.co.jp> にあ
る通り、最近のsendmailは、デフォルトの設定ではメールアドレスの検証のた
めに、送信元アドレスに対してもDNSのMXレコードが引けるかどうかの検証を
行っています。

  そのため、送信元のアドレスがDNSのMXレコードに存在しない、あるいはダ
イアルアップ接続のため、非接続時でDNS自体が検索出来ない場合は、メール
の受信ができない、あるいはDNSの検索がタイムアウトするまで待たされるよ
うです。

  私の場合は、sendmail.cfを作成するためのmcファイルは以下のように設定
することで解消しました。

構成:
  <Internet> ---dialup--- [Gateway] ---LAN--- [Internal Host | MUA]

======== Gatewayの sendmail.mc ==============
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
#	All rights reserved.
# Copyright (c) 1983 Eric P. Allman.  All rights reserved.
# Copyright (c) 1988, 1993
#	The Regents of the University of California.  All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
#
#  This is a generic configuration file for Linux.
#  It has support for local and SMTP mail only.  If you want to
#  customize it, copy it to a name appropriate for your environment
#  and do the modifications there.
#
divert(0)dnl
VERSIONID(`$Id$')dnl
OSTYPE(openbsd)dnl
dnl
dnl ==================
dnl Host configuration
dnl ==================
Dwnimbus2
Dmlocalnet
dnl
define(`confDOMAIN_NAME', `$w.$m')dnl
dnl
define(`DATABASE_MAP_TYPE', `hash')dnl
FEATURE(`nouucp', `reject')dnl
dnl
dnl ==============================
dnl I found a host with non-existent from: envelope
dnl ==============================
FEATURE(`accept_unresolvable_domains')dnl
dnl
FEATURE(`no_default_msa')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`always_add_domain')dnl
GENERICS_DOMAIN(`localnet')dnl
FEATURE(`generics_entire_domain')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`genericstable')dnl
define(`SMART_HOST', `esmtp:[mail.on.rim.or.jp]')dnl
FEATURE(`local_procmail')dnl
dnl
dnl ==============================
dnl To make a queue available soon
dnl ==============================
dnl define(`confDELIVERY_MODE', `q')
define(`confMIN_QUEUE_AGE', `0m')
dnl
dnl
LOCAL_NET_CONFIG
R$* < @ $* .$m. > $*	$#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
MAILER(local)dnl
MAILER(smtp)dnl
=============================================

注) このGatewayマシンはLinuxでなく、OpenBSDですが、設定自体は
    ほとんど同じに使えると思います。

      OSTYPE(openbsd)dnl
        ↓
      OSTYPE(linux)dnl

    あたりの変更、あと、

      FEATURE(`local_procmail')dnl

    は明示的に設定する必要はないかも知れません。

    あと、サイトに依存した設定、

      Dwnimbus2
      Dmlocalnet
      define(`SMART_HOST', `esmtp:[mail.on.rim.or.jp]')dnl

    なども修正する必要があると思います。


======== Internal Hostの sendmail.mc ========
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
#	All rights reserved.
# Copyright (c) 1983 Eric P. Allman.  All rights reserved.
# Copyright (c) 1988, 1993
#	The Regents of the University of California.  All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
#
#  This is a generic configuration file for Linux.
#  It has support for local and SMTP mail only.  If you want to
#  customize it, copy it to a name appropriate for your environment
#  and do the modifications there.
#
divert(0)dnl
VERSIONID(`$Id$')dnl
OSTYPE(linux)dnl
dnl
dnl ==================
dnl Host configuration
dnl ==================
Dwnimbus5
Dmlocalnet
dnl
define(`confDOMAIN_NAME', `$w.$m')dnl
dnl
define(`DATABASE_MAP_TYPE', `hash')dnl
FEATURE(`nouucp', `reject')dnl
dnl
dnl ==============================
dnl I found a host with non-existent from: envelope
dnl ==============================
FEATURE(`accept_unresolvable_domains')dnl
FEATURE(`accept_unqualified_senders')dnl
FEATURE(`nocanonify')dnl
dnl
FEATURE(`no_default_msa')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
GENERICS_DOMAIN(`localnet')dnl
FEATURE(`generics_entire_domain')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`genericstable')dnl
dnl
dnl ==============================
dnl To make a queue available soon
dnl ==============================
dnl define(`confDELIVERY_MODE', `q')
define(`confMIN_QUEUE_AGE', `0m')
dnl
dnl
define(`SMART_HOST', `esmtp:[nimbus2.localnet]')dnl
LOCAL_NET_CONFIG
R$* < @ $* .$m. > $*	$#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
MAILER(local)dnl
MAILER(smtp)dnl
=============================================

  問題になっている点を解消するには、
Gatewayの、

  FEATURE(`accept_unresolvable_domains')dnl

それと、内部ホストの

  FEATURE(`accept_unresolvable_domains')dnl
  FEATURE(`accept_unqualified_senders')dnl

というあたりの設定がミソです。

  詳しくは、sendmailのソースパッケージの cf/cf/README を参照して下さい。
また、これの和訳プロジェクトがあり、現在作業中です。

  http://www.isoternet.org/%7Ey-koga/cf/


  また、私のこの設定でも Gateway --> Internal Host 間へのfetchmail を
用いた転送でやはり若干の遅延が生じておりました。これについては、DNSの
検索以外にも、procmailの排他制御が原因かも知れません。

  procmailはロックファイルを用いてメールフォルダへの書き込みの排他制御
を行ってますので、popで一度に多くのメールを受信すると、競合が解消する
まで待たされるメールが出る可能性があります。

  ちなみにこの配送遅延の現象は、sendmailを8.11.6, fetchmailを5.9.0に
上げたあたりで発生しなくなりました。原因は不明です。

----
川俣 吉広

Follow-Ups
[plamo:11230] Re: MTA (sendmail 8.11), KAWAMATA, Yoshihiro
[plamo:11238] Re: MTA (sendmail 8.11), MOUE Kiyoshi
References
[plamo:11143] Re: ktermでの円マーク&チルダ, MOUE Kiyoshi
[plamo:11182] MTA, KATOH Yasufumi
[plamo:11194] Re: MTA (sendmail 8.11), MOUE Kiyoshi

[検索ページ] [メール一覧]
Plamo ML 公開システム