All pastes #573822 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-18 08:45 UTC
rendered paste body
-> file: dovecot.conf

## Dovecot 1.0 configuration file

# '#' character and everything after it is treated as comments. Extra spaces
# and tabs are ignored. If you want to use either of these explicitly, put the
# value inside quotes, eg.: key = "# char and trailing whitespace  "

# Default values are shown after each value, it's not required to uncomment
# any of the lines. Exception to this are paths, they're just examples
# with real defaults being based on configure options. The paths listed here
# are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
# --with-ssldir=/etc/ssl

# Base directory where to store runtime data.
base_dir = /var/run/dovecot/

# Protocols we want to be serving:
#  imap imaps pop3 pop3s
protocols = pop3 pop3s

# IP or host address where to listen in for connections. It's not currently
# possible to specify multiple addresses. "*" listens in all IPv4 interfaces.
# "[::]" listens in all IPv6 interfaces, but may also listen in all IPv4
# interfaces depending on the operating system.  If you want to specify ports
# for each service, you will need to configure these settings inside the
# protocol imap/pop3 { ... } section, so you can specify different ports
# for IMAP/POP3.
#listen = *

# IP or host address where to listen in for SSL connections. Defaults
# to above if not specified.
#ssl_listen =

# Disable SSL/TLS support.
ssl_disable = no


# PEM encoded X.509 SSL/TLS certificate and private key. They're opened before

# dropping root privileges, so keep the key file unreadable by anyone but
# root. Included doc/mkcert.sh can be used to easily generate self-signed
# certificate, just make sure to update the domains in dovecot-openssl.cnf
ssl_cert_file = /etc/pki/dovecot.pem
ssl_key_file = /etc/pki/private/dovecot.pem

# File containing trusted SSL certificate authorities. Usually not needed.
#ssl_ca_file = 

# How often to regenerate the SSL parameters file. Generation is quite CPU
# intensive operation. The value is in hours, 0 disables regeneration
# entirely.
ssl_parameters_regenerate = 180 

# SSL ciphers to use
#ssl_cipher_list = all:!low

# Disable LOGIN command and all other plaintext authentications unless
# SSL/TLS is used (LOGINDISABLED capability). Note that 127.*.*.* and
# IPv6 ::1 addresses are considered secure, this setting has no effect if
# you connect from those addresses.
disable_plaintext_auth = no

# Use this logfile instead of syslog(). /dev/stderr can be used if you want to
# use stderr for logging (ONLY /dev/stderr - otherwise it is closed).
#log_path = 
log_path = dovecot_login.log


# For informational messages, use this logfile instead of the default
#info_log_path = 

# dropping root privileges, so keep the key file unreadable by anyone but
# root. Included doc/mkcert.sh can be used to easily generate self-signed
# certificate, just make sure to update the domains in dovecot-openssl.cnf
ssl_cert_file = /etc/pki/dovecot.pem
ssl_key_file = /etc/pki/private/dovecot.pem

# How often to regenerate the SSL parameters file. Generation is quite CPU
# intensive operation. The value is in hours, 0 disables regeneration
# entirely.
ssl_parameters_regenerate = 180 

# SSL ciphers to use
#ssl_cipher_list = all:!low

# Disable LOGIN command and all other plaintext authentications unless
# SSL/TLS is used (LOGINDISABLED capability). Note that 127.*.*.* and
# IPv6 ::1 addresses are considered secure, this setting has no effect if
# you connect from those addresses.
disable_plaintext_auth = no

# Use this logfile instead of syslog(). /dev/stderr can be used if you want to
# use stderr for logging (ONLY /dev/stderr - otherwise it is closed).
#log_path = 
log_path = dovecot_login.log

# Prefix for each line written to log file. % codes are in strftime(3)
# format.
log_timestamp = "%b %d %H:%M:%S "

##
## Login processes
##

# Directory where authentication process places authentication UNIX sockets
# which login needs to be able to connect to. The sockets are created when
# running as root, so you don't have to worry about permissions. Note that
# everything in this directory is deleted when Dovecot is started.
#login_dir = /var/run/dovecot/login


# Greeting message for clients.
login_greeting = POP3 ready.

##
## Mail processes
##

# Maximum number of running mail processes. When this limit is reached,
# new users aren't allowed to log in.
#max_mail_processes = 1024

# Show more verbose process titles (in ps). Currently shows user name and
# IP address. Useful for seeing who are actually using the IMAP processes
# (eg. shared mailboxes or if same uid is used for multiple accounts).
#verbose_proctitle = no

# Show protocol level SSL errors.
verbose_ssl = yes 


# Default MAIL environment to use when it's not set. By leaving this empty
# dovecot tries to do some automatic detection as described in
# doc/mail-storages.txt. There's a few special variables you can use, eg.:
#
#   %u - username
#   %n - user part in user@domain, same as %u if there's no domain
#   %d - domain part in user@domain, empty if there's no domain
#   %h - home directory
#
# See doc/variables.txt for full list. Some examples:
#
#   default_mail_env = maildir:/var/mail/%1u/%u/Maildir
#   default_mail_env = mbox:~/mail/:INBOX=/var/mail/%u
#   default_mail_env = mbox:/var/mail/%d/%n/:INDEX=/var/indexes/%d/%n
#
#default_mail_env = 
default_mail_env = mbox:/var/spool/postfix/virtual/%d/%n

##
## POP3 specific settings
##

protocol pop3 {
  # Login executable location.
  #login_executable = /usr/libexec/dovecot/pop3-login

  # POP3 executable location
  #mail_executable = /usr/libexec/dovecot/pop3

  # 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
  
  # POP3 UIDL format to use. You can use following variables:
  #
  #  %v - Mailbox UIDVALIDITY
  #  %u - Mail UID
  #  %m - MD5 sum of the mailbox headers in hex (mbox only)
  #  %f - filename (maildir only)
  #
  # If you want UIDL compatibility with other POP3 servers, use:
  #  UW's ipop3d         : %08Xv%08Xu
  #  Courier version 0   : %f
  #  Courier version 1   : %u
  #  Courier version 2   : %v-%u
  #  Cyrus (<= 2.1.3)    : %u
  #  Cyrus (>= 2.1.4)    : %v.%u
  #
  # Note that Outlook 2003 seems to have problems with %v.%u format which is
  # Dovecot's default, so if you're building a new server it would be a good
  # idea to change this. %08Xu%08Xv should be pretty fail-safe.
  pop3_uidl_format = %08Xu%08Xv 

}

##
## Authentication processes
##

auth default {
  # Space separated list of wanted authentication mechanisms:
  #   plain digest-md5 cram-md5 apop anonymous
  mechanisms = plain

  # SQL database
  passdb sql {
    # Path for SQL configuration file, see doc/dovecot-sql.conf for example
    args = /etc/dovecot-mysql.conf 
  }



-> file: dovecot-mysql.conf

# Dovecot 1.0 SQL configuration file dovecot-sql.conf

# Database driver: mysql, pgsql
driver = mysql

# Database options
# Specify more "host=" statements if you have multiple replicated MySQL hosts.
connect = host=localhost dbname=maildb user=postfix password=postfix

# Password query
password_query = SELECT password FROM users WHERE user = '%u'

# User attributes
# You can also have "nice" column which is a Unix nice value for user mail
# process.
user_query = SELECT home, uid, gid FROM users WHERE user = '%u'

# eof