Top-posting fixed, please do not top-post your replies on this list. Thanks.
On Thu, Jan 19, 2012 at 08:16:22AM +0100, Hervé Hénoch wrote: > Le 18/01/2012 19:30, /dev/rob0 a écrit : > >On Wed, Jan 18, 2012 at 10:59:46AM +0100, Hervé Hénoch wrote: > >>In main.cf : > >> > >>home_mailbox = Maildir/ > >>virtual_mailbox_base = /mnt/vmail > >>virtual_mailbox_domains = ldap:/etc/postfix/ldap-domains.cf > >>virtual_mailbox_maps = ldap:/etc/postfix/ldap-accounts.cf > >>virtual_alias_maps = ldap:/etc/postfix/ldap-aliases.cf > >> > >>In ldap-accounts.cf : > >>query_filter = > >>(&(objectClass=IscMailAccount)(mail=%s)(mailAccountActive=TRUE)) > >>result_attribute = mailbox > >> > >>So the drop directory for a user is the attribute mailbox prepended > >>with "/mnt/vmail". I have putted for a user : > >> > >>mailbox = /opt/test > >> > >>But the mails always drop in /mnt/vmail/<domain>/<user without > >>domain> and not in /opt/test. me: > >You need to read and understand what virtual_mailbox_base is. It is > >an absolute limit for where virtual(8) can deliver mail. You can > >break that limit only if you hand off delivery to another delivery > >agent without the limit. > > > >http://www.postfix.org/postconf.5.html#virtual_mailbox_base > >http://www.postfix.org/virtual.8.html Hervé: > Thank you for your response. I've understood for the absolute > limit. But can you explain me what follows ? > > virtual_mailbox_base = /mnt/vmail --> this is ok so all my > mailboxes directory will be under this directory. > > But why for a user who has the following mail > "firstname.n...@isc84.org" the directory is > /mnt/vmail/isc84.org/firstname.name > > even if I have setted the field mailbox to "test/toto". I expected > to have /mnt/vmail/test/toto (under the absolute limit). Okay, it seems I misunderstood what you were originally asking. The answer to that question lies in your virtual_mailbox_maps query. If postmap -q firstname.n...@isc84.org ldap:/etc/postfix/ldap-accounts.cf returns "isc84.org/firstname.name/" (with or without the trailing slash depending on mbox/maildir choice), perhaps you hardcoded a "result_format = %d/%u/" in /etc/postfix/ldap-accounts.cf . http://www.postfix.org/LDAP_README.html http://www.postfix.org/ldap_table.5.html -- http://rob0.nodns4.us/ -- system administration and consulting Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: