ldap+cyrus+virtual_mailbox_maps :no mailbox associated

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

ldap+cyrus+virtual_mailbox_maps :no mailbox associated

dtouzeau
Dear

I have a problem with postfix understanding and "virtual_mailbox_maps"
parameter :

in my example i would like to send email to a local mailbox created has
"dtouzeau" from email [hidden email]
currently,  postfix want to send email to user.david^t instead dtouzeau
If i undertsand the virtual_mailbox_maps is in charge to specify postfix
where is the right mailbox name.
But in my case, it's not working.

the "virtual_mailbox_maps" LDAP filter is correct for me  
"(&(objectClass=userAccount)(mail=%s))" it return the "uid" attribute
has the real cyrus-imap mailbox name.
so for my example : [hidden email] ldap query return dtouzeau not david^t

what i missing ???

best regards

here is the error:
Sep  6 00:22:20 pc-touzeau postfix/smtpd[19859]: disconnect from
localhost[127.0.0.1]
Sep  6 00:22:20 pc-touzeau cyrus/master[20011]: about to exec
/usr/lib/cyrus/bin/lmtpd
Sep  6 00:22:20 pc-touzeau cyrus/lmtpunix[20011]: executed
Sep  6 00:22:20 pc-touzeau cyrus/lmtpunix[20011]: accepted connection
Sep  6 00:22:20 pc-touzeau cyrus/lmtpunix[20011]: lmtp connection
preauth'd as postman
Sep  6 00:22:20 pc-touzeau cyrus/lmtpunix[20011]:
verify_user(user.david^t) failed: Mailbox does not exist
Sep  6 00:22:20 pc-touzeau postfix/lmtp[20010]: 10E4C9009CC:
to=<[hidden email]>,
relay=pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp], delay=6.5,
delays=6.5/0.01/0.01/0.02, dsn=5.1.1, status=bounced (host
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp] said: 550-Mailbox
unknown.  Either there is no mailbox associated with this 550-name or
you do not have authorization to see it. 550 5.1.1 User unknown (in
reply to RCPT TO command))

here it is my settings.

mailbox_transport=lmtp:unix:/var/run/cyrus/socket/lmtp
virtual_transport=$mailbox_transport
virtual_alias_maps=ldap:VirtualAliasMapsTable
virtual_mailbox_maps=ldap:VirtualMailboxMapsTable
alias_maps=ldap:AliasMapsTable
local_recipient_maps=ldap:VirtualMailboxMapsTable
virtual_mailbox_base = /usr/local/virtual

#LDAP VirtualAliasMapsTable
--------------------------------------------------------------------
VirtualAliasMapsTable_server_host=127.0.0.1
VirtualAliasMapsTable_server_port =389
VirtualAliasMapsTable_bind = yes
VirtualAliasMapsTable_bind_dn =cn=Manager,dc=klf,dc=fr
VirtualAliasMapsTable_bind_pw =secret
VirtualAliasMapsTable_search_base =dc=klf,dc=fr
VirtualAliasMapsTable_timeout = 10
VirtualAliasMapsTable_query_filter
=(&(objectClass=userAccount)(mailAlias=%s))
VirtualAliasMapsTable_version =3
VirtualAliasMapsTable_result_attribute =mail


#LDAP VirtualMailboxMapsTable
--------------------------------------------------------------------
VirtualMailboxMapsTable_server_host=127.0.0.1
VirtualMailboxMapsTable_server_port =389
VirtualMailboxMapsTable_bind = yes
VirtualMailboxMapsTable_bind_dn =cn=Manager,dc=klf,dc=fr
VirtualMailboxMapsTable_bind_pw =secret
VirtualMailboxMapsTable_search_base =dc=klf,dc=fr
VirtualMailboxMapsTable_timeout = 10
VirtualMailboxMapsTable_query_filter =(&(objectClass=userAccount)(mail=%s))
VirtualMailboxMapsTable_version =3
VirtualMailboxMapsTable_result_attribute =uid

