无法锁定 SMTP 服务器中的错误消息

无法锁定 SMTP 服务器中的错误消息

我在同一个邮箱中连续出现了 3 次以下错误信息

> (delivery failed to mailbox
> /var/spool/postfix/vhosts/<user>/mail/inbox: 
> 
> unable to lock for exclusive access: Resource temporarily unavailable

我不明白发生了什么事。你能帮我解释一下吗?

我该怎么做才能避免再次出现这样的错误信息?

另外,我有以下设置:

# used only for creating mbox dotlock files when creation fails for INBOX.
# Rely on O_EXCL to work when creating dotlock files. The default is to use
# hard linking. O_EXCL makes the dotlocking faster, but it doesn't always
#dotlock_use_excl = no
# Locking method for index files. Alternatives are fcntl, flock and dotlock.
# Dotlocking uses some tricks which may create more disk I/O than other locking
# methods. NFS users: flock doesn't work, remember to change mmap_disable.
#lock_method = fcntl
# Which locking methods to use for locking mbox. There are four available:
#  dotlock: Create <mailbox>.lock file. This is the oldest and most NFS-safe
#  fcntl  : Use this if possible. Works with NFS too if lockd is used.
#  flock  : May not exist in all systems. Doesn't work with NFS.
#  lockf  : May not exist in all systems. Doesn't work with NFS.
# You can use multiple locking methods; if you do the order they're declared
# in is important to avoid deadlocks if other MTAs/MUAs are using multiple
# locking methods as well. Some operating systems don't allow using some of
#mbox_read_locks = fcntl
#mbox_write_locks = fcntl
# Maximum time in seconds to wait for lock (all of them) before aborting.
#mbox_lock_timeout = 300
# If dotlock exists but the mailbox isn't modified in any way, override the
# lock file after this many seconds.
#mbox_dotlock_change_timeout = 120
  # Keep the mailbox locked for the entire POP3 session.
  #pop3_lock_session = no
# blocking passdb and userdb queries (eg. MySQL and PAM). They're
    # [blocking=yes] [session=yes] [setcred=yes]
    # Setting blocking=yes uses the alternative way: dovecot-auth worker
    # [blocking=yes] - See userdb passwd for explanation
    # [blocking=yes] - See userdb passwd for explanation
    # [blocking=yes] - By default the lookups are done in the main dovecot-auth
    # proceses. Useful with remote NSS lookups that may block.
# used either directly or though a dictionary server. The following dict block

答案1

这意味着 Postfix 必须尝试同时向用户的邮箱发送四封邮件。就您使用的mbox邮箱格式而言,每次发送都应按操作顺序执行。应存储邮件、更新索引等等。为了防止同时发送邮件会破坏 mbox 结构,每次发送都首先尝试锁定邮箱以进行独占操作。此后的每次发送都将看到邮箱已被锁定,并且当时无法发送。这就是为什么您会在日志中看到三个警告 - 第一次发送锁定了邮箱,而接下来的三次发送失败。

没有发生危险。当传递失败时,postfix将消息推迟到队列中。队列会逐次处理,并重新传递每条消息。由于队列中的消息是逐条传递的,并且每次传递都仅在前一次传递完成后进行,因此日志文件中没有新的警告。当然,如果传递由于某种原因再次失败,消息将在队列中推迟,并记录警告。

相关内容