##
## POP3 specific settings
##

# Don't try to set mails non-recent or seen with POP3 sessions. This is
# mostly intended to reduce disk I/O. With maildir it doesn't move files
# from new/ to cur/, with mbox it doesn't write Status-header.
#pop3_no_flag_updates = no

# Support LAST command which exists in old POP3 specs, but has been removed
# from new ones. Some clients still wish to use this though. Enabling this
# makes RSET command clear all \Seen flags from messages.
#pop3_enable_last = no

# If mail has X-UIDL header, use it as the mail's UIDL.
#pop3_reuse_xuidl = no

# Allow only one POP3 session to run simultaneously for the same user.
#pop3_lock_session = no

# POP3 requires message sizes to be listed as if they had CR+LF linefeeds.
# Many POP3 servers violate this by returning the sizes with LF linefeeds,
# because it's faster to get. When this setting is enabled, Dovecot still
# tries to do the right thing first, but if that requires opening the
# message, it fallbacks to the easier (but incorrect) size.
#pop3_fast_size_lookups = no

# POP3 UIDL (unique mail identifier) format to use. You can use following
# variables with variable extension as described in
# https://doc.dovecot.org/latest/core/settings/variables.html
#
#  %{uidvalidity} - Mailbox's IMAP UIDVALIDITY
#  %{uid} - Mail's IMAP UID
#  %{md5} - MD5 sum of the mailbox headers in hex (mbox only)
#  %{filename} - filename (maildir only)
#  %{guid} - Mail's GUID
#
# If you want UIDL compatibility with other POP3 servers, use:
#  UW's ipop3d         : %{uid | hex(8)}%{uidvalidity | hex(8)}
#  Courier             : %{filename} or %{uidvalidity}-%{uid} (both might be used simultaneously)
#  Cyrus (<= 2.1.3)    : %{uid}
#  Cyrus (>= 2.1.4)    : %{uidvalidity}.%{uid}
#  Dovecot v0.99.x     : %{uidvalidity}.%{uid}
#  tpop3d              : %{filename|md5}
#
# Note that Outlook 2003 seems to have problems with %{uidvalidity}.%{uid} format which was
# Dovecot's default, so if you're building a new server it would be a good
# idea to change this. %{uid | hex(8)}%{uidvalidity | hex(8)} should be pretty fail-safe.
#
#pop3_uidl_format = %{uid | hex(8)}%{uidvalidity | hex(8)}

# Permanently save UIDLs sent to POP3 clients, so pop3_uidl_format changes
# won't change those UIDLs. Currently this works only with Maildir.
#pop3_save_uidl = no

# What to do about duplicate UIDLs if they exist?
#   allow: Show duplicates to clients.
#   rename: Append a temporary -2, -3, etc. counter after the UIDL.
#pop3_uidl_duplicates = allow

# This option changes POP3 behavior so that it's not possible to actually
# delete mails via POP3, only hide them from future POP3 sessions. The mails
# will still be counted towards user's quota until actually deleted via IMAP.
# Use e.g. "$POP3Deleted" as the value (it will be visible as IMAP keyword).
# Make sure you can legally archive mails before enabling this setting.
#pop3_deleted_flag =

# POP3 logout format string:
# %{input} - Bytes read from the client
# %{output} - Bytes sent to the client
# %{top_count} - Number of TOP commands run
# %{top_bytes} - Bytes sent to the client because of TOP commands
# %{retr_count} - Number of RETR commands run
# %{retr_bytes} - Bytes sent to the client because of RETR commands
# %{deleted_count} - Number of deleted messages
# %{deleted_bytes} - Number of bytes in deleted messages
# %{message_count} - Number of messages before deletion
# %{message_bytes} - Mailbox size, in bytes, before deletion
# %{uidl_change} - The old and the new UIDL hash (which can be useful for identifying unexpected changes in UIDLs)
#pop3_logout_format = top=%{top_count}/%{top_bytes}, retr=%{retr_count}/%{retr_bytes}, del=%{deleted_count}/%{deleted_bytes}, size=%{message_bytes}

# Workarounds for various client bugs:
#   outlook-no-nuls:
#     Outlook and Outlook Express hang if mails contain NUL characters.
#     This setting replaces them with 0x80 character.
#   oe-ns-eoh:
#     Outlook Express and Netscape Mail breaks if end of headers-line is
#     missing. This option simply sends it if it's missing.
#pop3_client_workarounds {
#  outlook-no-nuls = yes
#}

protocol pop3 {
  # Space separated list of plugins to load (default is global mail_plugins).
  #mail_plugins {
  #}

  # Maximum number of POP3 connections allowed for a user from each IP address.
  # NOTE: The username is compared case-sensitively.
  #mail_max_userip_connections = 10
}
