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 Amit Rana <ra...@solis.jp> on 2003/11/03 10:09:39 UTC

VirtualUserTable and quota

Hi,

	We are an internet infrastructure company and I am evaluating
whether we can use James to provide email services to our customers. So
far James look very impressive, I was sending/receiving mails within 15
mins of downloading James. I have a few questions it would be great if
someone can help me find the answers.

1. Regarding "JDBCVirtualUserTable" mailet:
<snip from="java file">
* For a given [user, domain, domain] used with the query, this will
 * match as follows (in precedence order):
 *
 * 1. user@domain    - explicit mapping for user@domain
 * 2. user@%         - catchall mapping for user anywhere
 * 3. %@domain       - catchall mapping for anyone at domain
 * 4. null           - no valid mapping
</snip>

	My VirtualUserTable has
User1:domain1:user[at]yahoo.com
User2:domain1:user[at]hotmail.com

All the mails that I send for domain1 are going to user[at]yahoo.com, is
this the expected behavior?
	I only want the mailer to match point 1 above so I tried to
change the query and specified it inside <sqlquery> tag in the
config.xml but it doesn't seem to work, I am receiving all the mails
send to domain1 at user[at]yahoo.com
<mailet match="All" class="JDBCVirtualUserTable">
	<table>db://maildb/VirtualUserTable</table>
	<sqlquery>select VirtualUserTable.target_address from
VirtualUserTable where VirtualUserTable.user like ? and
VirtualUserTable.domain like ? order by concat
(VirtualUserTable.user,'@',VirtualUserTable.domain) desc limit
1</sqlquery>
</mailet>

2. Question about per-user quota:
I checked the "RecipientIsOverFixedQuota" which is mentioned in
http://www.mail-archive.com/server-user@james.apache.org/msg00497.html ,
if I want to implement a per user quota then I should change
"RecipientIsOverFixedQuota" to get the quota from the DB instead of
config.xml. Is that the right approach?

Do we have a link/doc specifying planned release dates for future
releases?

Thanks for your help.

Regards,
Amit.


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


RE: VirtualUserTable and quota

Posted by Amit Rana <ra...@solis.jp>.
Noel,

	Thanks for your response.

> No.  What database?  The original proof of concept was done with a SQL
> script for testing.  You can find it attached here:
>http://nagoya.apache.org/eyebrowse/ReadMsg?listName=james-dev@jakarta.a
pache.org&msgIdC5697
I am sorry, I meant VirtualUserTable table. What I am referring to is:
http://james.apache.org/FAQ.html#7 or
org.apache.james.transport.mailets.JDBCVirtualUserTable.java

I am trying to implement mail forwarding and as mentioned in my last
mail I have following records in VirtualUserTable
> > user:domain:target_address
> > User1:domain1:user[at]yahoo.com
> > User2:domain1:user[at]hotmail.com
and all mails for domain1 are going to user[at]yahoo.com

I am trying to experiment with this by changing the sqlquery that
org.apache.james.transport.mailets.JDBCVirtualUserTable.java uses. I
guess I can change the query by specifying it inside the <sqlquery> tag
but it doesn't seem to work. How can I correct this?

> Not quite.  You want a separate quota matcher that understands your
> database.  FixedQuota is intended to be a single quota.  We will have
a
> per-user quota matcher after we add attributes to the user record.
In which release are we planning this functionality?

Thanks again for your help.

Regards,
Amit.

> -----Original Message-----
> From: Noel J. Bergman [mailto:noel@devtech.com]
> Sent: Wednesday, November 05, 2003 12:28 AM
> To: James Users List
> Subject: RE: VirtualUserTable and quota
> 
> > Regarding "JDBCVirtualUserTable" mailet:
> 
> > User1:domain1:user[at]yahoo.com
> > User2:domain1:user[at]hotmail.com
> 
> > All the mails that I send for domain1 are going to
user[at]yahoo.com,
> > is this the expected behavior?
> 
> No.  What database?  The original proof of concept was done with a SQL
> script for testing.  You can find it attached here:
> 
> 
>
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=james-dev@jakarta.ap
ac
> he
> .org&msgIdC5697
> 
> > Question about per-user quota:
> 
> > if I want to implement a per user quota then I should change
> > "RecipientIsOverFixedQuota" to get the quota from the DB instead of
> > config.xml. Is that the right approach?
> 
> Not quite.  You want a separate quota matcher that understands your
> database.  FixedQuota is intended to be a single quota.  We will have
a
> per-user quota matcher after we add attributes to the user record.
> 
> 	--- Noel
> 
> 
> ---------------------------------------------------------------------
> 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


