Roundcube Community Forum

 

New File Added: Postfixadmin E-mail forwarding

Started by condector, October 26, 2010, 03:07:45 PM

Previous topic - Next topic

condector

Downloads: A new file has been added by  condector:

Postfixadmin E-mail forwarding

Plugin that allows configuring the postfix e-mail forwarding from roundcube settings.

bschmidt001

After properly configuring the plugin, I get a "connecterror" when I attempt to pull up the Settings/Preferences.  I can see all of the other Preferences values, and when I remove pf_alias from the main.inc.php, everything works correctly again.  Ipso facto, there is either an issue with the plugin, or it requires an alias table and no instructions for the SQL portion of the install were provided in the README.txt.

Updating the instructions would be best.  If nothing else, however, type "DESCRIBE alias" in your MySQL admin client (if using MySQL) and provide the output here.  Thanks!

chufrog

#2
bschmidt001,
to make it work, please first follow postfixadmin READMEs to config postfixadmin correctly, you will found all the required table sql statement there.

condector,
hook name updated in roundcube, should be:
        $this->add_hook('preferences_sections_list', array($this, 'list_prefs'));
        $this->add_hook('preferences_list', array($this, 'user_prefs'));
        $this->add_hook('preferences_save', array($this, 'save_prefs'));

and when you save the "forward mail address", a successful, and a failure message will show, due to your plugin(Thankyou, I'm using it) actually save nth. to pref. array.
a dirty and quick fix (may not be a correct/standard way), add the following lines to just before the line contains: "successfullysaved"
$args['prefs']['mail_forward_set'] = true;

php 5.3 cannot use function "eregi", change it to preg_match will work:
//if (!$is_valid = eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $t_email)) {
=>
if(!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i", $t_email)){        

hope this will help someone.

Belse