#LDAP AliasMapsTable
--------------------------------------------------------------------
AliasMapsTable_server_host=127.0.0.1
AliasMapsTable_server_port =389
AliasMapsTable_bind = yes
AliasMapsTable_bind_dn =cn=Manager,dc=klf,dc=fr
AliasMapsTable_bind_pw =secret
AliasMapsTable_search_base =dc=klf,dc=fr
AliasMapsTable_timeout = 10
AliasMapsTable_query_filter =(&(objectClass=userAccount)(uid=%u))
AliasMapsTable_version =3
AliasMapsTable_result_attribute =mail

here it is the export of user dtouzeau on LDAP:

dn: cn=dtouzeau,ou=klf,dc=klf,dc=fr
cn: dtouzeau
accountActive: TRUE
accountGroup: 10
homeDirectory: /home/dtouzeau
postalCode: 0000
postalAddress: none
mobile: 00.00.00.00.00
telephoneNumber: 00.00.00.00.00
mailDir: /home/dtouzeau/mail
objectClass: userAccount
objectClass: top
objectClass: ArticaSettings
objectClass: organizationalPerson
givenName: dtouzeau
sn: dtouzeau
displayName: dtouzeau
mail: [hidden email]
domainName: klf.fr
uid: dtouzeau


--
David Touzeau -------------------------- Linux Ubuntu 7.04 feisty
FreePascal-Lazarus,perl,delphi,php artica for postfix management console
(http://www.artica.fr) icq:160018849
Reply | Threaded
Open this post in threaded view
|

Re: ldap+cyrus+virtual_mailbox_maps :no mailbox associated

mouss-2
TOUZEAU DAVID wrote:
> Dear
>
> I have a problem with postfix understanding and "virtual_mailbox_maps"
> parameter :
>
> in my example i would like to send email to a local mailbox created has
> "dtouzeau" from email [hidden email]
> currently,  postfix want to send email to user.david^t instead dtouzeau

prove it ;-p just because cyrus says so isn't enough. postfx says
"to=<[hidden email]>".

> If i undertsand the virtual_mailbox_maps is in charge to specify postfix
> where is the right mailbox name.
> But in my case, it's not working.

the mailbox in virtual_mailbox_maps is only used when delivery is done
by virtual. you use cyrus for delivery, so the value is irrelevant.

>
> the "virtual_mailbox_maps" LDAP filter is correct for me  
> "(&(objectClass=userAccount)(mail=%s))" it return the "uid" attribute
> has the real cyrus-imap mailbox name.
> so for my example : [hidden email] ldap query return dtouzeau not david^t
>
> what i missing ???
>
> best regards
>
> here is the error:
> Sep  6 00:22:20 pc-touzeau postfix/smtpd[19859]: disconnect from
> localhost[127.0.0.1]
> Sep  6 00:22:20 pc-touzeau cyrus/master[20011]: about to exec
> /usr/lib/cyrus/bin/lmtpd
> Sep  6 00:22:20 pc-touzeau cyrus/lmtpunix[20011]: executed
> Sep  6 00:22:20 pc-touzeau cyrus/lmtpunix[20011]: accepted connection
> Sep  6 00:22:20 pc-touzeau cyrus/lmtpunix[20011]: lmtp connection
> preauth'd as postman
> Sep  6 00:22:20 pc-touzeau cyrus/lmtpunix[20011]:
> verify_user(user.david^t) failed: Mailbox does not exist
> Sep  6 00:22:20 pc-touzeau postfix/lmtp[20010]: 10E4C9009CC:
> to=<[hidden email]>,
> relay=pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp], delay=6.5,
> delays=6.5/0.01/0.01/0.02, dsn=5.1.1, status=bounced (host
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp] said: 550-Mailbox
> unknown.  Either there is no mailbox associated with this 550-name or
> you do not have authorization to see it. 550 5.1.1 User unknown (in
> reply to RCPT TO command))
>
> here it is my settings.
>

