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 Mark Fitch <mf...@towson.edu> on 2006/05/07 06:48:00 UTC

how to use JAMES

Hi,

     Is there a complete idiot's guide to how to use JAMES from the ground 
up?  I got the client installed and running and can telnet to it and edit 
the config.xml file ok but i have no idea how to set up post offices or 
integrate it with a mail client or anything.  I am very sorry but i am new 
at this and trying to learn.  Is there a manual or something that explains 
how to use the tool?  Thanks.


   --Mark

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


Re: Re: Re: Threads, connection pools and many recipients

Posted by Stefano Bagnara <ap...@bago.org>.
Marcello Marangio wrote:
> I see your point, but any size limit to the recipients lenght would be not
> standard.

The SMTP RFC define a well-known error code to reply to an RCPT command 
when the maximum number of recipients allowed by the server is reached.

In fact I think no server will support infinite recipients.

> In any case, at the moment the bug makes only the smtpmanager refuse the
> mail, giving an error to the client and logging a stacktrace into the log
> file, that's all: the difference between the current behavoir and the future
> one would be to log a proper error message instead of the stacktrace.
> How about modifying the sqlResource.xml file to create a varchar2(4000), to
> support a bigger length?

You can do that. It should work with no problems. You can even ALTER 
your table if it has already been created.

Stefano


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


Re: R: Re: Re: Threads, connection pools and many recipients

Posted by Stefano Bagnara <ap...@bago.org>.
Latest rfc for smtp is the rfc2821.

Btw the limit specified in the rfc is for a single recipient, not for 
the list of recipients.

IIRC the rfc does not impose a minimum or maximum in the number of 
recipients allowed for single mail.

Stefamp

Marcello Marangio wrote:
>> I think he mean the length of the recipients not the recipients count.
>> btw this is also limited see:
>> http://www.rfc-editor.org/rfc/rfc1869.txt Section 4.1.2
>>
> 
> Yes, that's what I meant.
> So, it looks like that the limit of the SMTP command is pretty low,
> excluding the extensions.
> Does anybody know the latest SMTP RFC extensions, so that we can give a
> precise number of bytes supportable by james?
> 
> Marcello


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


R: Re: Re: Threads, connection pools and many recipients

Posted by Marcello Marangio <m....@tno.it>.
 

> -----Messaggio originale-----
> Da: Norman Maurer [mailto:nm@byteaction.de] 
> Inviato: martedì 9 maggio 2006 11.57
> A: James Users List
> Oggetto: Re: Re: Re: Threads, connection pools and many recipients
> 
> Am Dienstag, den 09.05.2006, 11:38 +0200 schrieb Stefano Bagnara:
> > Marcello Marangio wrote:
> > > I see your point, but any size limit to the recipients 
> lenght would 
> > > be not standard.
> > 
> > The SMTP RFC define a well-known error code to reply to an RCPT 
> > command when the maximum number of recipients allowed by 
> the server is reached.
> > 
> > In fact I think no server will support infinite recipients.
> 
> I think he mean the length of the recipients not the recipients count.
> btw this is also limited see:
> http://www.rfc-editor.org/rfc/rfc1869.txt Section 4.1.2
> 

Yes, that's what I meant.
So, it looks like that the limit of the SMTP command is pretty low,
excluding the extensions.
Does anybody know the latest SMTP RFC extensions, so that we can give a
precise number of bytes supportable by james?

Marcello


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


Re: Re: Re: Threads, connection pools and many recipients

Posted by Norman Maurer <nm...@byteaction.de>.
Am Dienstag, den 09.05.2006, 11:38 +0200 schrieb Stefano Bagnara:
> Marcello Marangio wrote:
> > I see your point, but any size limit to the recipients lenght would be not
> > standard.
> 
> The SMTP RFC define a well-known error code to reply to an RCPT command 
> when the maximum number of recipients allowed by the server is reached.
> 
> In fact I think no server will support infinite recipients.

I think he mean the length of the recipients not the recipients count.
btw this is also limited see:
http://www.rfc-editor.org/rfc/rfc1869.txt Section 4.1.2

> 
> > In any case, at the moment the bug makes only the smtpmanager refuse the
> > mail, giving an error to the client and logging a stacktrace into the log
> > file, that's all: the difference between the current behavoir and the future
> > one would be to log a proper error message instead of the stacktrace.
> > How about modifying the sqlResource.xml file to create a varchar2(4000), to
> > support a bigger length?
> 
> You can do that. It should work with no problems. You can even ALTER 
> your table if it has already been created.

