Re: [Dovecot] Help please- Post - Login Script--- Migration

2009-06-03 Thread Ashraf
Thanks Seth. It works really appreciate your help. Well done.

2009/6/3 Ashraf 

> Cheers will try Thanks for your help really appreciate.
>
> 2009/6/2 Seth Mattinen 
>
>> Ashraf wrote:
>>
>> > Seth,  I have tried to use most of them but whichever i use its creating
>> a
>> > folder and then its creating the dovecot-uidlist and rest of the files.
>> > please advice.
>> >
>>
>> The variable ${HOME} - in your script, not in the mail_executable
>> setting - should give you what you want.
>>
>> ~Seth
>>
>
>
>
> --
> Regards
> Ashraf
>



-- 
Regards
Ashraf


Re: [Dovecot] Help please- Post - Login Script--- Migration

2009-06-03 Thread Ashraf
Cheers will try Thanks for your help really appreciate.

2009/6/2 Seth Mattinen 

> Ashraf wrote:
> > Seth,  I have tried to use most of them but whichever i use its creating
> a
> > folder and then its creating the dovecot-uidlist and rest of the files.
> > please advice.
> >
>
> The variable ${HOME} - in your script, not in the mail_executable
> setting - should give you what you want.
>
> ~Seth
>



-- 
Regards
Ashraf


Re: [Dovecot] Help please- Post - Login Script--- Migration

2009-06-02 Thread Seth Mattinen
Ashraf wrote:
> Seth,  I have tried to use most of them but whichever i use its creating a
> folder and then its creating the dovecot-uidlist and rest of the files.
> please advice.
> 

The variable ${HOME} - in your script, not in the mail_executable
setting - should give you what you want.

~Seth


Re: [Dovecot] Help please- Post - Login Script--- Migration

2009-06-02 Thread Ashraf
Seth,  I have tried to use most of them but whichever i use its creating a
folder and then its creating the dovecot-uidlist and rest of the files.
please advice.



2009/6/2 Seth Mattinen 

> Ashraf wrote:
> > Once the script is executed its executing the binary as a last step.
> > Reference http://wiki.dovecot.org/Migration/Courier
> >
> >  You can also convert each user as they log in for the first time, using
> > PostLoginScripting  with a
> > script something like:
> >
> > #!/bin/sh
> > # WARNING: Be sure to use mail_drop_priv_before_exec=yes,
> > # otherwise the files are created as root!
> >
> > courier-dovecot-migrate.pl --quiet --to-dovecot --convert ~/Maildir
> > # This is for imap, create a similar script for pop3 too
> > exec /usr/local/libexec/dovecot/imap
> >
> > in place of ~/Maildir i want to pass the home directory of users which is
> > passed as mail variable (Query from MySql).
> >
> > Appreciate your response.
> >
>
> According to those links you need to use the various environment
> variables. Why have you chosen not to do that?
>
> ~Seth
>



-- 
Regards
Ashraf


Re: [Dovecot] Help please- Post - Login Script--- Migration

2009-06-02 Thread Seth Mattinen
Ashraf wrote:
> Once the script is executed its executing the binary as a last step.
> Reference http://wiki.dovecot.org/Migration/Courier
> 
>  You can also convert each user as they log in for the first time, using
> PostLoginScripting  with a
> script something like:
> 
> #!/bin/sh
> # WARNING: Be sure to use mail_drop_priv_before_exec=yes,
> # otherwise the files are created as root!
> 
> courier-dovecot-migrate.pl --quiet --to-dovecot --convert ~/Maildir
> # This is for imap, create a similar script for pop3 too
> exec /usr/local/libexec/dovecot/imap
> 
> in place of ~/Maildir i want to pass the home directory of users which is
> passed as mail variable (Query from MySql).
> 
> Appreciate your response.
> 

According to those links you need to use the various environment
variables. Why have you chosen not to do that?

~Seth


Re: [Dovecot] Help please- Post - Login Script--- Migration

2009-06-02 Thread Ashraf
Once the script is executed its executing the binary as a last step.
Reference http://wiki.dovecot.org/Migration/Courier

 You can also convert each user as they log in for the first time, using
PostLoginScripting  with a
script something like:

#!/bin/sh
# WARNING: Be sure to use mail_drop_priv_before_exec=yes,
# otherwise the files are created as root!

