You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Athar Shiraz Siddiqui <at...@gmail.com> on 2008/05/22 16:53:14 UTC

How to Programmatically Create An Email Account

I would like to create an email account without "Telnet"ing into a console
i.e. programmatic ally.

How would I do that ?

Re: How to Programmatically Create An Email Account

Posted by James D Carroll <ja...@gmail.com>.
Athar Shiraz Siddiqui wrote:
> I would like to create an email account without "Telnet"ing into a console
> i.e. programmatic ally.
>
> How would I do that ?
>
>   
Perhaps taking a look at how some other folks have already done it would 
help:

http://sourceforge.net/projects/yajamesmanager/

http://sourceforge.net/projects/ajaconsole/

Both list themselves as web based admin consoles to JAMES (one "Stable", 
one "Beta"), so they may have some insights for you.



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: How to Programmatically Create An Email Account

Posted by Stefano Bagnara <ap...@bago.org>.
Athar Shiraz Siddiqui ha scritto:
> Yes I would like to know the same thing if someone were nice enough to
> put it in tutorial form as in a blog that would be sweet.
> 
> 
> Regarding the links provided :
> 
>>> There are also many other ways, a few are described here.
> 
> Indeed ; although I ma finding it hard to discover an answer here ;
> and most people are hard pushed to provide one; by the looks of it
> this  ought to be in the faq but its not.

Generally speaking I suggest you a google search on apache.org:
http://www.google.it/search?hl=en&safe=off&q=james+programmatically+add+users+site%3Aapache.org&btnG=Search&meta=

You basically add your keywords, "james" and "site:apache.org".

I just tried it and I think the first 3 results are interesting to you.

>>> http://markmail.org/message/fx43xflhh4mpskgc
> 
> 1) could use the RemoteManager commands (adduser, deluser) programmatically.
> see: http://james.apache.org/adding_users_2_1.html  (LINK NOT WORKING!!!)

http://james.apache.org/server/2.3.1/adding_users.html

>>> http://markmail.org/message/q4fvcypw47vhypzw
> 
> 1) org.apache.mailet.UsersRepository (but not clear how)
> 2) JMX
> 3) telnet

To get an UsersRepository instance you have to be inside Phoenix (our 
container) and configure your component to lookup the ServiceManager or 
make your component an Avalon component. I warn you this is not so easy 
if you don't know Avalon.

>>> http://markmail.org/message/fjtdpizxhs3mbxw3
> 
> mentions writing to some db but not clear which one?  does james run a db?

If you configure JAMES to use "db" for the usersrepository, yes, it 
stores users in the db. Otherwise it stores users in files.

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: How to Programmatically Create An Email Account

Posted by Athar Shiraz Siddiqui <at...@gmail.com>.
Yes I would like to know the same thing if someone were nice enough to
put it in tutorial form as in a blog that would be sweet.


Regarding the links provided :

>> There are also many other ways, a few are described here.

Indeed ; although I ma finding it hard to discover an answer here ;
and most people are hard pushed to provide one; by the looks of it
this  ought to be in the faq but its not.

>> http://markmail.org/message/fx43xflhh4mpskgc

1) could use the RemoteManager commands (adduser, deluser) programmatically.
see: http://james.apache.org/adding_users_2_1.html  (LINK NOT WORKING!!!)


>> http://markmail.org/message/q4fvcypw47vhypzw

1) org.apache.mailet.UsersRepository (but not clear how)
2) JMX
3) telnet

>> http://markmail.org/message/fjtdpizxhs3mbxw3

mentions writing to some db but not clear which one?  does james run a db?

>> http://markmail.org/message/lgj7mmxc3252fspi

(ant script? how would I integrate it with an RubyOnRails web application?)
MBeans? not helpful nor easy.

>> http://markmail.org/message/duklfz6iv43isx5x

(not helpful)


On Thu, May 22, 2008 at 10:33 PM,  <vi...@gmail.com> wrote:
> Can any buddy tell me , How to use database in backend.
>
> Vineet
>
> On 5/22/08, Bernd Fondermann <be...@googlemail.com> wrote:
>> On Thu, May 22, 2008 at 6:16 PM, Athar Shiraz Siddiqui
>> <at...@gmail.com> wrote:
>>> Where is this james_users table?
>>
>> In the database, in case you are using a database backend for James,
>> like many users do.
>>
>>> Do you understand my question Sir?
>>
>> I think we do - yes, we do. Pretty frequently asked question this is.
>>
>>> When one logs into the console: telnet localhost:4555
>>> one can just type "add test test" (for adding of a test user with password
>>> test).
>>> I would like to do this programmatically; What is the easiest way of doing
>>> this programmatically?
>>
>> In case you are using a database backend, the easiest way is to write
>> a program against the database, as Sebastion pointed out.
>>
>>
>> Don't know what you find is the easiest, though.
>>
>>  Bernd
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: How to Programmatically Create An Email Account

