From LedHed's Wiki
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 6: Line 6:
  
  
 +
'''NOTE'''
 +
Dovecot's default UIDL format isn't compatible with Outlook 2003 to fix set this setting as follows:
 +
pop3_uidl_format = %08Xu%08Xv
  
== Example Conf ==
 
  
  protocols = imaps pop3s
+
== Example dovecot.conf ==
 +
# Protocols we want to be serving
 +
  protocols = imap imaps pop3 pop3s
 +
 +
# Listen on all IPv4 Interfaces
 
  listen = *
 
  listen = *
 +
 +
# Kill all IMAP and POP3 processes when Dovecot master process shuts down
 
  shutdown_clients = yes
 
  shutdown_clients = yes
 +
 +
# Disable SSL/TLS support.
 
  ssl_disable = no
 
  ssl_disable = no
 +
 +
# SSL Certificate info
 
  ssl_cert_file = /etc/pki/tls/certs/server.crt
 
  ssl_cert_file = /etc/pki/tls/certs/server.crt
 
  ssl_key_file = /etc/pki/tls/certs/server.key
 
  ssl_key_file = /etc/pki/tls/certs/server.key
 +
 +
# Mailbox locations
 
  default_mail_env = maildir:/usr/local/virtual/%u
 
  default_mail_env = maildir:/usr/local/virtual/%u
 
   
 
   
 +
# IMAP specific settings
 
  protocol imap {
 
  protocol imap {
 +
        listen = *:143
 
         ssl_listen = *:993
 
         ssl_listen = *:993
 
  }
 
  }
 
   
 
   
 +
# POP3 specific settings
 
  protocol pop3 {
 
  protocol pop3 {
 +
        listen = *:110
 
         ssl_listen = *:995
 
         ssl_listen = *:995
 
  }
 
  }
 
   
 
   
 +
# Authentication processes exectuable
 
  auth_executable = /usr/libexec/dovecot/dovecot-auth
 
  auth_executable = /usr/libexec/dovecot/dovecot-auth
   
+
 
 +
  # Authentication Settings
 
  auth default {
 
  auth default {
  mechanisms = plain login
 
 
   
 
   
 +
  # Authentication Mecahnisms
 +
  mechanisms = plain login digest-md5 cram-md5 gssapi
 +
 +
  # Path for SQL configuration file
 
   passdb sql {
 
   passdb sql {
 
     args = /etc/dovecot-sql.conf
 
     args = /etc/dovecot-sql.conf
 
   }
 
   }
 
   
 
   
 +
  # Path for SQL configuration file
 
   userdb sql {
 
   userdb sql {
 
     args = /etc/dovecot-sql.conf
 
     args = /etc/dovecot-sql.conf
 
   }
 
   }
 
   
 
   
 +
  # User to use for the process. This user needs access to only user and password databases, nothing else.
 
   user = root
 
   user = root
+
 
 +
  # Make dovecot-auth available to Postifx for SASL authentication
 
   socket listen {
 
   socket listen {
 
     client listen {
 
     client listen {
 
       path = /var/spool/postfix/private/auth
 
       path = /var/spool/postfix/private/auth
 
       mode = 0660
 
       mode = 0660
       user = postfix
+
       user = mail
       group = postfix
+
       group = mail
 
     }
 
     }
 
   }
 
   }
Line 51: Line 77:
 
  }
 
  }
  
 +
'' '''NOTE:''' ''<br>
 +
'''path = /var/spool/postfix/private/auth''' in ''dovecot.conf'' should match '''smtpd_sasl_path = /var/spool/postfix/private/auth'''  in postfix's ''main.cf''<br>
 +
See [[Postfix & Dovecot-Auth]] for reference.
  
 +
== Example dovecot-sql.conf ==
  
 
+
 
+
# Database driver: mysql, pgsql, sqlite
 
+
driver = mysql
 +
 +
# Database connection string.
 +
connect = host=localhost port=3306 dbname=mail user=mail password=********
 +
 +
# Default password scheme
 +
default_pass_scheme = PLAIN CRAM-MD5 DIGEST-MD5 MD5-CRYPT NTLM
 +
 +
# Password Query
 +
password_query = SELECT password FROM users WHERE username = '%u'
 +
 +
# User Query
 +
user_query = SELECT maildir, uid, gid FROM users WHERE username = '%u'
 +
  
  
 
[[Category:Linux]]
 
[[Category:Linux]]

Latest revision as of 16:47, 19 March 2007

Dovecot is an open source IMAP/POP3 server for *nix Operating Systems
More info at: http://www.dovecot.org
Documentation at: http://wiki.dovecot.org


NOTE Dovecot's default UIDL format isn't compatible with Outlook 2003 to fix set this setting as follows:

pop3_uidl_format = %08Xu%08Xv


Example dovecot.conf

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

# Listen on all IPv4 Interfaces
listen = *

# Kill all IMAP and POP3 processes when Dovecot master process shuts down
shutdown_clients = yes

# Disable SSL/TLS support.
ssl_disable = no

# SSL Certificate info
ssl_cert_file = /etc/pki/tls/certs/server.crt
ssl_key_file = /etc/pki/tls/certs/server.key

# Mailbox locations
default_mail_env = maildir:/usr/local/virtual/%u

# IMAP specific settings
protocol imap {
        listen = *:143
        ssl_listen = *:993
}

# POP3 specific settings
protocol pop3 {
        listen = *:110
        ssl_listen = *:995
}

# Authentication processes exectuable
auth_executable = /usr/libexec/dovecot/dovecot-auth
 
# Authentication Settings
auth default {

  # Authentication Mecahnisms
  mechanisms = plain login digest-md5 cram-md5 gssapi

  # Path for SQL configuration file
  passdb sql {
   args = /etc/dovecot-sql.conf
  }

  # Path for SQL configuration file
  userdb sql {
    args = /etc/dovecot-sql.conf
  }

  # User to use for the process. This user needs access to only user and password databases, nothing else.
  user = root
 
 # Make dovecot-auth available to Postifx for SASL authentication
 socket listen {
   client listen {
     path = /var/spool/postfix/private/auth
     mode = 0660
     user = mail
     group = mail
   }
 }

}

NOTE:
path = /var/spool/postfix/private/auth in dovecot.conf should match smtpd_sasl_path = /var/spool/postfix/private/auth in postfix's main.cf
See Postfix & Dovecot-Auth for reference.

Example dovecot-sql.conf

# Database driver: mysql, pgsql, sqlite
driver = mysql

# Database connection string.
connect = host=localhost port=3306 dbname=mail user=mail password=********

# Default password scheme
default_pass_scheme = PLAIN CRAM-MD5 DIGEST-MD5 MD5-CRYPT NTLM

# Password Query
password_query = SELECT password FROM users WHERE username = '%u'

# User Query
user_query = SELECT maildir, uid, gid FROM users WHERE username = '%u'

This category currently contains no pages or media.