toutouye debian powered | Bonjour à tous, Je cherche à monter un serveur mail multi-domaines sur une debian sarge, je me suis servi de l'excellent tuto de mikala, cependant un problème persiste (où surement une bêtise de ma part) :
J'arrive bien a créer un domaine virtuel sous postfixadmin, des users virtuels aussi, je peux leur envoyer des mails, leurs boites se créent comme il faut,
le seul problème est que je n'arrive pas à me connecter à leur boîte mail par imap, et je ne peux donc pas lire les mails des virtuals users.
Tout fonctionne encore bien pour les users normaux.
Voici mes fichiers de conf :
main.cf
Code :
- # See /usr/share/postfix/main.cf.dist for a commented, more complete version
- #smtpd_client_restrictions = reject_unknown_client, hash:/etc/postfix/access
- smtpd_banner = toto.com ESMTP $mail_name
- biff = no
- # appending .domain is the MUA's job.
- append_dot_mydomain = yes
- # Uncomment the next line to generate "delayed mail" warnings
- #delay_warning_time = 4h
- myhostname = toto.com
- alias_maps = hash:/etc/aliases
- alias_database = hash:/etc/aliases
- myorigin = toto.com
- mydestination = toto.servebeer.com, localhost.servebeer.com, localhost
- relayhost = smtp.orange.fr
- mynetworks = 127.0.0.0/8 192.168.1.0/24
- mailbox_size_limit = 0
- recipient_delimiter = +
- inet_interfaces = 192.168.1.10, 127.0.0.1
- home_mailbox = Maildir/
- #header_checks = regexp:/etc/postfix/header_checks
- smtpd_recipient_limit = 100
- message_size_limit = 50000000
- smtpd_error_sleep_time = 1s
- smtpd_soft_error_limit = 10
- smtpd_hard_error_limit = 15
- masquerade_domains = toto.com
- smtp_skip_4xx_greeting = no
- smtp_skip_5xx_greeting = no
- #postfix=mysql
- virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf
- virtual_gid_maps = static:1003
- virtual_mailbox_base = /home/vmail
- virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf
- virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
- virtual_mailbox_limit = 51200000
- virtual_minimum_uid = 1003
- virtual_transport = virtual
- virtual_uid_maps = static:1003
- readme_directory = /etc/postfix/readme
- sample_directory = /etc/postfix/sample
- sendmail_path = /usr/sbin/sendmail
- manpage_directory = /usr/local/man
- newaliases_path = /usr/bin/newaliases
- mailq_path = /usr/bin/mailq
- queue_directory = /var/spool/postfix
- mail_owner = postfix
- unknown_local_recipient_reject_code = 450
|
master.cf :
Code :
- smtp inet n - n - - smtpd
- pickup fifo n - n 60 1 pickup
- cleanup unix n - n - 0 cleanup
- qmgr fifo n - n 300 1 qmgr
- rewrite unix - - n - - trivial-rewrite
- bounce unix - - n - 0 bounce
- defer unix - - n - 0 bounce
- trace unix - - n - 0 bounce
- verify unix - - n - 1 verify
- flush unix n - n 1000? 0 flush
- proxymap unix - - n - - proxymap
- smtp unix - - n - - smtp
- relay unix - - n - - smtp
- showq unix n - n - - showq
- error unix - - n - - error
- local unix - n n - - local
- virtual unix - n n - - virtual
- lmtp unix - - n - - lmtp
- anvil unix - - n - 1 anvil
- maildrop unix - n n - - pipe
- flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
- uucp unix - n n - - pipe
- flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
- ifmail unix - n n - - pipe
- flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
- bsmtp unix - n n - - pipe
- flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender $recipient
- scalemail-backend unix - n n - 2 pipe
- flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
|
les fichiers virtual ressemble à ceci :
Code :
- user = postfix
- password = lepass
- hosts = unix:/var/run/mysqld/mysqld.sock
- dbname = postfix
- table = mailbox
- select_field = maildir
- where_field = username
- additional_conditions = and active = '1'
|
/etc/courier/authmysqlrc
Code :
- MYSQL_SERVER localhost
- MYSQL_USERNAME postfix
- MYSQL_PASSWORD lepass
- MYSQL_SOCKET /var/run/mysqld/mysqld.sock
- MYSQL_PORT 0
- MYSQL_OPT 0
- MYSQL_DATABASE postfix
- MYSQL_USER_TABLE mailbox
- MYSQL_CRYPT_PWFIELD password
- MYSQL_UID_FIELD 103
- MYSQL_GID_FIELD 104
- MYSQL_LOGIN_FIELD username
- MYSQL_HOME_FIELD /home/vmail
- MYSQL_NAME_FIELD name
- MYSQL_MAILDIR_FIELD maildir
|
/etc/courier/authdaemonrc :
Code :
- authmodulelist="authpam authmysql"
- authmodulelistorig="authcustom authcram authuserdb authldap authpgsql authmysql authpam"
- daemons=5
- version=""
- authdaemonvar=/var/run/courier/authdaemon
|
dans les log de postfix : je reçois bien un mail pour un user virtuel : et la ptite erreur qd j'essaye de m'authentifier :
Code :
- Jul 19 22:26:18 toto postfix/virtual[5686]: D9B944548: to=<pilou@toto.com>, relay=virtual, delay=1, status=sent (delivered to maildir)
- Jul 19 22:26:18 toto postfix/qmgr[5597]: D9B944548: removed
- Jul 19 22:31:40 toutouye imaplogin: LOGIN FAILED, ip=[:ffff:127.0.0.1]
- Jul 19 22:31:40 toutouye imaplogin: LOGOUT, ip=[:ffff:127.0.0.1]
|
Je vous mets le log de mysql si ça peut vous aider :
Code :
- 060719 22:30:29 5 Connect postfix@localhost on
- 5 Init DB postfix
- 5 Query SELECT username, password, "", 103, 104, /home/vmail, maildir, "", name, "" FROM mailbox WHERE username = "pilou@toto.com"
- 5 Quit
- 6 Connect postfix@localhost on
- 6 Init DB postfix
- 6 Query SELECT username, password, "", 103, 104, /home/vmail, maildir, "", name, "" FROM mailbox WHERE username = "pilou@toto.com"
- 6 Quit
- 060719 22:31:35 7 Connect postfix@localhost on
- 7 Init DB postfix
- 7 Query SELECT username, password, "", 103, 104, /home/vmail, maildir, "", name, "" FROM mailbox WHERE username = "pilou"
- 7 Quit
- 8 Connect postfix@localhost on
- 8 Init DB postfix
- 8 Query SELECT username, password, "", 103, 104, /home/vmail, maildir, "", name, "" FROM mailbox WHERE username = "pilou"
- 8 Quit
|
Voilà merci d'avance pour votre aide Message édité par toutouye le 25-07-2006 à 12:19:18
|