Posted by vi...@gmail.com.
Can any buddy tell me , How to use database in backend.

Vineet

On 5/22/08, Bernd Fondermann <be...@googlemail.com> wrote:
> On Thu, May 22, 2008 at 6:16 PM, Athar Shiraz Siddiqui
> <at...@gmail.com> wrote:
>> Where is this james_users table?
>
> In the database, in case you are using a database backend for James,
> like many users do.
>
>> Do you understand my question Sir?
>
> I think we do - yes, we do. Pretty frequently asked question this is.
>
>> When one logs into the console: telnet localhost:4555
>> one can just type "add test test" (for adding of a test user with password
>> test).
>> I would like to do this programmatically; What is the easiest way of doing
>> this programmatically?
>
> In case you are using a database backend, the easiest way is to write
> a program against the database, as Sebastion pointed out.
>
> There are also many other ways, a few are described here.
>
> http://markmail.org/message/fx43xflhh4mpskgc
> http://markmail.org/message/q4fvcypw47vhypzw
> http://markmail.org/message/fjtdpizxhs3mbxw3
> http://markmail.org/message/lgj7mmxc3252fspi
> http://markmail.org/message/duklfz6iv43isx5x
>
> Don't know what you find is the easiest, though.
>
>  Bernd
>
>> On Thu, May 22, 2008 at 11:27 AM, Sebastian Steinhauer <
>> steini@kieselsteini.de> wrote:
>>
>>>
>>> Am 22.05.2008 um 16:53 schrieb Athar Shiraz Siddiqui:
>>>
>>>> I would like to create an email account without "Telnet"ing into a
>>>> console
>>>> i.e. programmatic ally.
>>>>
>>>> How would I do that ?
>>>>
>>>
>>> If the users are stored in a database, just add a new entry in the
>>> james_users table. Thats it.
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>


-- 
Thanks & Regards,

Vineet Shrivastava

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: How to Programmatically Create An Email Account

Posted by Bernd Fondermann <be...@googlemail.com>.
On Thu, May 22, 2008 at 6:16 PM, Athar Shiraz Siddiqui
<at...@gmail.com> wrote:
> Where is this james_users table?

In the database, in case you are using a database backend for James,
like many users do.

> Do you understand my question Sir?

I think we do - yes, we do. Pretty frequently asked question this is.

> When one logs into the console: telnet localhost:4555
> one can just type "add test test" (for adding of a test user with password
> test).
> I would like to do this programmatically; What is the easiest way of doing
> this programmatically?

In case you are using a database backend, the easiest way is to write
a program against the database, as Sebastion pointed out.

There are also many other ways, a few are described here.

http://markmail.org/message/fx43xflhh4mpskgc
http://markmail.org/message/q4fvcypw47vhypzw
http://markmail.org/message/fjtdpizxhs3mbxw3
http://markmail.org/message/lgj7mmxc3252fspi
http://markmail.org/message/duklfz6iv43isx5x

Don't know what you find is the easiest, though.

 Bernd

> On Thu, May 22, 2008 at 11:27 AM, Sebastian Steinhauer <
> steini@kieselsteini.de> wrote:
>
>>
>> Am 22.05.2008 um 16:53 schrieb Athar Shiraz Siddiqui:
>>
>>> I would like to create an email account without "Telnet"ing into a console
>>> i.e. programmatic ally.
>>>
>>> How would I do that ?
>>>
>>
>> If the users are stored in a database, just add a new entry in the
>> james_users table. Thats it.
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: How to Programmatically Create An Email Account

Posted by Athar Shiraz Siddiqui <at...@gmail.com>.
Where is this james_users table? Do you understand my question Sir?

When one logs into the console: telnet localhost:4555
one can just type "add test test" (for adding of a test user with password
test).
I would like to do this programmatically; What is the easiest way of doing
this programmatically?




On Thu, May 22, 2008 at 11:27 AM, Sebastian Steinhauer <
steini@kieselsteini.de> wrote:

>
> Am 22.05.2008 um 16:53 schrieb Athar Shiraz Siddiqui:
>
>> I would like to create an email account without "Telnet"ing into a console
>> i.e. programmatic ally.
>>
>> How would I do that ?
>>
>
> If the users are stored in a database, just add a new entry in the
> james_users table. Thats it.
>

Re: How to Programmatically Create An Email Account

Posted by Sebastian Steinhauer <st...@kieselsteini.de>.
Am 22.05.2008 um 16:53 schrieb Athar Shiraz Siddiqui:

> I would like to create an email account without "Telnet"ing into a  
> console
> i.e. programmatic ally.
>
> How would I do that ?

If the users are stored in a database, just add a new entry in the  
james_users table. Thats it.




---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org