[ postfixadmin-Patches-2981966 ] CLI for Postfixadmin
Brought to you by:
christian_boltz,
gingerdog
|
From: SourceForge.net <no...@so...> - 2010-04-06 01:00:39
|
Patches item #2981966, was opened at 2010-04-05 04:00 Message generated for change (Comment added) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=937966&aid=2981966&group_id=191583 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Widget (example) Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Valkum () Assigned to: Nobody/Anonymous (nobody) Summary: CLI for Postfixadmin Initial Comment: Today i've spend a lot of time to make a simple CLI widget for Postfixadmin. So you can add a tons of mailboxes or aliases at once by one script execution. The requirements are: php-cli Simply put the scripts folder in your main root of postfixadmin or somewhere else. You can add path to postfixadmin by -webroot /path/to/pfadmin At the moment only user view and user password works Version 0.2 comes tomorrow. eventually. //btw: popen with dovecotpw doesn't work on cli. Need bugfix here. <------ IMPORTANT (functions.inc.php - function pacrypt(..) ) Every time I got 'Enter new password:' on STDOUT from dovecotpw Copyright to many tons of code goes to CakePHP great work. CakePHP's dispatcher with own Shell. Report Bugs in this ticket please. ---------------------------------------------------------------------- >Comment By: Valkum () Date: 2010-04-06 03:00 Message: So Version 0.2 is up. Changes: 'user add' added. 'user delete' added. changed way of output. model uses vars $return and $errormsg as transport. return 0 or 1. Some things in functions.inc.php are very sad for CLI. In line 1348 i changed $_SERVER["SERVER_NAME"]; to php_uname("n"); because this works and i think that it is silly to run pfa twice from the same server. In line 1742 i changed $REMOTE_ADDR = $_SERVER['REMOTE_ADDR']; to: $REMOTE_ADDR = 'localhost'; if (isset($_SERVER['REMOTE_ADDR'])) $REMOTE_ADDR = $_SERVER['REMOTE_ADDR']; Because $_SERVER is not available in CLI. Please find a fix for the dovecotpw problem. See Details above. ---------------------------------------------------------------------- Comment By: Valkum () Date: 2010-04-05 20:54 Message: Sry yesterday i've forgot to put in my actual user model. Now i start to implement the rest of user methods. Then i upload my model. ---------------------------------------------------------------------- Comment By: GingerDog (gingerdog) Date: 2010-04-05 08:54 Message: cool; i'll try and merge this son; nice idea. ---------------------------------------------------------------------- Comment By: Valkum () Date: 2010-04-05 04:20 Message: Moved to v0.1b: *Added some Copyright text *Added postfixadmin-cli (bashscript) *Changed text in console help function Bugs fixed: *Got "Class 'Info' not found when calling postfixadmin-cli without args - fixed ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=937966&aid=2981966&group_id=191583 |