[Postfixbuch-users] Tutorial
jan.dinger at arcor.de
jan.dinger at arcor.de
Di Dez 21 00:49:11 CET 2004
Hi,
Ich habe das Tutorial in dem Postfixbuch "Das Postfix-Buch" durchgearbeitet. (Postfix, Courier-IMAP, MySQL, SquirrelMail)
Ich habe alles selber kompiliert (auch MySQL).
Errormeldung: (/var/log/mail)
=============
Dec 21 00:34:23 server-2 authdaemond.mysql: failed to connect to mysql server (server=localhost., userid=postfix)
Dec 21 00:34:28 server-2 imapd: LOGIN FAILED, ip=[::ffff:127.0.0.1]
Dec 21 00:34:28 server-2 imapd: DISCONNECTED, ip=[::ffff:127.0.0.1], time=5
Ich habe den login ausprobiert user "Postfix" "password"
Ist alles korrekt
Meine Konfigurationen:
Postconf -n:
============
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
myhostname = gaming2.net
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
relay_domains = $mydestination, mail.gaming2.net
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
virtual_gid_maps = mysql:/etc/postfix/ids.mysql
virtual_mailbox_base = /var/spool/maildirs
virtual_mailbox_maps = mysql:/etc/postfix/mailbox.mysql
virtual_minimum_uid = 5000
virtual_uid_maps = mysql:/etc/postfix/ids.mysql
Courier-IMAP:
=============
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD xxxxxx
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_PORT 3306
MYSQL_OPT 0
MYSQL_DATABASE mailbase
MYSQL_USER_TABLE mailusers
#MYSQL_CRYPT_PWFIELD crypt
MYSQL_CLEAR_PWFIELD password
DEFAULT_DOMAIN mail.gaming2.net
MYSQL_UID_FIELD uid
MYSQL_GID_FIELD gid
MYSQL_LOGIN_FIELD id
MYSQL_HOME_FIELD maildir
MYSQL_NAME_FIELD name <====== was ist das ??
##NAME: MYSQL_MAILDIR_FIELD:0
#
# This is an optional field, and can be used to specify an arbitrary
# location of the maildir for the account, which normally defaults to
# $HOME/Maildir (where $HOME is read from MYSQL_HOME_FIELD).
#
# You still need to provide a MYSQL_HOME_FIELD, even if you uncomment this
# out.
#
# MYSQL_MAILDIR_FIELD maildir
##NAME: MYSQL_DEFAULTDELIVERY:0
#
# Courier mail server only: optional field specifies custom mail delivery
# instructions for this account (if defined) -- essentially overrides
# DEFAULTDELIVERY from ${sysconfdir}/courierd
#
# MYSQL_DEFAULTDELIVERY defaultdelivery
##NAME: MYSQL_QUOTA_FIELD:0
#
# Define MYSQL_QUOTA_FIELD to be the name of the field that can optionally
# specify a maildir quota. See README.maildirquota for more information
#
# MYSQL_QUOTA_FIELD quota
##NAME: MYSQL_AUXOPTIONS:0
#
# Auxiliary options. The MYSQL_AUXOPTIONS field should be a char field that
# contains a single string consisting of comma-separated "ATTRIBUTE=NAME"
# pairs. These names are additional attributes that define various per-account
# "options", as given in INSTALL's description of the "Account OPTIONS"
# setting.
#
# MYSQL_AUXOPTIONS_FIELD auxoptions
#
# You might want to try something like this, if you'd like to use a bunch
# of individual fields, instead of a single text blob:
#
# MYSQL_AUXOPTIONS_FIELD CONCAT("disableimap=",disableimap,",disablepop3=",disablepop3,",disablewebmail=",disablewebmail,",sharedgroup=",sharedgroup)
#
##NAME: MYSQL_WHERE_CLAUSE:0
#
# This is optional, MYSQL_WHERE_CLAUSE can be basically set to an arbitrary
# fixed string that is appended to the WHERE clause of our query
#
# MYSQL_WHERE_CLAUSE server='mailhost.example.com'
# MYSQL_SELECT_CLAUSE SELECT CONCAT(popbox.local_part, '@', popbox.domain_name), \
# CONCAT('{MD5}', popbox.password_hash), \
# popbox.clearpw, \
# domain.uid, \
# domain.gid, \
# CONCAT(domain.path, '/', popbox.mbox_name), \
# '', \
# domain.quota, \
# '', \
# CONCAT("disableimap=",disableimap,",disablepop3=", \
# disablepop3,",disablewebmail=",disablewebmail, \
# ",sharedgroup=",sharedgroup) \
# FROM popbox, domain \
# WHERE popbox.local_part = '$(local_part)' \
# AND popbox.domain_name = '$(domain)' \
# AND popbox.domain_name = domain.domain_name
Dumps:
======
CREATE TABLE `mailusers` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`account` VARCHAR( 240 ) NOT NULL ,
`uid` VARCHAR( 6 ) DEFAULT '5001' NOT NULL ,
`gid` VARCHAR( 6 ) DEFAULT '5001' NOT NULL ,
`maildir` VARCHAR( 100 ) DEFAULT '/var/spool/maildirs' NOT NULL ,
`home` VARCHAR( 100 ) NOT NULL ,
`password` VARCHAR( 255 ) NOT NULL ,
`angelegt_von` VARCHAR( 60 ) NOT NULL ,
`angelegt_am` DATE NOT NULL ,
`memo_text` VARCHAR( 255 ) NOT NULL ,
`memo_vorname` VARCHAR( 60 ) NOT NULL ,
`memo_nachname` VARCHAR( 60 ) NOT NULL ,
PRIMARY KEY ( `id` ) ,
UNIQUE (
`account`
)
) TYPE = MYISAM ;
CREATE TABLE `weiterleitungen` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`forward_from` VARCHAR( 240 ) NOT NULL ,
`forward_to` VARCHAR( 240 ) NOT NULL ,
`angelegt_von` VARCHAR( 60 ) NOT NULL ,
`angelegt_am` DATE DEFAULT '0000-00-00' NOT NULL ,
`memo_txt` VARCHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `id` ) ,
UNIQUE (
`forward_from`
)
);
Mehr Informationen über die Mailingliste Postfixbuch-users