courier-dovecot-migrate.pl --quiet --to-dovecot --convert ~/Maildir
# This is for imap, create a similar script for pop3 too
exec /usr/local/libexec/dovecot/imap

in place of ~/Maildir i want to pass the home directory of users which is
passed as mail variable (Query from MySql).

Appreciate your response.



2009/6/2 Seth Mattinen 

> Ashraf wrote:
> > Hi all
> >   I am in the process of migrating Courier to Dovecot, am using
> > courier-dovecot-migrate.pl<
> http://www.dovecot.org/tools/courier-dovecot-migrate.pl>it
> > works fine. I want to migrate each user as they login using post-login
> > script (As i have huge no of users). We are using NFS storage,  users are
> > authenticated using mysql, User home directories as passed using variable
> > mail ( usign mysql query).
> >
> >I am trying to execute postlogin script which does the conversion but
> > unable to pass the user home directories .
> >
> >
> > --*/etc/dovecot.conf
> >
> > mail_executable = /usr/libexec/dovecot/postloginscript.sh %h
> > ---*
> > %h   for home directory.
> >
> >
> > ---*postloginscript.sh
> >
> > #!/bin/sh
> > /usr/libexec/dovecot/courier-dovecot-migrate.pl --quiet --to-dovecot
> > --recursive --convert $1
> > # This is for  pop3
> > exec /usr/libexec/dovecot/pop3
> > *
> >
> >
> > When i pass %h as argument its creating  "%h" directory and writing
> > dovecot-uidlist and rest the files in %h directory. Its not interpreting
> the
> > %h and not passing the home directory. Its just passing as it is.
> >
>
>
> I could be wrong, but I don't think you can do that. The mail_executable
> setting is for the location of the binary.
>
> ~Seth
>



-- 
Regards
Ashraf


Re: [Dovecot] Help please- Post - Login Script--- Migration

2009-06-02 Thread Seth Mattinen
Ashraf wrote:
> Hi all
>   I am in the process of migrating Courier to Dovecot, am using
> courier-dovecot-migrate.plit
> works fine. I want to migrate each user as they login using post-login
> script (As i have huge no of users). We are using NFS storage,  users are
> authenticated using mysql, User home directories as passed using variable
> mail ( usign mysql query).
> 
>I am trying to execute postlogin script which does the conversion but
> unable to pass the user home directories .
> 
> 
> --*/etc/dovecot.conf
> 
> mail_executable = /usr/libexec/dovecot/postloginscript.sh %h
> ---*
> %h   for home directory.
> 
> 
> ---*postloginscript.sh
> 
> #!/bin/sh
> /usr/libexec/dovecot/courier-dovecot-migrate.pl --quiet --to-dovecot
> --recursive --convert $1
> # This is for  pop3
> exec /usr/libexec/dovecot/pop3
> *
> 
> 
> When i pass %h as argument its creating  "%h" directory and writing
> dovecot-uidlist and rest the files in %h directory. Its not interpreting the
> %h and not passing the home directory. Its just passing as it is.
> 


I could be wrong, but I don't think you can do that. The mail_executable
setting is for the location of the binary.

~Seth


[Dovecot] Help please- Post - Login Script--- Migration

2009-06-02 Thread Ashraf
Hi all
  I am in the process of migrating Courier to Dovecot, am using
courier-dovecot-migrate.plit
works fine. I want to migrate each user as they login using post-login
script (As i have huge no of users). We are using NFS storage,  users are
authenticated using mysql, User home directories as passed using variable
mail ( usign mysql query).

   I am trying to execute postlogin script which does the conversion but
unable to pass the user home directories .


--*/etc/dovecot.conf

mail_executable = /usr/libexec/dovecot/postloginscript.sh %h
---*
%h   for home directory.


---*postloginscript.sh

#!/bin/sh
/usr/libexec/dovecot/courier-dovecot-migrate.pl --quiet --to-dovecot
--recursive --convert $1
# This is for  pop3
exec /usr/libexec/dovecot/pop3
*


When i pass %h as argument its creating  "%h" directory and writing
dovecot-uidlist and rest the files in %h directory. Its not interpreting the
%h and not passing the home directory. Its just passing as it is.

Hope i am clear in articulating my problem. Please help.

-- 
Regards
Ash