Postfixadmin and dovecot

Uso da sempre l’ottimo Postfixadmin:
Postfix Admin is a Web Based Management tool created for Postfix.
It is a PHP based application that handles Postfix Style Virtual Domains and Users that are stored in MySQL.”

Sul sito troverete anche uno schematico ma molto chiaro HOWTO che illustra un setup basato su Postfix+MySQL+Courier
Usando Dovecot, circa un anno fa scrissi questo capitoletto che sostituisce il capitolo 10 dell’how-to (in pratica la configurazione di courier).
Mi son sempre scordato di metterlo da qualche parte :(
Eccovelo come tardivo rimedio

10 Dovecot

10.1 Dovecot setup

dovecot.conf relevant part for postfixadmin setup
Please refer to Dovecot documentation for complete information.

default_mail_env = maildir:/usr/local/virtual/%u/

# auth_userdb specifies maildir location and user/group ID to use
auth_userdb = mysql /etc/dovecot/dovecot-mysql.conf

# auth_passdb specifies user passwords
auth_passdb = mysql /etc/dovecot/dovecot-mysql.conf

# Valid UID range for users, defaults to 500 and above.
first_valid_uid = 1001 # Change this to your postifx UID

1.2 Dovecot mysql setup

Below you’ll find the relevant part of dovecot-mysql.conf file regarding our setup
Things you may need to change are db_password, uid and gid

db_host = localhost
db_port = 3306
# Default sock for Debian sarge
db_unix_socket = /var/run/mysqld/mysqld.sock
db = postfix
db_user = postfix
db_passwd = postfix
db_client_flags = 0

# Default password scheme.

default_pass_scheme = PLAIN-MD5

# Query to retrieve password.

password_query = SELECT password FROM mailbox WHERE username = ‘%u’

# Query to retrieve user information.

user_query = SELECT maildir, 1001 AS uid, 1001 AS gid FROM mailbox WHERE username = ‘%u’

NB
The GID and UID are for postfix user and group ID, NOT MySQL user and group ID.

November 13th, 2005 Posted in Tech stuff

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WordPress | Blue Weed by Blog Oh! Blog | Entries (RSS) and Comments (RSS).