repost: VirtualUserTable and quota

Posted by Amit Rana <ra...@solis.jp>.
Hi,
	Any advice in solving this mail forwarding problem?

Regards.

-----previous mail-----
Noel,

	Thanks for your response.

> No.  What database?  The original proof of concept was done with a SQL
> script for testing.  You can find it attached here:
>http://nagoya.apache.org/eyebrowse/ReadMsg?listName=james-dev@jakarta.a
pache.org&msgIdC5697
I am sorry, I meant VirtualUserTable table. What I am referring to is:
http://james.apache.org/FAQ.html#7 or
org.apache.james.transport.mailets.JDBCVirtualUserTable.java

I am trying to implement mail forwarding and as mentioned in my last
mail I have following records in VirtualUserTable
> > user:domain:target_address
> > User1:domain1:user[at]yahoo.com
> > User2:domain1:user[at]hotmail.com
and all mails for domain1 are going to user[at]yahoo.com

I am trying to experiment with this by changing the sqlquery that
org.apache.james.transport.mailets.JDBCVirtualUserTable.java uses. I
guess I can change the query by specifying it inside the <sqlquery> tag
but it doesn't seem to work. How can I correct this?

> Not quite.  You want a separate quota matcher that understands your
> database.  FixedQuota is intended to be a single quota.  We will have
a
> per-user quota matcher after we add attributes to the user record.
In which release are we planning this functionality?

Thanks again for your help.

Regards,
Amit.

> -----Original Message-----
> From: Noel J. Bergman [mailto:noel@devtech.com]
> Sent: Wednesday, November 05, 2003 12:28 AM
> To: James Users List
> Subject: RE: VirtualUserTable and quota
> 
> > Regarding "JDBCVirtualUserTable" mailet:
> 
> > User1:domain1:user[at]yahoo.com
> > User2:domain1:user[at]hotmail.com
> 
> > All the mails that I send for domain1 are going to
user[at]yahoo.com,
> > is this the expected behavior?
> 
> No.  What database?  The original proof of concept was done with a SQL
> script for testing.  You can find it attached here:
> 
> 
>
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=james-dev@jakarta.ap
ac
> he
> .org&msgIdC5697
> 
> > Question about per-user quota:
> 
> > if I want to implement a per user quota then I should change
> > "RecipientIsOverFixedQuota" to get the quota from the DB instead of
> > config.xml. Is that the right approach?
> 
> Not quite.  You want a separate quota matcher that understands your
> database.  FixedQuota is intended to be a single quota.  We will have
a
> per-user quota matcher after we add attributes to the user record.
> 
> 	--- Noel
> 
> 
> ---------------------------------------------------------------------
> 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


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


RE: VirtualUserTable and quota

Posted by "Noel J. Bergman" <no...@devtech.com>.
> Regarding "JDBCVirtualUserTable" mailet:

> User1:domain1:user[at]yahoo.com
> User2:domain1:user[at]hotmail.com

> All the mails that I send for domain1 are going to user[at]yahoo.com,
> is this the expected behavior?

No.  What database?  The original proof of concept was done with a SQL
script for testing.  You can find it attached here:


http://nagoya.apache.org/eyebrowse/ReadMsg?listName=james-dev@jakarta.apache
.org&msgId=435697

> Question about per-user quota:

> if I want to implement a per user quota then I should change
> "RecipientIsOverFixedQuota" to get the quota from the DB instead of
> config.xml. Is that the right approach?

Not quite.  You want a separate quota matcher that understands your
database.  FixedQuota is intended to be a single quota.  We will have a
per-user quota matcher after we add attributes to the user record.

	--- Noel


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