Reply | Threaded
Open this post in threaded view
|

Re: ldap+cyrus+virtual_mailbox_maps :no mailbox associated

dtouzeau
thanks mouss but in my mains.cf there is

mailbox_transport=lmtp:unix:/var/run/cyrus/socket/lmtp
virtual_transport=$mailbox_transport

so virtual transport is used for cyrus

in the lmtp log in verbose mode there is

Sep  6 10:55:03 pc-touzeau postfix/lmtp[19755]: send attr diag_type =
Sep  6 10:55:03 pc-touzeau postfix/lmtp[19755]: send attr diag_text =
Sep  6 10:55:03 pc-touzeau postfix/lmtp[19755]: send attr mta_type =
Sep  6 10:55:03 pc-touzeau postfix/lmtp[19755]: send attr mta_mname =
Sep  6 10:55:03 pc-touzeau postfix/lmtp[19755]: send attr action =
Sep  6 10:55:03 pc-touzeau postfix/lmtp[19755]: send attr reason =
Sep  6 10:55:03 pc-touzeau postfix/lmtp[19755]: send attr status = 0
Sep  6 10:55:03 pc-touzeau postfix/qmgr[17821]: ED9339009CC: removed
Sep  6 10:55:03 pc-touzeau postfix/lmtp[19755]: master_notify: status 1
Sep  6 10:55:03 pc-touzeau postfix/lmtp[19755]: connection closed
Sep  6 10:55:12 pc-touzeau postfix/smtpd[19647]: connect from
localhost[127.0.0.1]
Sep  6 10:55:12 pc-touzeau postfix/smtpd[19647]: 7E3489009CC:
client=localhost[127.0.0.1]
Sep  6 10:55:12 pc-touzeau postfix/cleanup[21672]: 7E3489009CC:
message-id=<[hidden email]>
Sep  6 10:55:18 pc-touzeau postfix/qmgr[17821]: 7E3489009CC:
from=<[hidden email]>, size=614, nrcpt=1 (queue active)
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: connection established
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: master_notify: status 0
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: deliver_request_initial:
send initial status
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: send attr status = 0
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: flags
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name: flags
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: 3
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: queue_name
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
queue_name
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value:
active
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: queue_id
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
queue_id
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value:
7E3489009CC
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: offset
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name: offset
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: 597
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: size
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name: size
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: 614
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: nexthop
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
nexthop
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value:
unix:/var/run/cyrus/socket/lmtp
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: encoding
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
encoding
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: (end)
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: sender
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name: sender
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value:
[hidden email]
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: envelope_id
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
envelope_id
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: (end)
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: ret_flags
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
ret_flags
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: 0
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: time
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name: time
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value:
cEXCSBS3BwB2RcJIedYJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: log_client_name
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
log_client_name
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value:
localhost
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: log_client_address
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
log_client_address
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value:
127.0.0.1
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: log_client_port
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
log_client_port
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: 50331
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: log_protocol_name
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
log_protocol_name
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: ESMTP
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: log_helo_name
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
log_helo_name
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value:
pc-touzeau.klf.fr
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: sasl_method
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
sasl_method
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: (end)
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: sasl_username
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
sasl_username
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: (end)
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: sasl_sender
Sep  6 10:55:18 pc-touzeau postfix/smtpd[19647]: disconnect from
localhost[127.0.0.1]
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
sasl_sender
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: (end)
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: rewrite_context
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
rewrite_context
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: local
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: recipient_count
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
recipient_count
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: 1
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: (list terminator)
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name: (end)
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: original_recipient
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
original_recipient
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value:
[hidden email]
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: recipient
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
recipient
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value:
[hidden email]
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: offset
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name: offset
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: 562
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: dsn_orig_rcpt
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
dsn_orig_rcpt
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value:
rfc822;[hidden email]
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: notify_flags
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name:
notify_flags
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute value: 0
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: lmtp socket: wanted
attribute: (list terminator)
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: input attribute name: (end)
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: deliver_request_get:
file active/7E3489009CC
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: deliver_message: from
[hidden email]
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: smtp_connect_unix:
trying: /var/run/cyrus/socket/lmtp...
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: global TLS level: none
Sep  6 10:55:18 pc-touzeau cyrus/lmtpunix[19756]: accepted connection
Sep  6 10:55:18 pc-touzeau cyrus/lmtpunix[19756]: lmtp connection
preauth'd as postman
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 220 pc-touzeau.klf.fr
LMTP Cyrus v2.2.13-Debian-2.2.13-13ubuntu3 ready
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: >
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: LHLO pc-touzeau.klf.fr
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250-pc-touzeau.klf.fr
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250-8BITMIME
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250-ENHANCEDSTATUSCODES
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250-PIPELINING
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250-SIZE
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250-AUTH EXTERNAL
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250 IGNOREQUOTA
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: server features: 0xf size 0
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: Using LMTP PIPELINING,
TCP send buffer size is 4096
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: >
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: MAIL
FROM:<[hidden email]> SIZE=614
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: >
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: RCPT TO:<[hidden email]>
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: >
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: DATA
Sep  6 10:55:18 pc-touzeau cyrus/lmtpunix[19756]:
verify_user(user.david^t) failed: Mailbox does not exist
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250 2.1.0 ok
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 550-Mailbox unknown.  
Either there is no mailbox associated with this
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 550-name or you do not
have authorization to see it.
Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 550 5.1.1 User unknown


