Author Topic: PostfixAdmin bridge  (Read 54074 times)

Offline hitchicker

  • Newbie
  • *
  • Posts: 1
PostfixAdmin bridge
« Reply #30 on: April 06, 2009, 11:46:18 PM »
Quote from: climaxy;18133
Will there also be an updated version released which is working with the current stable version 0.2.1?
I'd really like to try out this plugin!!

i'm install 0.2.1 and try this patch, but this don't work, have a error with a one file. :(

Offline schickel

  • Newbie
  • *
  • Posts: 5
PostfixAdmin bridge
« Reply #31 on: May 08, 2009, 10:05:14 AM »
Hi,

program/js/app.js could not be patched...

nejko and Andrey Sharandakov , plz take a look at this file ;)

Offline cap0ne

  • Newbie
  • *
  • Posts: 2
PostfixAdmin bridge
« Reply #32 on: May 16, 2009, 02:52:10 PM »
patch app.js not working :

root@/var/www/localhost/htdocs/round/rcpfa-1.0.5 # patch -d .. -p1 < diffs/app.js.diff
patching file program/js/app.js
Hunk #1 FAILED at 235.
Hunk #2 FAILED at 279.
Hunk #3 FAILED at 349.
Hunk #4 FAILED at 367.
Hunk #5 FAILED at 402.
Hunk #6 FAILED at 442.
Hunk #7 FAILED at 455.
Hunk #8 FAILED at 476.
Hunk #9 FAILED at 535.
Hunk #10 FAILED at 557.
Hunk #11 FAILED at 604.
Hunk #12 FAILED at 662.
Hunk #13 FAILED at 675.
Hunk #14 FAILED at 716.
Hunk #15 FAILED at 766.
Hunk #16 FAILED at 780.
Hunk #17 FAILED at 834.
Hunk #18 FAILED at 857.
Hunk #19 FAILED at 871.
Hunk #20 FAILED at 895.
Hunk #21 FAILED at 977.
Hunk #22 FAILED at 1049.
Hunk #23 FAILED at 1061.
Hunk #24 FAILED at 1105.
Hunk #25 FAILED at 1134.
Hunk #26 FAILED at 1147.
Hunk #27 FAILED at 1185.
Hunk #28 FAILED at 1217.
Hunk #29 FAILED at 1464.
Hunk #30 FAILED at 1488.
Hunk #31 FAILED at 1507.
Hunk #32 FAILED at 1530.
Hunk #33 FAILED at 1666.
Hunk #34 FAILED at 1737.
Hunk #35 FAILED at 1772.
Hunk #36 FAILED at 1789.
Hunk #37 FAILED at 1803.
Hunk #38 FAILED at 1840.
Hunk #39 FAILED at 1860.
Hunk #40 FAILED at 1921.
Hunk #41 FAILED at 1938.
Hunk #42 FAILED at 1961.
Hunk #43 FAILED at 1971.
Hunk #44 FAILED at 2001.
Hunk #45 FAILED at 2016.
Hunk #46 FAILED at 2047.
Hunk #47 FAILED at 2072.
Hunk #48 FAILED at 2096.
Hunk #49 FAILED at 2135.
Hunk #50 FAILED at 2151.
Hunk #51 FAILED at 2171.
Hunk #52 FAILED at 2192.
Hunk #53 FAILED at 2219.
Hunk #54 FAILED at 2269.
Hunk #55 FAILED at 2297.
Hunk #56 FAILED at 2352.
Hunk #57 FAILED at 2366.
Hunk #58 FAILED at 2434.
Hunk #59 FAILED at 2453.
Hunk #60 FAILED at 2515.
Hunk #61 FAILED at 2557.
Hunk #62 FAILED at 2577.
Hunk #63 FAILED at 2588.
Hunk #64 FAILED at 2598.
Hunk #65 FAILED at 2733.
Hunk #66 FAILED at 2756.
Hunk #67 FAILED at 2774.
Hunk #68 FAILED at 2798.
Hunk #69 FAILED at 2841.
Hunk #70 FAILED at 2870.
Hunk #71 FAILED at 2939.
Hunk #72 FAILED at 2961.
Hunk #73 FAILED at 3005.
Hunk #74 FAILED at 3032.
Hunk #75 FAILED at 3047.
Hunk #76 FAILED at 3135.
Hunk #77 FAILED at 3147.
Hunk #78 FAILED at 3181.
Hunk #79 FAILED at 3201.
Hunk #80 FAILED at 3277.
Hunk #81 FAILED at 3300.
Hunk #82 FAILED at 3350.
82 out of 82 hunks FAILED -- saving rejects to file program/js/app.js.rej

Please HELP !

Offline Shadow aok

  • Jr. Member
  • **
  • Posts: 12