bye Borman


R: Re: Threads, connection pools and many recipients

Posted by Marcello Marangio <m....@tno.it>.
 

> -----Messaggio originale-----
> Da: Stefano Bagnara [mailto:apache@bago.org] 
> Inviato: martedì 9 maggio 2006 10.41
> A: James Users List
> Oggetto: Re: Re: Threads, connection pools and many recipients
> 
> Marcello Marangio wrote:
> > Cool.
> > I set the max to 100 and it seems fine now, Thanks a million.
> > About the bug, I am pretty sure it is related to the size of the 
> > "recipients" column.
> > I didn't try with filesystem repositories.
> > As the rfc2822 doesn't put any limit to the size of the 
> mail address, 
> > this is pretty bad: the only way to support EVERY 
> recipients size is 
> > to build the table as a clob and handle it in the 
> JDBCSpoolManager class.
> > Do you agree?
> 
> We should probably use the 1000 chars limit while accepting 
> connections via SMTPServer and reject further recipients.
> 
> If we want to suppport >1000 bytes recipients we could change 
> the JDBCMailRepository to store the recipient collection in 
> the attributes field and retrieve it from there. We won't 
> have the plain-text recipients in a field but we'll skip the 
> 1000 char limit.
> 
> This is not a difficult task but would introduce a backward 
> compatibility issue, so we should talk about this and 
> alternative solutions, first.

I see your point, but any size limit to the recipients lenght would be not
standard.
In any case, at the moment the bug makes only the smtpmanager refuse the
mail, giving an error to the client and logging a stacktrace into the log
file, that's all: the difference between the current behavoir and the future
one would be to log a proper error message instead of the stacktrace.
How about modifying the sqlResource.xml file to create a varchar2(4000), to
support a bigger length?

Marcello


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


Re: Re: Threads, connection pools and many recipients

Posted by Stefano Bagnara <ap...@bago.org>.
Marcello Marangio wrote:
> Cool.
> I set the max to 100 and it seems fine now, Thanks a million.
> About the bug, I am pretty sure it is related to the size of the
> "recipients" column.
> I didn't try with filesystem repositories.
> As the rfc2822 doesn't put any limit to the size of the mail address, this
> is pretty bad: the only way to support EVERY recipients size is to build the
> table as a clob and handle it in the JDBCSpoolManager class.
> Do you agree?

We should probably use the 1000 chars limit while accepting connections 
via SMTPServer and reject further recipients.

If we want to suppport >1000 bytes recipients we could change the 
JDBCMailRepository to store the recipient collection in the attributes 
field and retrieve it from there. We won't have the plain-text 
recipients in a field but we'll skip the 1000 char limit.

This is not a difficult task but would introduce a backward 
compatibility issue, so we should talk about this and alternative 
solutions, first.

Stefano


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


Re: Re: Threads, connection pools and many recipients

Posted by Norman Maurer <nm...@byteaction.de>.
Am Dienstag, den 09.05.2006, 10:40 +0200 schrieb Stefano Bagnara:
> Marcello Marangio wrote:
> > Cool.
> > I set the max to 100 and it seems fine now, Thanks a million.
> > About the bug, I am pretty sure it is related to the size of the
> > "recipients" column.
> > I didn't try with filesystem repositories.
> > As the rfc2822 doesn't put any limit to the size of the mail address, this
> > is pretty bad: the only way to support EVERY recipients size is to build the
> > table as a clob and handle it in the JDBCSpoolManager class.
> > Do you agree?
> 
> We should probably use the 1000 chars limit while accepting connections 
> via SMTPServer and reject further recipients.
> 
Or we could use the maxRecipient feature for this..
 
> If we want to suppport >1000 bytes recipients we could change the 
> JDBCMailRepository to store the recipient collection in the attributes 
> field and retrieve it from there. We won't have the plain-text 
> recipients in a field but we'll skip the 1000 char limit.
> 
> This is not a difficult task but would introduce a backward 
> compatibility issue, so we should talk about this and alternative 
> solutions, first.

I agree we should try to fix it without modify the Repository.

bye
Norman

R: Threads, connection pools and many recipients