mouss a écrit :

> TOUZEAU DAVID wrote:
>> Dear
>>
>> I have a problem with postfix understanding and
>> "virtual_mailbox_maps" parameter :
>>
>> in my example i would like to send email to a local mailbox created
>> has "dtouzeau" from email [hidden email]
>> currently,  postfix want to send email to user.david^t instead dtouzeau
>
> prove it ;-p just because cyrus says so isn't enough. postfx says
> "to=<[hidden email]>".
>
>> If i undertsand the virtual_mailbox_maps is in charge to specify
>> postfix where is the right mailbox name.
>> But in my case, it's not working.
>
> the mailbox in virtual_mailbox_maps is only used when delivery is done
> by virtual. you use cyrus for delivery, so the value is irrelevant.
>
>>
>> the "virtual_mailbox_maps" LDAP filter is correct for me  
>> "(&(objectClass=userAccount)(mail=%s))" it return the "uid" attribute
>> has the real cyrus-imap mailbox name.
>> so for my example : [hidden email] ldap query return dtouzeau not
>> david^t
>>
>> what i missing ???
>>
>> best regards
>>
>> here is the error:
>> Sep  6 00:22:20 pc-touzeau postfix/smtpd[19859]: disconnect from
>> localhost[127.0.0.1]
>> Sep  6 00:22:20 pc-touzeau cyrus/master[20011]: about to exec
>> /usr/lib/cyrus/bin/lmtpd
>> Sep  6 00:22:20 pc-touzeau cyrus/lmtpunix[20011]: executed
>> Sep  6 00:22:20 pc-touzeau cyrus/lmtpunix[20011]: accepted connection
>> Sep  6 00:22:20 pc-touzeau cyrus/lmtpunix[20011]: lmtp connection
>> preauth'd as postman
>> Sep  6 00:22:20 pc-touzeau cyrus/lmtpunix[20011]:
>> verify_user(user.david^t) failed: Mailbox does not exist
>> Sep  6 00:22:20 pc-touzeau postfix/lmtp[20010]: 10E4C9009CC:
>> to=<[hidden email]>,
>> relay=pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp], delay=6.5,
>> delays=6.5/0.01/0.01/0.02, dsn=5.1.1, status=bounced (host
>> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp] said: 550-Mailbox
>> unknown.  Either there is no mailbox associated with this 550-name or
>> you do not have authorization to see it. 550 5.1.1 User unknown (in
>> reply to RCPT TO command))
>>
>> here it is my settings.
>>
>
>
>

