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.

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

A simple workaround is to create a virtual alias pointing that 
address to a local(8) account or alias. So mydestination includes 
"localhost, localhost.$mydomain", and virtual_alias_maps has:

addr...@example.com     test@localhost

"test" can either be a system account or listed in alias_maps to 
deliver to the place you want.

The same idea can be done with other delivery agents you might 
choose.

The task of translation into LDAP is left to you.
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
  (Web address is blacked out, today only, 2012-01-18)

Reply via email to