PostfixAdmin bridge
« Reply #33 on: May 16, 2009, 06:28:32 PM »
Try with this app.js file.

Offline cap0ne

  • Newbie
  • *
  • Posts: 2
PostfixAdmin bridge
« Reply #34 on: May 21, 2009, 04:34:17 AM »
Thank you !! is work now but when i change password i recive a messages in webpage " SERVICE CURRENTLY NOT AVAILABLE! Error No. [0x01F4] "
and in logs have error
" May 21 11:32:51 lasoc roundcube: MDB2 Error: no such table (-18): _doQuery: [Error message: Could not execute statement]
May 21 11:32:51 lasoc [Last executed query: PREPARE mdb2_statement_mysql_45e3dfa1b16b62c9a6d2cb85750209577127e5527 FROM 'SELECT 1 FROM session\n     WHERE  sess_id=?']
May 21 11:32:51 lasoc [Native code: 1146]
May 21 11:32:51 lasoc [Native message: Table 'postfix.session' doesn't exist]
May 21 11:32:51 lasoc roundcube: [21-May-2009 11:32:51 +0300] DB Error: _doQuery: [Error message: Could not execute statement]
May 21 11:32:51 lasoc [Last executed query: PREPARE mdb2_statement_mysql_45e3dfa1b16b62c9a6d2cb85750209577127e5527 FROM 'SELECT 1 FROM session\n     WHERE  sess_id=?']
May 21 11:32:51 lasoc [Native code: 1146]
May 21 11:32:51 lasoc [Native message: Table 'postfix.session' doesn't exist]
May 21 11:32:51 lasoc in /var/www/localhost/htdocs/webmail/program/include/rcube_mdb2.php on line 255 (GET /?_task=settings&_action=forwarding)
"

and when i activate vaction module i recive a bad replay, my e-mail adress is razvan@lasoc.ro , i change in main.inc.php " // Vacation autoreply domain
$rcmail_config['pfa_autoreply_domain'] = ''; "....

" This is the mail system at host mail.lasoc.ro.

I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can delete your own text from the attached returned message.

                   The mail system

(expanded from ): bad address syntax

(expanded from ): Host
    or domain name not found. Name service error for name=autoreply.DOMAIN.COM
    type=A: Host not found "
« Last Edit: May 21, 2009, 04:53:07 AM by cap0ne »

Offline wiza

  • Newbie
  • *
  • Posts: 3
PostfixAdmin bridge
« Reply #35 on: May 22, 2009, 05:22:57 AM »
I'm have newest roundcude installed(0.2.2) and I tried --dry-run with those patches with some errors. New version of rcpfa somewhere/coming?

First I did "cat * > all.diff to get shorter paste, but anyway, this is what I got:

# patch --dry-run -d .. -p1 < diffs/all.diff
patching file program/js/app.js
Hunk #21 FAILED at 977.
Hunk #22 FAILED at 1049.
Hunk #23 FAILED at 1061.
Hunk #24 FAILED at 1105.
Hunk #25 FAILED at 1134.
Hunk #26 FAILED at 1147.
Hunk #27 FAILED at 1185.
Hunk #28 FAILED at 1217.
Hunk #29 FAILED at 1464.
Hunk #30 FAILED at 1488.
Hunk #31 FAILED at 1507.
Hunk #32 FAILED at 1530.
Hunk #33 FAILED at 1666.
Hunk #34 FAILED at 1737.
Hunk #35 FAILED at 1772.
Hunk #36 FAILED at 1789.
Hunk #37 FAILED at 1803.
Hunk #38 FAILED at 1840.
Hunk #39 FAILED at 1860.
Hunk #40 FAILED at 1921.
Hunk #41 FAILED at 1938.
Hunk #42 FAILED at 1961.
Hunk #43 FAILED at 1971.
Hunk #44 FAILED at 2001.
Hunk #45 FAILED at 2016.
Hunk #46 FAILED at 2047.
Hunk #47 FAILED at 2072.
Hunk #48 FAILED at 2096.
Hunk #49 FAILED at 2135.
Hunk #50 FAILED at 2151.
Hunk #51 FAILED at 2171.
Hunk #52 FAILED at 2192.
Hunk #53 FAILED at 2219.
Hunk #54 FAILED at 2269.
Hunk #55 FAILED at 2297.
Hunk #56 FAILED at 2352.
Hunk #57 FAILED at 2366.
Hunk #58 FAILED at 2434.
Hunk #59 FAILED at 2453.
Hunk #60 FAILED at 2515.
Hunk #61 FAILED at 2557.
Hunk #62 FAILED at 2577.
Hunk #63 FAILED at 2588.
Hunk #64 FAILED at 2598.
Hunk #65 FAILED at 2733.
Hunk #66 FAILED at 2756.
Hunk #67 FAILED at 2774.
Hunk #68 FAILED at 2798.
Hunk #69 FAILED at 2841.
Hunk #70 FAILED at 2870.
Hunk #71 FAILED at 2939.
Hunk #72 FAILED at 2961.
Hunk #73 FAILED at 3005.
Hunk #74 FAILED at 3032.
Hunk #75 FAILED at 3047.
Hunk #76 FAILED at 3135.
Hunk #77 FAILED at 3147.
Hunk #78 succeeded at 3207 (offset 26 lines).
Hunk #79 succeeded at 3227 (offset 26 lines).
Hunk #80 succeeded at 3303 (offset 26 lines).
Hunk #81 succeeded at 3326 (offset 26 lines).
Hunk #82 succeeded at 3376 (offset 26 lines).
57 out of 82 hunks FAILED -- saving rejects to file program/js/app.js.rej
patching file config/db.inc.php
Hunk #1 succeeded at 61 with fuzz 2 (offset -2 lines).
patching file program/steps/settings/func.inc
Hunk #1 succeeded at 473 with fuzz 1 (offset 101 lines).
patching file index.php
Hunk #1 succeeded at 197 (offset -5 lines).
patching file program/localization/en_US/labels.inc
Hunk #1 succeeded at 325 with fuzz 2 (offset 23 lines).
patching file program/include/main.inc
patching file config/main.inc.php
Hunk #1 succeeded at 412 with fuzz 2 (offset 35 lines).
patching file program/localization/en_US/messages.inc
Hunk #1 FAILED at 85.
1 out of 1 hunk FAILED -- saving rejects to file program/localization/en_US/messages.inc.rej
patching file program/include/rcube_user.php
Hunk #1 FAILED at 390.
1 out of 1 hunk FAILED -- saving rejects to file program/include/rcube_user.php.rej
patching file skins/default/includes/settingstabs.html

Offline Shadow aok

  • Jr. Member
  • **
  • Posts: 12
PostfixAdmin bridge
« Reply #36 on: May 23, 2009, 04:49:55 AM »
wiza, take a look at my previous post.
Quote from: Shadow aok;19054
Try with this app.js file.



Cap0ne > You're missing a session table in your postfix database.

Offline Shadow aok

  • Jr. Member
  • **
  • Posts: 12
PostfixAdmin bridge
« Reply #37 on: May 26, 2009, 06:49:32 AM »
Here's app.js patched with rcpfa for RoundCube 0.2.2. :)

Offline csibo

  • Newbie
  • *
  • Posts: 3
PostfixAdmin bridge
« Reply #38 on: May 26, 2009, 08:59:53 AM »
Quote from: Shadow aok;19208
Here's app.js patched with rcpfa for RoundCube 0.2.2. :)


thanks..
could you fix rcube_user.php.diff patch?

Offline Shadow aok

  • Jr. Member
  • **
  • Posts: 12
PostfixAdmin bridge
« Reply #39 on: May 27, 2009, 03:29:18 AM »
Quote from: csibo;19212
thanks..
could you fix rcube_user.php.diff patch?


Yes but not right now, i'm a little busy.
I'll do it in a few days.

Offline wiza

  • Newbie
  • *
  • Posts: 3
PostfixAdmin bridge
« Reply #40 on: May 27, 2009, 03:50:56 AM »
Following should work

Code: [Select]

--- rcube_user.php.orig 2009-05-27 10:47:11.000000000 +0300
+++ rcube_user.php 2009-05-26 02:40:26.000000000 +0300
@@ -380,7 +380,7 @@
       // also create new identity records
       $standard = 1;
       foreach ($email_list as $email) {
-        $dbh->query(
+/*        $dbh->query(
             &quot;INSERT INTO &quot;.get_table_name('identities').&quot;
               (user_id, del, standard, name, email)
              VALUES (?, 0, ?, ?, ?)&quot;,
@@ -388,7 +388,38 @@
     $standard,
             strip_newlines($user_name),
             preg_replace('/^@/', $user . '@', $email));
- $standard = 0;
+ $standard = 0;*/
+
+ // >> pfa patch
+ if(strip_newlines($user_name)) {
+ $name = strip_newlines($user_name);
+ } elseif($rcmail->config->get('pfa_enable_identity_sync')) {
+ $pfa = new pfa();
+ $name = $pfa->get_name($user);
+ }
+
+        if($rcmail->config->get('pfa_enable_identity_sync')) {
+ $dbh->query(
+ &quot;INSERT INTO &quot;.get_table_name('identities').&quot;
+ (user_id, del, standard, name, organization, email)
+ VALUES (?, 0, ?, ?, ?, ?)&quot;,
+ $user_id,
+ $standard,
+ $name,
+ $rcmail->config->get('pfa_default_organization'),
+ strip_newlines($user_email));
+ $standard=0;
+ } else {
+ // << pfa patch
+ $dbh->query(
+ &quot;INSERT INTO &quot;.get_table_name('identities').&quot;
+ (user_id, del, standard, email, name)
+ VALUES (?, 0, ?, ?, ?)&quot;,
+ $user_id,
+ $standard,
+ strip_newlines($user_email),
+ preg_replace('/^@/', $user . '@', $email));
+ }
       }
     }
     else
« Last Edit: May 27, 2009, 03:52:05 AM by wiza »

Offline csibo

  • Newbie
  • *
  • Posts: 3
PostfixAdmin bridge
« Reply #41 on: May 27, 2009, 05:44:36 AM »
Quote from: wiza;19228
Following should work



thanks.. it's working for me.. :)

i found two bugs:

1,

if the Vacation settings ON and i change the Forwarding settings (or just i click to the save button): the autoreply forwards setting will be erased.

2,

the settings tab isn't check the pfa_enable_vacation, pfa_enable_password and pfa_enable_forwarding settings.
« Last Edit: May 27, 2009, 05:47:45 AM by csibo »

Offline wiza

  • Newbie
  • *
  • Posts: 3
PostfixAdmin bridge
« Reply #42 on: May 28, 2009, 04:08:57 AM »
Finnish translations to PFA patch

messages.inc:
Code: [Select]

// >> pfa patch

// Enabling/disabling each function
$messages['vacationdisabled'] = 'Sinulla ei ole oikeuksia vaihtaa lomavastaajan asetuksia.';
$messages['passworddisabled'] = 'Sinulla ei ole oikeuksia vaihtaa salasanaa.';
$messages['forwardingdisabled'] = 'Sinulla ei ole oikeuksia vaihtaa edelleenohjauksen asetuksia.';

// Vacation
$messages['vacationmodified'] = 'Lomavastaajan asetukset tallennettu.';
$messages['novacation'] = 'Lomavastaaja aktivoitu, mutta viesti&auml; ei annettu.';

// Password
$messages['wrong2password'] = 'Antamasi salasanat eivät ole samat';
$messages['wrongoldpassword'] = 'Vanha salasana väärä.';
$messages['tooshortpassword'] = 'Uusi salasana liian lyhyt.';
$messages['passwordmodified'] = 'Salana vaihdettu onnistuneesti.';

// Forwarding
$messages['forwardingmodified'] = 'Edelleenohjausasetukset tallennettu.';
$messages['emptyforwarding'] = 'Ainakin yksi osoite on annettava edelleenohjausta varten.';
$messages['forwardingsyntaxerror'] = 'Ainakin yksi sähköpostiosoite ei ole oikea.';

// << pfa patch


labels.inc:
Code: [Select]
// >> pfa patch

$labels['vacation'] = 'Lomavastaaja';
$labels['titlevacation'] = 'Lomavastaajan asetukset';
$labels['activevacation'] = 'Aktivoi lomavastaaja';
$labels['subjectvacation'] = 'Lomavastaajan otsikko';
$labels['bodyvacation'] = 'Lomavastaajan viesti';

$labels['titlepassword'] = 'Vaihda salasana';
$labels['oldpassword'] = 'Syötä vanha salasana';
$labels['newpassword'] = 'Syötä uusi salasana';
$labels['new2password'] = 'Toista uusi salasana';

$labels['forwarding'] = 'Edelleenohjaus';
$labels['titleforwarding'] = 'Edelleenohjaus toisiin sähköpostiosoitteisiin';
$labels['aliasesforwarding'] = 'Edelleenohjaa postit näihin sähköpostiosoitteisiin (yksi osoite per rivi)';
$labels['localforwardingtrue'] = 'Toimita myös omaan laatikkoon';
$labels['localforwardingfalse'] = 'Toimita vain määriteltyihin osoitteisiin';

// << pfa patch

Offline Shadow aok

  • Jr. Member
  • **
  • Posts: 12
PostfixAdmin bridge
« Reply #43 on: May 29, 2009, 04:05:37 AM »
I made another version of rcube_user.php than wiza's one.
Please test it to see if you still have the two bugs.

Offline csibo

  • Newbie
  • *
  • Posts: 3
PostfixAdmin bridge
« Reply #44 on: May 29, 2009, 10:39:17 AM »
Quote from: Shadow aok;19296
I made another version of rcube_user.php than wiza's one.
Please test it to see if you still have the two bugs.


still have the bugs.

i think the second bug is doesn't matter. just comment out the not necessary functions in skins/default/includes/settingstabs.html...

the first bug:
in the forwarding tab if i click to the save button, it's always remove the autoreply line from the alias table goto field. autoreply line example: user#domain.tld@autoreply.domain.tld
like: peter#domain.com@autoreply.domain.com