--
David Touzeau -------------------------- Linux Ubuntu 7.04 feisty
FreePascal-Lazarus,perl,delphi,php artica for postfix management console
(http://www.artica.fr) icq:160018849

Reply | Threaded
Open this post in threaded view
|

Re: ldap+cyrus+virtual_mailbox_maps :no mailbox associated

mouss-2
TOUZEAU DAVID wrote:
> thanks mouss but in my mains.cf there is
>
> mailbox_transport=lmtp:unix:/var/run/cyrus/socket/lmtp
> virtual_transport=$mailbox_transport
>

compare with
$ postconf -d virtual_transport
virtual_transport = virtual

> so virtual transport is used for cyrus
>

do you see any "postfix/virtual" in your logs?

since you have changed the virtual_transport, the mailbox pathnames in
virtual_mailbox_maps are not used. postfix talks LMTP to your cyrus, it
can't say "deliver this to /var/foo/bar/".

> in the lmtp log in verbose mode there is
>
> [snip]
> Sep  6 10:55:18 pc-touzeau cyrus/lmtpunix[19756]: lmtp connection
> preauth'd as postman
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 220 pc-touzeau.klf.fr
> LMTP Cyrus v2.2.13-Debian-2.2.13-13ubuntu3 ready
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: >
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: LHLO pc-touzeau.klf.fr
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250-pc-touzeau.klf.fr
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250-8BITMIME
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250-ENHANCEDSTATUSCODES
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250-PIPELINING
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250-SIZE
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250-AUTH EXTERNAL
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250 IGNOREQUOTA
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: server features: 0xf size 0
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: Using LMTP PIPELINING,
> TCP send buffer size is 4096
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: >
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: MAIL
> FROM:<[hidden email]> SIZE=614
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: >
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: RCPT TO:<[hidden email]>

so you see. postfix says "RCPT TO:<[hidden email]>".


> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: >
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: DATA
> Sep  6 10:55:18 pc-touzeau cyrus/lmtpunix[19756]:
> verify_user(user.david^t) failed: Mailbox does not exist

and cyrus doesn't like the recipient. (looks like the '.' became a '^'
in the log or maybe elsewhere?).

> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 250 2.1.0 ok
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 550-Mailbox unknown.  
> Either there is no mailbox associated with this
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 550-name or you do not
> have authorization to see it.
> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: <
> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: 550 5.1.1 User unknown
Reply | Threaded
Open this post in threaded view
|

Re: ldap+cyrus+virtual_mailbox_maps :no mailbox associated

Jorey Bump
mouss wrote, at 09/06/2008 05:12 AM:

> TOUZEAU DAVID wrote:
>> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: RCPT TO:<[hidden email]>
>
> so you see. postfix says "RCPT TO:<[hidden email]>".
>
>> Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: >
>> pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: DATA
>> Sep  6 10:55:18 pc-touzeau cyrus/lmtpunix[19756]:
>> verify_user(user.david^t) failed: Mailbox does not exist
>
> and cyrus doesn't like the recipient. (looks like the '.' became a '^'
> in the log or maybe elsewhere?).

By default, Cyrus IMAPd does not allow "." in user or folder names, and
will convert it to "^". Such recipient addresses can be supported by
using aliases that point to users without a "." in the name.

This is what the OP is trying to do, and needs Postfix to perform the
lookup via LDAP to make the translation. I don't use LDAP, but it looks
like it's time for postconf -n.
Reply | Threaded
Open this post in threaded view
|

Re: ldap+cyrus+virtual_mailbox_maps :no mailbox associated

dtouzeau
No the ^ is supported by cyrus... i i create a mailbox usr/david.t it's working.
the problem is to force postfix to lookup the LDAP database in order to find the right uid
[hidden email] as a real mailbox called dtouzeau has the uid in LDAP

