Re: [Postfixadmin-devel] Request for help to creating bulk email address
Brought to you by:
christian_boltz,
gingerdog
From: Christian B. <pos...@cb...> - 2011-12-18 17:46:12
|
Hello, Am Freitag, 16. Dezember 2011 schrieb Sonam Penjor: > I have started to add features to creates email id by uploading CSV > file (bulk). > I am just wondering how much MB would be suitable for upload as it > involves operations: validation, checking of previous email id, > calculating the quotas and password. > Although, the upload size can be configured from php.ini file but > still to perform above operations as especially in my case I have to > keep in mind the CPU speed and bandwidth. Any other operations that > may be required. As David already mentioned, the php file_upload_size might need some tuning. (OTOH, one mailbox means somewhat between 50 and 100 byte in CSV, so you'll at least have 2000 mailboxes in 1 MB CSV file. That's a lot already ;-) Another setting that might hit you is the max_execution_time. (You can work around it by doing a self-redirect after creating 50 or 100 mailboxes with ?csvfile=uploaded_file.csv&continue_with_line=51) You can tune both settings in your PHP configuration, so this shouldn't be a real problem. You might also want to consider the command line client instead of the web interface for mass creation of mailboxes. > I would appreciate for recommendations / comments to move forward. Most important: Please use the MailboxHandler class (see below for details). create-mailbox.php and edit-mailbox.php are dead code (in maintenance mode) and will be deleted sooner or later. Please don't add new features to one of those files. Another important thing is to base your changes on SVN trunk. At the moment, using MailboxHandler means something like: $handler = new MailboxHandler($address); if (!MailboxHandler->add($password, $name, $quota, $active, $mail)) { die ('creating the mailbox failed - ' . $handler->errormsg); } $address is the username / mail address $password should be obvious ;-) $name is the realname / comment / whatever $quota means quota in MB $active is usually just true $mail means sending the welcome mail and also should be true See scripts/shells/mailbox.php -> AddTask -> __handle() (part of the command line client) for a working implementation that uses this class. Whenever I have some time [1], I'll update MailboxHandler to use the function names etc. I'm already using in DomainHandler and AdminHandler (see edit.php for working implementation). This means you'll need some small changes in your script on how you call MailboxHandler, but that will be quite easy. Regards, Christian Boltz [1] If you want to update MailboxHandler to be based on PFAHandler, of course nobody will stop you ;-) -- Intel kauft McAfee. [...] Der Synergieeffekt ist offensichtlich. McAfee macht Computer so langsam, dass man eine neue Intel-CPU braucht. Ähnliche Synergieeffekte gibt es zwischen [...] Computerspielen und Grafikkartenbedarf und zwischen Webforen und Tischkantenbedarf. [http://blog.fefe.de/?ts=b2935cd1] |