Le 28 juin 2013 à 11:44, Gilles Chehade <[email protected]> a écrit :
> On Fri, Jun 28, 2013 at 11:38:29AM +0200, Joel Carnat wrote:
<snip>
>> /etc/mail/smtpd.conf.local
>>  lan_addr = "192.168.0.218"
>>  listen on $lan_addr
>>  table ldap ldap:/etc/mail/ldapd.conf
>>  accept for domain "tumfatig.net" alias <ldap> deliver to maildir 
>> "/home/vmail/%{rcpt.domain}/%{rcpt.user}/"
>>  accept for any relay
<snip>
> either use a virtual mapping, since that will use the full email address
> as the key, or extend the backend to support expansion so that you can
> use %{rcpt} instead of %s

OK, so the configuration line now goes
  accept for domain "tumfatig.net" virtual <ldap> deliver to maildir 
"/home/vmail/%{rcpt.domain}/%{rcpt.user}/"
And the "postmaster" alias is now resolved and delivered (to an external 
domain/user name). YeePee !!! :D

BUT :)
I also have accounts on this domain for which I want to deliver mail directly.
For them, the LDAP filter and field are different than for aliases. I have 
tried using "credentials_filter" and "userinfo_filter" but this doesn't seem to 
do what I want.
  # Aliases
  alias_filter            (&(mail=%s)(objectClass=CourierMailAlias))
  alias_attributes        maildrop
  # Account
  userinfo_filter         (&(mail=%s)(objectClass=CourierMailAccount))
  userinfo_attributes     mailbox

According to smtpd log, it only looks for objectClass=CourierMailAlias using 
full mail, then username, then domain name, then '@'.

What is the way to tell opensmtpd to ?
- first, try to find an alias using "(&(mail=%s)(objectClass=CourierMailAlias))"
- then, try to find an account using 
"(&(mail=%s)(objectClass=CourierMailAccount))"

Thanks for help.
--
You received this email because you are subscribed to mailing list: 
[email protected]
To unsubscribe, send mail with subject:
        [[email protected]] unregister

Reply via email to