ニペソツ山


Date/Time: 2014:09:26 08:30:21
Camera: PENTAX
Model: PENTAX K-5 II s
Exporsure Time: 1/500
FNumber: 5.6
Aperture Value: 5.0
Focal Length: 21.0

Close

y2blog » CentOS のアップデートでDovecotに不具合発生

5

12

2020

CentOS のアップデートでDovecotに不具合発生

Dovecot のバージョンアップでエラー発生


2〜3日前、CentOS 7 をアップデート [ “CentOS-7 (2003)” April 27, 2020 ] したらアップデートに含まれていたDovecotのバージョンもアップデートされてしまったようで、Dovecot で構築した IMAP サーバからメールが取り込めなくなっていた.


この2〜3日メールが届かないのでおかしいなと思い、外部からテストメールを送ってみたが使っているメーラーソフト上ではメールは見つからない.メーラは特にエラーメッセージも吐いていなかったので、不審に思ってメールサーバ側のログを確認して初めてDovecot側のエラーであることが判った.


Dovecotのログでは、


May 12 12:05:46 imap(xxxxxxxx): Info: namespace configuration error: inbox=yes namespace missing in=0 out=366
May 12 12:05:46 imap-login: Info: Login: user=, method=PLAIN, rip=xxx.yyy.zzz.214, lip=aaa.bbb.ccc.183, mpid=1429, TLS, session=<68puvWqljM7bdd3W>
May 12 12:05:46 imap(xxxxxxxx): Error: namespace configuration error: inbox=yes namespace missing
May 12 12:05:46 imap(xxxxxxxx): Info: namespace configuration error: inbox=yes namespace missing in=0 out=366
May 12 12:05:47 imap-login: Info: Login: user=, method=PLAIN, rip=xxx.yyy.zzz.214, lip=aaa.bbb.ccc.183, mpid=1431, TLS, session=
...

どうやら “inbox” ネームスペース が無いというエラーのようだ.Dovecot Wikiを確認すると、V2.0 → V2.1 へのアップデートで、”15-mailboxes.conf” というコンフィグファイルが追加されており、この中で”inbox” というネームスペースが定義されている必要があると共に、”inbox=yes” という記載が必要とのことだ.


この “15-mailboxes.conf” という新しい定義ファイルは、RFC6154 “IMAP LIST Extension for Special-Use Mailboxes” に基づいた拡張を利用するためのもので、この機能を使わないのであれば Dovecot 2.1 以上では、単にこの “15-mailboxes.conf” そのものを削除して構わないとのことなので、”15-mailboxes.conf”を削除してしまうのが一番簡単な解決方法だろう.


因みに、”/etc/dovecot/conf.d/15-mailboxes.conf” の設定を弄る場合は、 “inbox=yes” を ” namespace inbox { } ” の中に追記すれば良いだろう.



##
## Mailbox definitions
##

# Each mailbox is specified in a separate mailbox section. The section name
# specifies the mailbox name. If it has spaces, you can put the name
# "in quotes". These sections can contain the following mailbox settings:
#
# auto:
#   Indicates whether the mailbox with this name is automatically created
#   implicitly when it is first accessed. The user can also be automatically
#   subscribed to the mailbox after creation. The following values are
#   defined for this setting:
# 
#     no        - Never created automatically.
#     create    - Automatically created, but no automatic subscription.
#     subscribe - Automatically created and subscribed.
#  
# special_use:
#   A space-separated list of SPECIAL-USE flags (RFC 6154) to use for the
#   mailbox. There are no validity checks, so you could specify anything
#   you want in here, but it's not a good idea to use flags other than the
#   standard ones specified in the RFC:
#
#     \All      - This (virtual) mailbox presents all messages in the
#                 user's message store. 
#     \Archive  - This mailbox is used to archive messages.
#     \Drafts   - This mailbox is used to hold draft messages.
#     \Flagged  - This (virtual) mailbox presents all messages in the
#                 user's message store marked with the IMAP \Flagged flag.
#     \Junk     - This mailbox is where messages deemed to be junk mail
#                 are held.
#     \Sent     - This mailbox is used to hold copies of messages that
#                 have been sent.
#     \Trash    - This mailbox is used to hold messages that have been
#                 deleted.
#
# comment:
#   Defines a default comment or note associated with the mailbox. This
#   value is accessible through the IMAP METADATA mailbox entries
#   "/shared/comment" and "/private/comment". Users with sufficient
#   privileges can override the default value for entries with a custom
#   value.

# NOTE: Assumes "namespace inbox" has been defined in 10-mail.conf.
namespace inbox {
  # These mailboxes are widely used and could perhaps be created automatically:
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Trash {
    special_use = \Trash
  }

  # For \Sent mailboxes there are two widely used names. We'll mark both of
  # them as \Sent. User typically deletes one of them if duplicates are created.
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }

##########  Added an "inbox = yes" definition.  [ May, 12th 2020 ]  ####################
   inbox = yes
########################################################################################

  # If you have a virtual "All messages" mailbox:
  #mailbox virtual/All {
  #  special_use = \All
  #  comment = All my messages
  #}

  # If you have a virtual "Flagged" mailbox:
  #mailbox virtual/Flagged {
  #  special_use = \Flagged
  #  comment = All my flagged messages
  #}
}

今回のCentOS 7のアップデートはアップデートパッケージが数百にも及ぶ大規模な物だったので、かなりのパッケージが変更されている.今回のOSのアップデートでは、Dovecotのバージョンが、2.2.36 (1f10bfa63) に更新されていた.OSアップデート前のバージョンが幾つだったかは定かでは無いが、Dovecotを使っている場合はOSのアップデート前にきちんと使用しているバージョンを確認しておこう.


Calendar

April 2024
S M T W T F S
 123456
78910111213
14151617181920
21222324252627
282930  
  • Blogroll

  • Meta