here it is the postconf -n

address_verify_negative_cache = yes
address_verify_negative_expire_time = 3d
address_verify_negative_refresh_time = 3h
address_verify_poll_count = 3
address_verify_poll_delay = 3s
address_verify_positive_expire_time = 31d
address_verify_positive_refresh_time = 7d
address_verify_sender = double-bounce
bounce_notice_recipient = postmaster
bounce_queue_lifetime = 5d
bounce_service_name = bounce
bounce_size_limit = 50000
bounce_template_file = /etc/postfix/bounce.template.cf
config_directory = /etc/postfix
connection_cache_status_update_time = 600s
connection_cache_ttl_limit = 2s
default_destination_concurrency_limit = 20
default_destination_recipient_limit = 50
default_process_limit = 100
double_bounce_sender = double-bounce
header_address_token_limit = 10240
in_flow_delay = 1s
inet_interfaces = all
initial_destination_concurrency = 5
local_destination_concurrency_limit = 2
local_recipient_maps = ldap:VirtualMailboxMapsTable
mailbox_size_limit = 102400000
mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
maximal_backoff_time = 4000s
maximal_queue_lifetime = 5d
message_size_limit = 102400000
milter_command_timeout = 180
milter_connect_macros = j _ {daemon_name} {if_name} {if_addr}
milter_connect_timeout = 180
milter_content_timeout = 600
milter_default_action = accept
milter_helo_macros = {tls_version} {cipher} {cipher_bits} {cert_subject} {cert_issuer}
milter_mail_macros = i {auth_type} {auth_authen} {auth_ssf} {auth_author} {mail_mailer} {mail_host} {mail_addr} {client_addr}
milter_protocol = 3
milter_rcpt_macros = {rcpt_mailer} {rcpt_host} {rcpt_addr} {client_addr}
mime_nesting_limit = 100
minimal_backoff_time = 300s
mydestination = localhost,localhost.$mydomain,$myhostname
myhostname = pc-touzeau.klf.fr
mynetworks = 192.168.5.0/24, 192.168.1.0/24,127.0.0.1
qmgr_message_recipient_limit = 20000
qmgr_message_recipient_minimum = 10
queue_run_delay = 300s
recipient_canonical_maps = ldap:RecipientCanonicalTable
relay_domains = ldap:RelaisDomainsTable
relay_recipient_maps = ldap:RelaisRecipientTable
relayhost = localhost:24316
sender_canonical_maps = ldap:senderCanonicalTable
smtp_connect_timeout = 30s
smtp_connection_cache_on_demand = yes
smtp_connection_cache_time_limit = 2s
smtp_connection_reuse_time_limit = 300s
smtp_destination_concurrency_limit = $default_destination_concurrency_limit
smtp_helo_timeout = 300s
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = plain, login
smtp_sasl_password_maps = ldap:SmtpSaslPasswordMaps
smtp_sasl_security_options = noanonymous
smtp_sender_dependent_authentication = yes
smtp_tls_note_starttls_offer = no
smtp_tls_session_cache_database = btree:${queue_directory}/smtpd_tls_session_cache
smtp_use_tls = no
smtpd_client_connection_count_limit = 50
smtpd_client_connection_rate_limit = 0
smtpd_client_message_rate_limit = 0
smtpd_client_new_tls_session_rate_limit = 0
smtpd_client_recipient_rate_limit = 0
smtpd_error_sleep_time = 1s
smtpd_hard_error_limit = 20
smtpd_milters = unix:/var/run/milter-greylist/milter-greylist.sock unix:/var/run/spfmilter/spfmilter.sock unix:/var/run/kas-milter.socket unix:/var/spool/MIMEDefang/mimedefang.sock
smtpd_recipient_limit = 1000
smtpd_reject_unlisted_recipient = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_soft_error_limit = 10
smtpd_tls_ask_ccert = no
smtpd_tls_received_header = no
smtpd_tls_req_ccert = no
smtpd_tls_security_level = none
smtpd_tls_session_cache_timeout = 3600s
tls_random_exchange_name = /var/lib/postfix/prng
tls_random_source = dev:/dev/urandom
transport_maps = ldap:TransportMapsTable
undisclosed_recipients_header = To: undisclosed-recipients:;
virtual_alias_maps = ldap:VirtualAliasMapsTable,, ldap:VirtualMailManMaps,ldap:VirtualAliasMailingTable
virtual_gid_maps = static:5000
virtual_mailbox_base = /usr/local/virtual
virtual_mailbox_domains = ldap:mydestinationTable
virtual_mailbox_limit = 102400000
virtual_mailbox_maps = ldap:VirtualMailboxMapsTable
virtual_transport = $mailbox_transport
virtual_uid_maps = static:5000




