Salut,
J'ai le message suivant quand j'essaye d'envoyer des mail à mes virtual users Postfix stokés dans mon annuaire LDAP quand je passe par Maildrop :
Jan 12 00:46:59 debian postfix/pipe[1318]: 95C371A6E3: to=<test4@apavesudeurope.net>, relay=maildrop, delay=1, status=bounced (user unknown. Command output: Invalid user specified. )
Jan 12 00:46:59 debian postfix/cleanup[1316]: 0D4891A6E4: message-id=<20050111234659.0D4891A6E4@apavesudeurope.net>
Mes fichiers de conf :
# /etc/postfix/main.cf :
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
setgid_group = vmail
biff = no
debug_peer_level = 5
append_dot_mydomain = no
mail_owner = postfix
myhostname = apavesudeurope.net
alias_maps = hash
etc/aliases, ldap:aliases
alias_database = hash
etc/aliases
myorigin = /etc/mailname
#mydestination = debian, localhost, $transport_maps
mydestination = debian, localhost
relayhost =
mynetworks = 127.0.0.0/8
#mailbox_command = procmail -a $EXTENSION
mailbox_command = /usr/local/bin/maildrop -d ${recipient}
local_destination_concurrency_limit = 1
mailbox_size_limit = 0
recipient_delimiter = +
home_mailbox = Maildir/
in_flow_delay = 10s
header_checks = regexp
etc/postfix/header_checks.cf
body_checks = regexp
etc/postfix/body_checks.cf
# Transport
transport_server_host = localhost
transport_search_base = o=ldapapavesudeurope,dc=fr
transport_query_filter = (&(virtualDomain=%s)(objectClass=ocbergeVirtualDomain))
transport_result_attribute = postfixTransport
transport_scope = one
transport_cache = no
transport_bind = yes
transport_bind_dn = cn=admin,dc=fr
transport_bind_pw = monpassword
transport_maps = ldap:transport
# Aliases
aliases_server_host = localhost
aliases_search_base = o=ldapapavesudeurope,dc=fr
aliases_query_filter = (&(&(objectClass=ocbergeMailAlias)(mail=%s))(accountActive=TRUE))
aliases_result_attribute = maildrop
aliases_scope = sub
aliases_cache = no
aliases_bind = yes
aliases_bind_dn = cn=admin,dc=fr
aliases_bind_pw = monpassword
# Comptes
accounts_server_host = localhost
accounts_search_base = o=ldapapavesudeurope,dc=fr
accounts_query_filter = (&(&(objectClass=ocbergeMailAccount)(mail=%s))(accountActive=TRUE))
accounts_result_attribute = mailbox
accounts_scope = sub
accounts_cache = no
accounts_bind = yes
accounts_bind_dn = cn=admin,dc=fr
accounts_bind_pw = monpassword
accountsmap_server_host = localhost
accountsmap_search_base = o=ldapapavesudeurope,dc=fr
accountsmap_query_filter = (&(&(objectClass=ocbergeMailAccount)(mail=%s))(accountActive=TRUE))
accountsmap_result_attribute = mail
accountsmap_scope = sub
accountsmap_cache = no
accountsmap_bind = yes
accountsmap_bind_dn = cn=admin,dc=fr
accountsmap_bind_pw = monpassword
# Distribution
local_recipient_maps = $alias_maps unix:passwd.byname $virtual_mailbox_maps
virtual_transport = maildrop
virtual_uid_maps = static:800
virtual_gid_maps = static:800
virtual_mailbox_base = /home/vmail/domains
virtual_mailbox_maps = ldap:accounts
virtual_maps = ldap:aliases, ldap:accountsmap
maildrop_destination_recipient_limit = 1
# /etc/postfix/master.cf :
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${user}
cat /etc/passwd | grep vmail
vmail:x:800:800:
home/vmail
bin/false
Mon arborescence LDAP:
dc=fr
o=ldapapavesudeurope
virtualDomain=apavesudeurope.net
mail=test4@apavesudeurope.net
Detail de mon utilisateur LDAP :
objectClass: ocbergeMailAccount
objectClass: inetOrgPerson
mail: test4@apavesudeurope.net
cn: 'compte test4'
sn: test4
accountActive: TRUE
mailhome: /home/vmail/domains/
userPassword: {MD5}XpHJo+u41i6F+7IdFExmeg==
mailbox: apavesudeurope.net/test4/Maildir/
gidNumber: 800
uidNumber: 800
uid: test4
J'ai un virtualdomain dans mon annuaire ou sont stocké les users :
dn:virtualDomain=apavesudeurope.net,o=ldapapavesudeurope,dc=fr
virtualDomain: apavesudeurope.net
objectClass: ocbergeVirtualDomain
postfixTransport: maildrop:
Quand je mets virtual dans postfixTransport je peu envoyer des mails mais quand je veus passer par maildrop ca ne marche pas avec l'erreur suivante dans mon /var/log/mail.log :
... relay=maildrop, delay=1, status=bounced (user unknown. Command output: Invalid user specified. ...
Quand je fais un : su - vmail | maildrop -d "vmail" ca fonctionne.
j'ai bien un fichier /home/vmail/.maildrop.log ce qui signifie que mon fichier /home/vmail/.mailfilter à bien été pros en compte
# /home/vmail/.mailfilter
HOME="/home/vmail"
MAILDIR="$HOME/domains/apavesudeurope.net/test4/Maildir/"
DEFAULT="$MAILDIR"
logfile "/home/vmail/.maildrop.log"
log " Mail généré par Maildrop pour l'utilistateur $LOGNAME dans $HOME: "
log ""
Mais quand je fais un : maildrop -d test4@apavesudeurope.net
j'ai Invalid user specified.
Pourtant j'ai bien compilé maildrop-1.6.3 avec le support LDAP :
./configure --disable-userdb --without-db --disable-tempdir --enable-syslog=1 --enable-use-flock=1 --enable-maildirquota --enable-use-dotlock=1 --enable-maildrop-uid=vmail --enable-maildrop-gid=vmail --enable-restrict-trusted=0 --enable-trusted-users=root mail daemon postmaster qmaild stephane vmail --with-default-maildrop=Maildir/ --enable-maildropldap --with-ldapconfig=/etc/maildrop/maildropldap.config --with-etcdir=/etc/maildrop
Quand je fais :
# maildrop -v
maildrop 1.6.3 Copyright 1998-2003 Double Precision, Inc.
Maildir quota extension enabled.
Virtual user database via LDAP extension enabled.
This program is distributed under the terms of the GNU General Public
License. See COPYING for additional information.
J'ai bien mon fichier de conf pour LDAP dans /etc/maildrop/maildropldap.config
hostname localhost
basedn o=ldapapavesudeurope,dc=fr
filter (&(&(objectClass=ocbergeMailAccount)(mail=%s))(accountActive=TRUE))
binddn cn=admin, dc=fr
bindpw amandine
timeout 10
search_method mail
default_uidnumber 800
default_gidnumber 800
mail_attr mail
uid_attr uid
uidnumber_attr uidnumber
gidnumber_attr gidnumber
maildir_attr mailbox
homedirectory_attr mailhome
quota_attr quota
Voila je vous ai donné tous les détail de ma config en espérant que quelqu'un m'indique ou j'ai commis une erreur.
Au j'oubliais j'ai aussi ca dans mon /var/log/mail.log quand je démarre Postfix :
Jan 13 20:07:23 debian authdaemond.ldap: modules="authpam authldap", daemons=5
Jan 13 20:07:34 debian postfix/postfix-script: warning: not owned by group vmail: /usr/sbin/postqueue
Jan 13 20:07:34 debian postfix/postfix-script: warning: not owned by group vmail: /usr/sbin/postdrop
Jan 13 20:07:34 debian postfix/postfix-script: warning: not set-gid or not owner+group+world executable: /usr/sbin/postqueue
Jan 13 20:07:34 debian postfix/postfix-script: warning: not set-gid or not owner+group+world executable: /usr/sbin/postdrop
Jan 13 20:07:34 debian postfix/postfix-script: starting the Postfix mail system
Jan 13 20:07:35 debian postfix/master[449]: daemon started -- version 2.1.5
Merci d'avance pour ceux qui auront eu la patience de lire mon post jusqu'a la fin.