Re: [sendmail] lmtp, cyrusv2d, shared folders and case

2009-04-04 Thread Clement Hermann (nodens)
Andrzej Adam Filip a écrit :
 nodens2099 nodens2...@gmail.com wrote:

 ./socketmapClient.pl unix:/var/run/cyrus/socket/smmap cyrus
 +Hosting/ab...@domain.com
 +Hosting/ab...@domain.com = OK +Hosting/ab...@domain.com

 So socketmap daemon works as expected.
 
 Sendmail's maps traditionally turn looked up key into lowercase.
 It can be (usually) turned off by adding -f switch to map definition.
 [ I have reported missing -f in socket as bug myself :-) ]
 

Thanks ! It works now that I have added the -f swith to Kcyrus in
mrs_cyrus m4.



-- 
Clement Hermann (nodens)
- L'air pur ? c'est pas en RL, ça ? c'est pas hors charte ?
Jean in L'Histoire des Pingouins, http://tnemeth.free.fr/fmbl/linuxsf/

Vous trouverez ma clef publique sur le serveur public pgp.mit.edu.
Please find my public key on the public keyserver pgp.mit.edu.

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: [sendmail] lmtp, cyrusv2d, shared folders and case

2009-04-03 Thread Andrzej Adam Filip
nodens2099 nodens2...@gmail.com wrote:

 Andrzej Adam Filip a écrit :
 nodens2099 nodens2...@gmail.com wrote:
 
 Andrzej Adam Filip a écrit :
 Does smmap return unknown user *even for lowercase folders*?

 Nope, you're right. the real problem is on the mrs check, then. 
 It can use only what smmap provides.
 Are you ready to ask for changed in Cyrus' smmap to make it capable to
 check Public folders availability?

 mrs_cyrus_mailertable may be changed to check validity of mailbox folder
 its own list of valid folders.

 This is already what I'm doing with ldap. There is no need to add
 another database, which would have to be maintained as the public folder
 list change, IMO.
 
 OK - smmap map be needless for LDAP centric configuration.
 
 I actually took a look at the smmapd code, and it uses the
 lmtp_downcase_rcpt value to know whether the recipient should be
 converted to downcase or not.
 According to the code, it convert the user part only, and has a special
 case for shared folder, so it should be ok.

 Do you know a way to test smmapd manually ?
 
 There are simple socket map client and server perl scripts in contrib
 directory of sendmail distribution.
 

 I made some more test. The problem is definitely in the cyrus map.

 real mailbox name : Hosting/ab...@domain.com

 sendmail -d -bt
 cut meaningless debug info
 ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
 Enter ruleset address
 /map cyrus +Hosting/ab...@domain.com
 map_lookup: cyrus (+Hosting/ab...@domain.com) no match (68)

 (creating hosting/ab...@domain.com, that is the same folder but in
 lowercase)
 /map cyrus +Hosting/ab...@domain.com
 map_lookup: cyrus (+Hosting/ab...@domain.com)
 map_rewrite(+hosting/ab...@domain.com), av =
 +Hosting/ab...@domain.com
 map_rewrite = +hosting/ab...@domain.comOK
 returns +hosting/ab...@domain.comOK (0)

 socketmapClient.pl :

 ./socketmapClient.pl unix:/var/run/cyrus/socket/smmap cyrus
 +Hosting/ab...@domain.com
 +Hosting/ab...@domain.com = OK +Hosting/ab...@domain.com

 So socketmap daemon works as expected.

Sendmail's maps traditionally turn looked up key into lowercase.
It can be (usually) turned off by adding -f switch to map definition.
[ I have reported missing -f in socket as bug myself :-) ]

-- 
[plen: Andrew] Andrzej Adam Filip : a...@onet.eu
It is common sense to take a method and try it.  If it fails,
admit it frankly and try another.  But above all, try something.
  -- Franklin D. Roosevelt

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: [sendmail] lmtp, cyrusv2d, shared folders and case

2009-04-02 Thread nodens2099
Andrzej Adam Filip a écrit :
 nodens2099 nodens2...@gmail.com wrote:

   
 I tried setting
 lmtp_downcase_rcpt: 0
 in imapd.conf, adding the u flag to the cyrusv2d mailer, but to no avail.

 the +part is always converted to lower case.
 

 Post your cyrusv2d definition from sendmail.cf.
   echo '=M' | sendmail -bt | grep cyrusv2d

 Does it contain F=u flag?

   