Jorey Bump a écrit :
mouss wrote, at 09/06/2008 05:12 AM:
TOUZEAU DAVID wrote:
pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: RCPT TO:[hidden email]

so you see. postfix says "RCPT TO:[hidden email]".

Sep  6 10:55:18 pc-touzeau postfix/lmtp[19755]: > pc-touzeau.klf.fr[/var/run/cyrus/socket/lmtp]: DATA
Sep  6 10:55:18 pc-touzeau cyrus/lmtpunix[19756]: verify_user(user.david^t) failed: Mailbox does not exist

and cyrus doesn't like the recipient. (looks like the '.' became a '^' in the log or maybe elsewhere?).

By default, Cyrus IMAPd does not allow "." in user or folder names, and will convert it to "^". Such recipient addresses can be supported by using aliases that point to users without a "." in the name.

This is what the OP is trying to do, and needs Postfix to perform the lookup via LDAP to make the translation. I don't use LDAP, but it looks like it's time for postconf -n.



--
  • 01.41.39.04.42
  • 06.20.56.74.33
  • ICQ:160018849
  • Skype:dtouzeau
(Retrouvez sur ces sites des faqs, tutoriaux, Forums et liens de téléchargement de la gamme Buiness Optimal)

 





 

Reply | Threaded
Open this post in threaded view
|

Re: ldap+cyrus+virtual_mailbox_maps :no mailbox associated

mouss-2
TOUZEAU DAVID wrote:
> No the ^ is supported by cyrus... i i create a mailbox usr/david.t it's
> working.
> the problem is to force postfix to lookup the LDAP database in order to
> find the right uid
> [hidden email] as a real mailbox called dtouzeau has the uid in LDAP
>

postfix doesn't lookup the uid since it is not doing delivery in your
case. postfix passes the mail using LMTP. it doesn't care about the uid
or mailbox location.

you probably want virtual_alias_maps to map [hidden email] to
[hidden email] (assuming cyrus accepts this address).

Reply | Threaded
Open this post in threaded view
|

Re: ldap+cyrus+virtual_mailbox_maps :no mailbox associated

dtouzeau
Many thanks mouss,
I udnerstand.. better way is to create an alias... so ... for me the
case is closed

mouss a écrit :

> TOUZEAU DAVID wrote:
>> No the ^ is supported by cyrus... i i create a mailbox usr/david.t
>> it's working.
>> the problem is to force postfix to lookup the LDAP database in order
>> to find the right uid
>> [hidden email] as a real mailbox called dtouzeau has the uid in LDAP
>>
>
> postfix doesn't lookup the uid since it is not doing delivery in your
> case. postfix passes the mail using LMTP. it doesn't care about the
> uid or mailbox location.
>
> you probably want virtual_alias_maps to map [hidden email] to
> [hidden email] (assuming cyrus accepts this address).
>
>
>

--
David Touzeau -------------------------- Linux Ubuntu 7.04 feisty
FreePascal-Lazarus,perl,delphi,php artica for postfix management console
(http://www.artica.fr) icq:160018849