Jonathan Angliss | 22 Nov 2009 03:01
Favicon

Re: Error message on reply

On Wed, 28 Oct 2009 11:37:56 +0100, "Sebastian Voitzsch"
<sebastian <at> voitzsch.net> wrote:

>Hi,
>
>I think I discovered a bug in squirrelmail. I´m using it with dovecot,
>and most features work ok.
>
>However, I encounter an error message everytime I reply to a mail. The
>short error is: "Could not append message to Sent. Server responded:
>RED)".
>
>This doesn´t happen when creating a new mail, only in responding. I changed
>functions/imap_general.php to get the full response from server, what is:
>
>* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $MDNSent KMAILFORWARDED
>KMAILTODO KMAILWATCHED KMAILIGNORED $FORWARDED $TODO $WATCHED $IGNORED)
>
>Obviously, the "NO" from "IGNORED" / "KMAILIGNORED" makes the term
><preg_match("/(.*)(BAD|NO)(.*)$/"> to fail.
>
>Think there should be a \b before and after the (BAD|NO):
>
>"/(.*)\b(BAD|NO)\b(.*)$/"
>
>This way it only fails when "NO"/"BAD" is on a word boundary, not within
>other words.

Good catch, I'll run through some tests, and fix.  Interestingly
enough, the regex would be wrong anyway, it really shouldn't be
(Continue reading)

sadas sadas | 24 Nov 2009 11:52
Picon

Squirrelmail integration with php

 Hi,
     I'm interested how I can integrate squirrel mail with my PHP website. I want to make my PHP website to take the new e-mails from squirrel mail and to show me how many new messages I have in my box. Optionally I want to write a letter and to use squirrel mail to resend my messages to the destination e-mail.
   Can you give me advice what I must do to achieve this functionality?

regards


-----------------------------------------------------------------
Вижте водещите новини от Vesti.bg!
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-devel <at> lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
Luigi Rosa | 24 Nov 2009 13:18
Gravatar

Re: Squirrelmail integration with php


sadas sadas said the following on 24/11/09 11:52:

>      I'm interested how I can integrate squirrel mail with my PHP
> website. I want to make my PHP website to take the new e-mails
> from squirrel mail and to show me how many new messages I have in my
> box. Optionally I want to write a letter and to use squirrel mail to
> resend my messages to the destination e-mail.
>    Can you give me advice what I must do to achieve this functionality?

Wouldn't it be better to query directly the IMAP server using IMAP functions
http://www.php.net/manual/en/book.imap.php ?

Ciao,
luigi

--
/
+--[Luigi Rosa]--
\

Carelessly planned projects take three times longer to complete
than expected.
Carefully planned projects take only twice as long.
sadas sadas | 24 Nov 2009 14:33
Picon

Re: Squirrelmail integration with php



>-------- Оригинално писмо --------
>От: Luigi Rosa
>Относно: Re: [SM-DEVEL] Squirrelmail integration with php
>До: Squirrelmail Developers Mailing List

>Изпратено на: Вторник, 2009, Ноември 24 14:18:42 EET

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>sadas sadas said the following on 24/11/09 11:52:
>
>> I'm interested how I can integrate squirrel mail with my PHP
>> website. I want to make my PHP website to take the new e-mails
>> from squirrel mail and to show me how many new messages I have in my
>> box. Optionally I want to write a letter and to use squirrel mail to
>> resend my messages to the destination e-mail.
>> Can you give me advice what I must do to achieve this functionality?
>
>Wouldn't it be better to query directly the IMAP server using IMAP functions
>http://www.php.net/manual/en/book.imap.php ?
>


<at> lists.sourceforge.net> <at> luigirosa.com>yes but I need a text editor where I can write, edit and read e-mails. It will be more easy to just integrate PHP website with squirrel mail




-----------------------------------------------------------------
Вижте водещите новини от Vesti.bg!
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-devel <at> lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
Luigi Rosa | 24 Nov 2009 14:57
Gravatar

Re: Squirrelmail integration with php


sadas sadas said the following on 24/11/09 14:33:

> yes but I need a text editor where I can write, edit and read e-mails.
> It will be more easy to just integrate PHP website with squirrel mail

You can create a skink for SquirrelMail that matches the look and feel of your
website and call SM from a page of your site or embed it within an IFRAME

Ciao,
luigi

--
/
+--[Luigi Rosa]--
\

Remote shopping, while entirely feasible, will flop because women
like to get out of the house, like to handle merchandise, like to be
able to change their minds.
    --TIME, 1966
Patrick Muldoon | 24 Nov 2009 14:56
Favicon

Re: Squirrelmail integration with php

On Nov 24, 2009, at 8:33 AM, sadas sadas wrote:

> yes but I need a text editor where I can write, edit and read e-mails. It will be more easy to just integrate
PHP website with squirrel mail

If was going to do this, I would do the following... 

Use the imap functions to query read/unread counts for your website, and then just script the login, when
you click on the messages to bring you over the SM install..

-Patrick

--
Patrick Muldoon
Network/Software Engineer
INOC (http://www.inoc.net)
PGPKEY (http://www.inoc.net/~doon)
Key ID: 0x370D752C

"You fool! you fell victim to one of the classic blunders.
The most famous is never get involved in a land war in Asia. But only slightly less known is this
never go up against a Sicilian when death is on the line."
--Vizzini (Princess Bride)

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-devel <at> lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel

Craig Shelley | 28 Nov 2009 22:59
Picon

Address Book Pagination [SVN 13876]

 Hi,

I am having a problem with the address book showing "Address book is
empty".

After narrowing this down, I eventually found that the variable
$page_number was 0. The pagination routine in src/addressbook.php
assumes that the page numbers start at 1, hence missing the first page
of addresses.

I fixed the problem as shown below, but don't know if this was the
correct way to fix it.

Regards,
Craig

Index: src/addressbook.php
===================================================================
--- src/addressbook.php	(revision 13876)
+++ src/addressbook.php	(working copy)
 <at>  <at>  -389,7 +389,7  <at>  <at> 
     $new_address_list = array();
     $total_pages = ceil($total_addresses / $page_size);
     if ($page_number > $total_pages) $page_number = $total_pages;
-    $page_count = 1;
+    $page_count = 0;
     $page_item_count = 0;
     foreach ($addresses[$current_backend]['Addresses'] as $addr) {
         $page_item_count++;

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-devel <at> lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
Craig Shelley | 29 Nov 2009 01:00
Picon

Re: Address Book Pagination [SVN 13876]

This certainly was not the way to fix it. This alternative approach
seems to work better, but is still probably not the correct method.

Index: src/addressbook.php
===================================================================
--- src/addressbook.php	(revision 13876)
+++ src/addressbook.php	(working copy)
 <at>  <at>  -47,6 +47,9  <at>  <at> 
 if (!sqGetGlobalVar('show_all', $show_all, SQ_FORM))
     $show_all = 0;

+if ($page_number < 1)
+	$page_number = 1;
+
 /* Get sorting order */
 $abook_sort_order = get_abook_sort();

On Sat, 2009-11-28 at 21:59 +0000, Craig Shelley wrote:
> Hi,
> 
> I am having a problem with the address book showing "Address book is
> empty".
> 
> After narrowing this down, I eventually found that the variable
> $page_number was 0. The pagination routine in src/addressbook.php
> assumes that the page numbers start at 1, hence missing the first page
> of addresses.
> 
> I fixed the problem as shown below, but don't know if this was the
> correct way to fix it.
> 
> Regards,
> Craig
> 
> Index: src/addressbook.php
> ===================================================================
> --- src/addressbook.php	(revision 13876)
> +++ src/addressbook.php	(working copy)
>  <at>  <at>  -389,7 +389,7  <at>  <at> 
>      $new_address_list = array();
>      $total_pages = ceil($total_addresses / $page_size);
>      if ($page_number > $total_pages) $page_number = $total_pages;
> -    $page_count = 1;
> +    $page_count = 0;
>      $page_item_count = 0;
>      foreach ($addresses[$current_backend]['Addresses'] as $addr) {
>          $page_item_count++;
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> ----- squirrelmail-devel mailing list Posting guidelines:
http://squirrelmail.org/postingguidelines List address:
squirrelmail-devel <at> lists.sourceforge.net List archives:
http://news.gmane.org/gmane.mail.squirrelmail.devel List info (subscribe/unsubscribe/change
options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-devel <at> lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
Craig Shelley | 29 Nov 2009 02:05
Picon

Problems with Change Password

Hi,

Error message: "This page request could not be verified and appears to
have expired" is displayed immediately after a password change.
The password successfully gets changed, but the error message is a bit
alarming.

This issue appeared at revision with SVN revision;

r13817 | pdontthink | 2009-08-12 09:28:38 +0100 (Wed, 12 Aug 2009)
Implemented security token system. (Secunia Advisory SA34627)

Any ideas about how to work around this?

Regards,
Craig

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-devel <at> lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
Craig Shelley | 29 Nov 2009 12:30
Picon

Re: Problems with Change Password


Temporarily fixed for now with...

Index: functions.php
===================================================================
--- functions.php	(revision 13876)
+++ functions.php	(working copy)
 <at>  <at>  -22,6 +22,8  <at>  <at> 
 {
     global $cpw_pass_min_length, $cpw_pass_max_length;

+    // security token
+    sqgetGlobalVar('smtoken',     $submitted_token, SQ_FORM, '');
     // formdata
     sqgetGlobalVar('cpw_curpass', $currentpw, SQ_POST);
     sqgetGlobalVar('cpw_newpass', $newpw,     SQ_POST);
 <at>  <at>  -32,6 +34,9  <at>  <at> 

     $msg = array();

+    // verify the security token first
+    sm_validate_security_token($submitted_token, 3600, TRUE);
+
     if(!$newpw) {
         $msg[] = _("You must type in a new password.");
     }
 <at>  <at>  -76,6 +81,7  <at>  <at> 
 function cpw_do_change()
 {
     global $cpw_backend;
+    sqgetGlobalVar('smtoken',     $submitted_token, SQ_FORM, '');
     sqgetGlobalVar('cpw_curpass', $curpw,      SQ_POST);
     sqgetGlobalVar('cpw_newpass', $newpw,      SQ_POST);
     sqgetGlobalVar('base_uri',    $base_uri,   SQ_SESSION);
 <at>  <at>  -84,6 +90,9  <at>  <at> 
     sqgetGlobalVar('username',    $username,   SQ_SESSION);

     require_once(SM_PATH .
'plugins/change_password/backend/'.$cpw_backend.'.php');
+    
+    // verify the security token first
+    sm_validate_security_token($submitted_token, 3600, TRUE);

     $msgs = do_hook('change_password_dochange',
         $temp=array (
 <at>  <at>  -105,7 +114,7  <at>  <at> 

     /* make sure we write the session data before we redirect */
     session_write_close();
-    header('Location: '.SM_PATH.
'src/options.php?optmode=submit&optpage=change_password&plugin_change_password=1');
+    header('Location: '.SM_PATH. 'src/options.php');
     exit;
 }

Index: options.php
===================================================================
--- options.php	(revision 13876)
+++ options.php	(working copy)
 <at>  <at>  -82,7 +82,7  <at>  <at> 
 }

 ?><tr><td>
-    <?php echo addForm($_SERVER['PHP_SELF'], 'post'); ?>
+    <?php echo addForm($_SERVER['PHP_SELF'], 'post') .
addHidden('smtoken', sm_generate_security_token()); ?>
     <table>
       <tr>
         <th align="right"><?php echo _("Current Password:")?></th>

On Sun, 2009-11-29 at 01:05 +0000, Craig Shelley wrote:
> Hi,
> 
> Error message: "This page request could not be verified and appears to
> have expired" is displayed immediately after a password change.
> The password successfully gets changed, but the error message is a bit
> alarming.
> 
> This issue appeared at revision with SVN revision;
> 
> r13817 | pdontthink | 2009-08-12 09:28:38 +0100 (Wed, 12 Aug 2009)
> Implemented security token system. (Secunia Advisory SA34627)
> 
> Any ideas about how to work around this?
> 
> 
> Regards,
> Craig
> 
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> ----- squirrelmail-devel mailing list Posting guidelines:
http://squirrelmail.org/postingguidelines List address:
squirrelmail-devel <at> lists.sourceforge.net List archives:
http://news.gmane.org/gmane.mail.squirrelmail.devel List info (subscribe/unsubscribe/change
options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-devel <at> lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel

Gmane