Yes, but only once I added the F=u flag to the m4 file
(MODIFY_MAILER_FLAGS(`cyrusv2d', `+u') in the sendmail.mc didn't work).

mailer 4 (cyrusv2d): P=[IPC] S=EnvFromSMTP/HdrFromL
R=EnvToSMTP/EnvToSMTP M=0 U=-1:-1 F=1DFMXlmnqsuz L=0 E=\r\n
T=DNS/RFC822/SMTP r=100 A=FILE /var/run/cyrus/socket/lmtp

Thanks !

 By default sendmail's mailers convert user part of recipient address to
 lowercase. F=u flag stops it. 
 *BUT* it would apply to normal recipients *too*.

   
That whas my understanding as well.
but it's ok, since lmtp_downcase_rcpt: yes takes care of the username part.

 initially I tried using the mrs_cyrus_mailertable approach but it was even
 worse, as checking +folder/subfol...@domaine.tld with smmap returns unknown
 user, even when the folder exists and has the p acl.
 

 Does smmap return unknown user *even for lowercase folders*?

   
Nope, you're right. the real problem is on the mrs check, then. If I
create a lowerrcase folder along the mixed cased one, the mail is
received in the correct folder (that is, the mixed case).

 Any clue ?

 I'd really like to avoid converting all existing folders to lower case of
 possible, it would be painful.
 

 It merely a matter of choosing a simple way you like anyway :-)

 BTW
 Why have not you tried RTCyrus3 recipe?
 [ It would require small patching too to meet your requirements ]


   
Actually, I was adding a new backend in an existing murder environment,
migrating existing users and public folders from MS Exchange server.
Since rtcyrusv2 just works in the existing environment, I didn't even
check if there was an update. I saw about RTCyrus3 only when searching a
solution to my public folder problem.

if it can resolve the mrs_cyrus_mailertable problem, and if it's not too
difficult to upgrade rtcyrus2 with it, I'm willing to give it a try.

Regards,

-- 
Clément Hermann (nodens)

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: [sendmail] lmtp, cyrusv2d, shared folders and case

2009-04-02 Thread nodens2099
Andrzej Adam Filip a écrit :
 Does smmap return unknown user *even for lowercase folders*?

 Nope, you're right. the real problem is on the mrs check, then. 
 
 It can use only what smmap provides.
 Are you ready to ask for changed in Cyrus' smmap to make it capable to
 check Public folders availability?
 
 mrs_cyrus_mailertable may be changed to check validity of mailbox folder
 its own list of valid folders.
 
This is already what I'm doing with ldap. There is no need to add
another database, which would have to be maintained as the public folder
list change, IMO.

I actually took a look at the smmapd code, and it uses the
lmtp_downcase_rcpt value to know whether the recipient should be
converted to downcase or not.
According to the code, it convert the user part only, and has a special
case for shared folder, so it should be ok.

Do you know a way to test smmapd manually ?


 if it can resolve the mrs_cyrus_mailertable problem, and if it's not too
 difficult to upgrade rtcyrus2 with it, I'm willing to give it a try.
 
 It can be fixed but you should decide which path do you want do go:
 a) Cyrus smmap can tell if public folders is accessible
 b) sendmail uses its own list of valid publicly accessible Cyrus public 
 folders
 

the a) is definitely the way to go.

-- 
Clément Hermann (nodens)

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: [sendmail] lmtp, cyrusv2d, shared folders and case

2009-04-02 Thread Andrzej Adam Filip
nodens2099 nodens2...@gmail.com wrote:

 Andrzej Adam Filip a écrit :
 nodens2099 nodens2...@gmail.com wrote:

   
 I tried setting
 lmtp_downcase_rcpt: 0
 in imapd.conf, adding the u flag to the cyrusv2d mailer, but to no avail.

 the +part is always converted to lower case.
 

 Post your cyrusv2d definition from sendmail.cf.
   echo '=M' | sendmail -bt | grep cyrusv2d

 Does it contain F=u flag?
   
 Yes, but only once I added the F=u flag to the m4 file
 (MODIFY_MAILER_FLAGS(`cyrusv2d', `+u') in the sendmail.mc didn't work).

 mailer 4 (cyrusv2d): P=[IPC] S=EnvFromSMTP/HdrFromL
 R=EnvToSMTP/EnvToSMTP M=0 U=-1:-1 F=1DFMXlmnqsuz L=0 E=\r\n
 T=DNS/RFC822/SMTP r=100 A=FILE /var/run/cyrus/socket/lmtp

 Thanks !

 By default sendmail's mailers convert user part of recipient address to
 lowercase. F=u flag stops it. 
 *BUT* it would apply to normal recipients *too*.
   
 That whas my understanding as well.
 but it's ok, since lmtp_downcase_rcpt: yes takes care of the username part.

 initially I tried using the mrs_cyrus_mailertable approach but it was even
 worse, as checking +folder/subfol...@domaine.tld with smmap returns unknown
 user, even when the folder exists and has the p acl. 

 Does smmap return unknown user *even for lowercase folders*?

 Nope, you're right. the real problem is on the mrs check, then. 

It can use only what smmap provides.
Are you ready to ask for changed in Cyrus' smmap to make it capable to
check Public folders availability?

mrs_cyrus_mailertable may be changed to check validity of mailbox folder
its own list of valid folders.

 If I create a lowerrcase folder along the mixed cased one, the mail is
 received in the correct folder (that is, the mixed case).

 Any clue ?

 I'd really like to avoid converting all existing folders to lower case of
 possible, it would be painful.
 

 It merely a matter of choosing a simple way you like anyway :-)

 BTW
 Why have not you tried RTCyrus3 recipe?
 [ It would require small patching too to meet your requirements ]

 Actually, I was adding a new backend in an existing murder environment,
 migrating existing users and public folders from MS Exchange server.
 Since rtcyrusv2 just works in the existing environment, I didn't even
 check if there was an update. I saw about RTCyrus3 only when searching a
 solution to my public folder problem.

 if it can resolve the mrs_cyrus_mailertable problem, and if it's not too
 difficult to upgrade rtcyrus2 with it, I'm willing to give it a try.