Posted by Marcello Marangio <m....@tno.it>.
Cool.
I set the max to 100 and it seems fine now, Thanks a million.
About the bug, I am pretty sure it is related to the size of the
"recipients" column.
I didn't try with filesystem repositories.
As the rfc2822 doesn't put any limit to the size of the mail address, this
is pretty bad: the only way to support EVERY recipients size is to build the
table as a clob and handle it in the JDBCSpoolManager class.
Do you agree?

Marcello

> -----Messaggio originale-----
> Da: Stefano Bagnara [mailto:apache@bago.org] 
> Inviato: martedì 9 maggio 2006 10.20
> A: James Users List
> Oggetto: Re: Threads, connection pools and many recipients
> 
> Your dbcp pool must be configured to have a bigger "max". 
> Every spoolthreads + smptserver threads + pop3server threads 
> + remote delivery threads can open db connections, so you 
> have to increase it to support your max numeber of threads.
> 
> About the recipients number issue this is probably a bug. Can 
> you create a JIRA issue for that?
> 
> Stefano
> 
> Marcello Marangio wrote:
> > Hi all
> > I have a james with all the repositories on a oracle db.
> > A am trying to perform a stress test: senting an email to 
> 50 recipients.
> > It failed at the first attempt, because the recipients 
> column in the 
> > spool table is "only" a varchar2(1000).
> > I decreased the number of recipients to 27 (and 800 chars), 
> and james
> > crashed:
> > 
> > javax.mail.MessagingException: Unable to parse stream:
> > org.apache.commons.dbcp.SQLNestedException: Cannot get a 
> connection, 
> > pool exhausted;
> >   nested exception is:
> >         java.io.IOException: 
> org.apache.commons.dbcp.SQLNestedException:
> > Cannot get a connection, pool exhausted
> >         at
> > 
> org.apache.james.core.MimeMessageWrapper.loadMessage(MimeMessageWrappe
> > r.java
> > :151)
> >         at
> > 
> org.apache.james.core.MimeMessageWrapper.setHeader(MimeMessageWrapper.
> > java:9
> > 42)
> > ......
> > 
> > Is it related to the "threads" parameter of the spoolmanager or 
> > something about my db connections?
> > 
> > 
> > Marcello
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org


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


Re: Threads, connection pools and many recipients

Posted by Stefano Bagnara <ap...@bago.org>.
Your dbcp pool must be configured to have a bigger "max". Every 
spoolthreads + smptserver threads + pop3server threads + remote delivery 
threads can open db connections, so you have to increase it to support 
your max numeber of threads.

About the recipients number issue this is probably a bug. Can you create 
a JIRA issue for that?

Stefano

Marcello Marangio wrote:
> Hi all
> I have a james with all the repositories on a oracle db.
> A am trying to perform a stress test: senting an email to 50 recipients.
> It failed at the first attempt, because the recipients column in the spool
> table is "only" a varchar2(1000).
> I decreased the number of recipients to 27 (and 800 chars), and james
> crashed:
> 
> javax.mail.MessagingException: Unable to parse stream:
> org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
> exhausted;
>   nested exception is:
>         java.io.IOException: org.apache.commons.dbcp.SQLNestedException:
> Cannot get a connection, pool exhausted
>         at
> org.apache.james.core.MimeMessageWrapper.loadMessage(MimeMessageWrapper.java
> :151)
>         at
> org.apache.james.core.MimeMessageWrapper.setHeader(MimeMessageWrapper.java:9
> 42)
> ......
> 
> Is it related to the "threads" parameter of the spoolmanager or something
> about my db connections?
> 
> 
> Marcello


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


Threads, connection pools and many recipients

Posted by Marcello Marangio <m....@tno.it>.
Hi all
I have a james with all the repositories on a oracle db.
A am trying to perform a stress test: senting an email to 50 recipients.
It failed at the first attempt, because the recipients column in the spool
table is "only" a varchar2(1000).
I decreased the number of recipients to 27 (and 800 chars), and james
crashed:

javax.mail.MessagingException: Unable to parse stream:
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool
exhausted;
  nested exception is:
        java.io.IOException: org.apache.commons.dbcp.SQLNestedException:
Cannot get a connection, pool exhausted
        at
org.apache.james.core.MimeMessageWrapper.loadMessage(MimeMessageWrapper.java
:151)
        at
org.apache.james.core.MimeMessageWrapper.setHeader(MimeMessageWrapper.java:9
42)
......

Is it related to the "threads" parameter of the spoolmanager or something
about my db connections?


Marcello


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