SONOWAKE日記でタグ「main.cf」が付けられているもの

一昨日から続いているサーバー復旧作業にて、

メールサーバーの設定(postfix + dovecot)で不思議な現象が。。。

メールの送信が出来て受信が出来ない?????

受信が出来て送信が出来ないと言う現象なら聞いたことがあるのですが、、

当然googleやyahooで検索してもそれらしい内容はヒットせず。。。。。

ちなみに本当にメールサーバーが動いていないのかと

[root@hogehoge ~]# service postfix status
master (pid 13547) を実行中...
[root@hogehoge ~]#

動いている様子。。。。。

これが動かないとSS社の皆さんがメールできず、不便なことに・・・・・

で、調べて見ました。

ログファイルです。

接続してから1日ですが、メールのログだけでも

202004行 です!!!!!!!

まぁ~エラー当たり前って言えば当たり前なのですが。。

でその中でちょっと怪しいログを発見しました!

Apr 22 04:51:02 hogehoge postfix/qmgr[2998]: 3A05C2E40037: from=, size=22208, nrcpt=1 (queue active)
Apr 22 04:51:02 hogehoge postfix/local[5010]: fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit
Apr 22 04:51:03 hogehoge postfix/master[2982]: warning: process /usr/libexec/postfix/local pid 5010 exit status 1
Apr 22 04:51:03 hogehoge postfix/master[2982]: warning: /usr/libexec/postfix/local: bad command startup -- throttling
Apr 22 04:52:03 hogehoge postfix/local[5038]: fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit
Apr 22 04:52:04 hogehoge postfix/master[2982]: warning: process /usr/libexec/postfix/local pid 5038 exit status 1
Apr 22 04:52:04 hogehoge postfix/master[2982]: warning: /usr/libexec/postfix/local: bad command startup -- throttling
Apr 22 04:53:04 hogehoge postfix/local[5861]: fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit

赤い字の部分です。

基本英語なので、英語の苦手なsonowakeにはかなり自信が無いのですが、、、

excite翻訳にて直訳すると

[mailbox_size_limit is smaller than message_size_limit]

[メールボックス_サイズ_限界はメッセージ_サイズ_限界より小さいです。]

と書いてあるらしい。。。。。

 

ので

早速設定を確認!!!

[root@hogehoge ~]# postconf | grep size_limit
body_checks_size_limit = 51200
bounce_size_limit = 50000
header_size_limit = 102400
mailbox_size_limit = 50300000
message_size_limit = 104857600
[root@hogehoge ~]#

ありました。

一番下に問題の2行が出現!

って、これのどこが問題なのだ?

メールを入れる箱が小さくても、別にエラーになるのではなく、箱より小さいメールは入るのでは?

ま~一応、設定ファイルを編集。

# sample_directory: The location of the Postfix sample configuration files.
# This parameter is obsolete as of Postfix 2.1.
#
sample_directory = /usr/share/doc/postfix-2.4.5/samples

# readme_directory: The location of the Postfix README files.
#
readme_directory = /usr/share/doc/postfix-2.4.5/README_FILES


smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_unauth_destination

mailbox_size_limit = 512000000 ←(追加)
message_size_limit = 102400000

 初期編集時に追加していなかった

( mailbox_size_limit =  )を追加

 postfixを再起動

[root@hogehoge ~]# service postfix restart
postfix を停止中: [ OK ]
postfix を起動中: [ OK ]
[root@hogehoge ~]#

 

クライアントのパソコンからメールを送受信!

 

大正解!

原因解明です!

 

かなりの格闘の末、解決しました。

[ mailbox_size_limit = ] は
[ message_size_limit = ] より大きい値に設定しないとエラーとして扱われます。

エラーといっても、postfix 自体がエラーになるのではなく、メールが受信できなくなる現象が発生します。

 

ちなみに、このサイズ指定の数値ですが

1MB(メガバイト) = 1024KB(ケイバイト)

1KB(ケイバイト) = 1000バイト

となり、

10MB(メガバイト)だとすると

10 x 1000 x 1024 = 10240000

と言う数字になります。

300MB(メガバイト)だとすると

300 x 1000 x 1024 = 307200000

 と言う数字になります。

ちなみに添付ファイル(画像)などは

たとえば 3MB の大きさだとすると 33% 容量が大きくなり ?

3 x 1000 x 1024 x 1.33 = 4085760

となるらしいです。(RFC [http://www.rfc-editor.org/] )

 

ちょっとメール送信で困ったときはプロバイダーなどのメール送信制限量より少し小さめのファイルを送信してみて試してみる解決する糸口での見つかるのではないかと思いました。

 

 

2026年4月

      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    

タグ

ウェブページ

  • images