It can be fixed but you should decide which path do you want do go:
a) Cyrus smmap can tell if public folders is accessible
b) sendmail uses its own list of valid publicly accessible Cyrus public folders

-- 
[plen: Andrew] Andrzej Adam Filip : a...@onet.eu
She's the kind of girl who climbed the ladder of success wrong by wrong.
  -- Mae West

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: [sendmail] lmtp, cyrusv2d, shared folders and case

2009-04-02 Thread Andrzej Adam Filip
nodens2099 nodens2...@gmail.com wrote:

 Andrzej Adam Filip a écrit :
 Does smmap return unknown user *even for lowercase folders*?

 Nope, you're right. the real problem is on the mrs check, then. 
 
 It can use only what smmap provides.
 Are you ready to ask for changed in Cyrus' smmap to make it capable to
 check Public folders availability?
 
 mrs_cyrus_mailertable may be changed to check validity of mailbox folder
 its own list of valid folders.
 
 This is already what I'm doing with ldap. There is no need to add
 another database, which would have to be maintained as the public folder
 list change, IMO.

OK - smmap map be needless for LDAP centric configuration.

 I actually took a look at the smmapd code, and it uses the
 lmtp_downcase_rcpt value to know whether the recipient should be
 converted to downcase or not.
 According to the code, it convert the user part only, and has a special
 case for shared folder, so it should be ok.

 Do you know a way to test smmapd manually ?

There are simple socket map client and server perl scripts in contrib
directory of sendmail distribution.

 if it can resolve the mrs_cyrus_mailertable problem, and if it's not too
 difficult to upgrade rtcyrus2 with it, I'm willing to give it a try.
 
 It can be fixed but you should decide which path do you want do go:
 a) Cyrus smmap can tell if public folders is accessible
 b) sendmail uses its own list of valid publicly accessible Cyrus public 
 folders

 the a) is definitely the way to go.

I patch only sendmail.cf :-)

-- 
[plen: Andrew] Andrzej Adam Filip : a...@onet.eu
Woman inspires us to great things, and prevents us from achieving them.
  -- Dumas

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

sendmail, lmtp, cyrusv2d, shared folders and case

2009-04-01 Thread nodens2099
Hi,

I'm trying to send mail directly to a shared folder, via the
plus-addressing syntax.

My user entry redirect to +Folder/subfol...@domain.tld .

cyrusv2d mailer is called via the mailertable.

The ACL are ok.

It would work with a folder in lower case, but not if the folder
includes upper case characters.

I thought it was ok to have upper case after the + in the local part of
the address ?

I tried setting
lmtp_downcase_rcpt: 0
in imapd.conf, adding the u flag to the cyrusv2d mailer, but to no avail.

the +part is always converted to lower case.

initially I tried using the mrs_cyrus_mailertable approach but it was
even worse, as checking +folder/subfol...@domaine.tld with smmap returns
unknown user, even when the folder exists and has the p acl.

Any clue ?

I'd really like to avoid converting all existing folders to lower case
of possible, it would be painful.

Best regards,

-- 
Clément Hermann (nodens)




Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: [sendmail] lmtp, cyrusv2d, shared folders and case

2009-04-01 Thread Andrzej Adam Filip
nodens2099 nodens2...@gmail.com wrote:

 I'm trying to send mail directly to a shared folder, via the plus-addressing
 syntax.

 My user entry redirect to +Folder/subfol...@domain.tld .

 cyrusv2d mailer is called via the mailertable.

 The ACL are ok.

 It would work with a folder in lower case, but not if the folder includes 
 upper
 case characters.

 I thought it was ok to have upper case after the + in the local part of the
 address ?

 I tried setting
 lmtp_downcase_rcpt: 0
 in imapd.conf, adding the u flag to the cyrusv2d mailer, but to no avail.

 the +part is always converted to lower case.

Post your cyrusv2d definition from sendmail.cf.
  echo '=M' | sendmail -bt | grep cyrusv2d

Does it contain F=u flag?

By default sendmail's mailers convert user part of recipient address to
lowercase. F=u flag stops it. 
*BUT* it would apply to normal recipients *too*.

 initially I tried using the mrs_cyrus_mailertable approach but it was even
 worse, as checking +folder/subfol...@domaine.tld with smmap returns unknown
 user, even when the folder exists and has the p acl.

Does smmap return unknown user *even for lowercase folders*?

 Any clue ?

 I'd really like to avoid converting all existing folders to lower case of
 possible, it would be painful.

It merely a matter of choosing a simple way you like anyway :-)

BTW
Why have not you tried RTCyrus3 recipe?
[ It would require small patching too to meet your requirements ]


-- 
[plen: Andrew] Andrzej Adam Filip : a...@onet.eu
To err is human,
To purr feline.
  -- Robert Byrne

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html