Gossamer Forum
Home : Products : Gossamer Mail : Pre Sales :

Setting Mailbox Space For Individual Domains

Quote Reply
Setting Mailbox Space For Individual Domains
Hi,

I shall be using GM2.1 for permitted 5 domains.

However, can it be made possible that each of the 5 domains have different mailbox size. I know that current admin does not have a multi level admin.

For example for 4 domains I would want to have 20MB mailbox size and Just for 1 domain i would prefer to have it 10 MB.

However, in order to compete with HM (the big bro) who is offering different mailbox sizes, can it be made possible that each of the domains have different mailbox sizes defined.

Thnx

Anup
Quote Reply
Re: [anup123] Setting Mailbox Space For Individual Domains In reply to
Mailbox size is an individual setting, but the default is a single setting in the admin. You'll have to manually update their quota, or you could write a plugin to automatically change their quota (or other settings) depending on their domain.

Adrian
Quote Reply
Re: [brewt] Setting Mailbox Space For Individual Domains In reply to
Hi,

Can you help me with a working code on that? Possibly a small perl script to update the database for a given domain(s) which can be run separately from the browser.

Thnx

Anup
Quote Reply
Re: [brewt] Setting Mailbox Space For Individual Domains In reply to
Hi Adrian,

In terms of writing that plugin; one to modify the user quotas based upon the domain; where do you see the best hook to put this? Is there a hook called just after signup? or validation? (Also, is there a list of the various hooks in a document somewhere?)

Thanks,

Chris
Quote Reply
Re: [zoherest] Setting Mailbox Space For Individual Domains In reply to
Right after adding the user would be good. You can add a POST hook on "gmail::noauth::join::add_user". There you'll be passed in a hash of the userid and dgraph:
Code:
{
'dgraph.dgraph_last_name' => 'Last Name',
'dgraph.dgraph_zip' => '',
'dgraph.dgraph_userid' => '5',
'dgraph.dgraph_address' => '',
'dgraph.dgraph_city' => '',
'dgraph.dgraph_first_name' => 'First Name',
'dgraph.dgraph_email' => 'foo@example.com',
'dgraph.dgraph_state' => '',
'dgraph.dgraph_country' => '',
'users.userid' => '5'
}
You'll want to check that you have users.userid first as the hook will be called even if they weren't added (it's called every time they press the submit button on the Join page).
So your code would look something like:
Code:
sub defaults_by_domain {
my $user_data = shift;
return if !$user_data;
# Update the user's data here. Use $DB, and $user_data->{'users.userid'}, etc
return $user_data;
}

Adrian

Last edited by:

brewt: May 31, 2002, 2:18 PM