# Squirrelmail errors [SOLVED]

## dageyra

After upgrading PHP/Apache, I am getting the following errors when sending emails with squirrelmail:

```

ERROR:

ERROR: Could not append message to INBOX.Sent.

Server responded: Error in IMAP command received by server.

ERROR:

ERROR: Could not append message to INBOX.Sent.

Server responded: Error in IMAP command received by server.

ERROR:

ERROR: Connection dropped by IMAP server.

Query: SELECT "INBOX"

```

and when trying to save drafts:

```

ERROR:

ERROR: Could not append message to INBOX.Drafts.

Server responded: Error in IMAP command received by server.

ERROR:

ERROR: Could not append message to INBOX.Drafts.

Server responded: Error in IMAP command received by server.

ERROR:

ERROR: Connection dropped by IMAP server.

Query: LOGOUT

```

The emails send, but no copy is stored to the Sent folder.  This happens for all users.  Any help is greatly appreciated (I believe the problem is with PHP so, I'm posting our USE variables and php.ini).

Specs:

```

emerge -pv dev-lang/php apache squirrelmail  

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] dev-lang/php-5.1.1  -adabas -apache +apache2 -bcmath -berkdb -birdstep +bzip2 -calendar -cdb -cgi -cjk +cli +crypt -ctype +curl -curlwrappers -db2 -dba -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob +exif -fastbuild -fdftk -filepro -firebird -flatfile +force-cgi-redirect -frontbase +ftp +gd -gd-external -gdbm +gmp -hardenedphp -hyperwave-api +iconv +imap -informix -inifile -interbase -iodbc -ipv6 -java-external -kerberos -ldap -libedit -mcve -memlimit +mhash -ming -msql -mssql +mysql -mysqli +ncurses +nls -oci8 -oci8-instant-client -odbc -pcntl +pcre -pdo -pdo-external +pear -pic -posix -postgres -qdbm +readline -recode -sapdb -sasl +session -sharedext -sharedmem -simplexml -snmp +soap -sockets -solid +spell -spl -sqlite +ssl -sybase -sybase-ct -sysvipc +threads -tidy -tokenizer +truetype -vm-goto -vm-switch -wddx +xml -xmlreader -xmlrpc -xpm +xsl -yaz -zip +zlib 0 kB 

[ebuild   R   ] net-www/apache-2.0.55-r1  +apache2 -debug -doc -ldap -mpm-leader -mpm-peruser -mpm-prefork -mpm-threadpool +mpm-worker -no-suexec (-selinux) +ssl -static-modules +threads 0 kB 

[ebuild   R   ] mail-client/squirrelmail-1.4.5-r1  +crypt -ldap +mysql -postgres +spell +ssl +vhosts -virus-scan 0 kB 

Total size of downloads: 0 kB

```

```

grep -v ';' /etc/php/apache2-php5/php.ini 

[PHP]

engine = On

zend.ze1_compatibility_mode = Off

short_open_tag = On

asp_tags = Off

precision    =  12

y2k_compliance = On

output_buffering = Off

zlib.output_compression = Off

implicit_flush = Off

unserialize_callback_func=

serialize_precision = 100

allow_call_time_pass_reference = On

safe_mode = Off

safe_mode_gid = Off

safe_mode_include_dir =

safe_mode_exec_dir =

safe_mode_allowed_env_vars = PHP_

safe_mode_protected_env_vars = LD_LIBRARY_PATH

disable_functions =

disable_classes =

expose_php = On

error_reporting  =  E_ALL & ~E_NOTICE

display_errors = On

display_startup_errors = Off

log_errors = Off

log_errors_max_len = 1024

ignore_repeated_errors = Off

ignore_repeated_source = Off

report_memleaks = On

track_errors = Off

variables_order = "EGPCS"

register_globals = Off

register_long_arrays = On

register_argc_argv = On

auto_globals_jit = On

post_max_size = 8M

magic_quotes_gpc = On

magic_quotes_runtime = Off

magic_quotes_sybase = Off

auto_prepend_file =

auto_append_file =

default_mimetype = "text/html"

include_path = ".:/usr/share/php:/usr/share/php5:/sites/libneoteric"

include_path = ".:/usr/share/php:/usr/share/php5:/sites/libneoteric"

doc_root =

user_dir =

extension_dir = /usr/lib/php5/lib/php/extensions/no-debug-non-zts-20050922

enable_dl = On

file_uploads = On

upload_tmp_dir = "/tmp/realtmp"

upload_max_filesize = 200M

allow_url_fopen = On

default_socket_timeout = 60

[Date]

[Syslog]

define_syslog_variables  = Off

[mail function]

SMTP = localhost

smtp_port = 25

[SQL]

sql.safe_mode = Off

[ODBC]

odbc.allow_persistent = On

odbc.check_persistent = On

odbc.max_persistent = -1

odbc.max_links = -1

odbc.defaultlrl = 4096

odbc.defaultbinmode = 1

[MySQL]

mysql.allow_persistent = On

mysql.max_persistent = -1

mysql.max_links = -1

mysql.default_port =

mysql.default_socket =

mysql.default_host =

mysql.default_user =

mysql.default_password =

mysql.connect_timeout = 60

mysql.trace_mode = Off

[MySQLi]

mysqli.max_links = -1

mysqli.default_port = 3306

mysqli.default_socket =

mysqli.default_host =

mysqli.default_user =

mysqli.default_pw =

mysqli.reconnect = Off

[mSQL]

msql.allow_persistent = On

msql.max_persistent = -1

msql.max_links = -1

[PostgresSQL]

pgsql.allow_persistent = On

pgsql.auto_reset_persistent = Off

pgsql.max_persistent = -1

pgsql.max_links = -1

pgsql.ignore_notice = 0

pgsql.log_notice = 0

[Sybase]

sybase.allow_persistent = On

sybase.max_persistent = -1

sybase.max_links = -1

sybase.min_error_severity = 10

sybase.min_message_severity = 10

sybase.compatability_mode = Off

[Sybase-CT]

sybct.allow_persistent = On

sybct.max_persistent = -1

sybct.max_links = -1

sybct.min_server_severity = 10

sybct.min_client_severity = 10

[bcmath]

bcmath.scale = 0

[browscap]

[Informix]

ifx.default_host =

ifx.default_user =

ifx.default_password =

ifx.allow_persistent = On

ifx.max_persistent = -1

ifx.max_links = -1

ifx.textasvarchar = 0

ifx.byteasvarchar = 0

ifx.charasvarchar = 0

ifx.blobinfile = 0

ifx.nullformat = 0

[Session]

session.save_handler = files

session.save_path = "/tmp/realtmp"

session.use_cookies = 1

session.name = PHPSESSID

session.auto_start = 0

session.cookie_lifetime = 0

session.cookie_path = /

session.cookie_domain =

session.serialize_handler = php

session.gc_probability = 1

session.gc_divisor     = 100

session.gc_maxlifetime = 1440

session.bug_compat_42 = 1

session.bug_compat_warn = 1

session.referer_check =

session.entropy_length = 0

session.entropy_file =

session.cache_limiter = nocache

session.cache_expire = 180

session.use_trans_sid = 0

session.hash_function = 0

session.hash_bits_per_character = 4

url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

[MSSQL]

mssql.allow_persistent = On

mssql.max_persistent = -1

mssql.max_links = -1

mssql.min_error_severity = 10

mssql.min_message_severity = 10

mssql.compatability_mode = Off

mssql.secure_connection = Off

date.timezone = "EST"

[Assertion]

[Verisign Payflow Pro]

pfpro.defaulthost = "test-payflow.verisign.com"

pfpro.defaultport = 443

pfpro.defaulttimeout = 30

[COM]

[mbstring]

[FrontBase]

[exif]

[Tidy]

tidy.clean_output = Off

[soap]

soap.wsdl_cache_enabled=1

soap.wsdl_cache_dir="/tmp/realtmp"

soap.wsdl_cache_ttl=86400

```

Last edited by dageyra on Mon Jan 23, 2006 7:30 pm; edited 1 time in total

----------

## grimm26

I am also running squirrelmail on apache2.  I made the switch to dev-lang/php last night, but I did not upgrade to PHP5 - i stuck with 4:

```
bodhi ~ # grep php /etc/portage/package.mask 

>=dev-lang/php-5

bodhi ~ # 
```

Taking a peek at the squirrelmail requirements webpage shows that it does not currently work with PHP5.  So, it looks like you may be out of luck for now.  Personally, I would recommend downgrading to PHP4 unless you have a burning need for PHP5.  Even the guy who did the whole new dev-lang/php setup points out that PHP4 is still the 'official' PHP version.

----------

## dageyra

 *grimm26 wrote:*   

> I am also running squirrelmail on apache2.  I made the switch to dev-lang/php last night, but I did not upgrade to PHP5 - i stuck with 4:
> 
> ```
> bodhi ~ # grep php /etc/portage/package.mask 
> 
> ...

 

Thanks for the suggestion, but prior to the upgrade, we were using PHP 5 and Squirrelmail with no problems.  I believe that PHP 5 support has been available since 1.4.5.  A downgrade to PHP4 has been suggested to solve the problem, but we have been designing around PHP 5.

----------

## fvant

based on squirrelmail Release Notes, latest version 1.4.6 seem to clean up a few php5 related issues..but no ebuild yet   :Confused: 

----------

## dageyra

The problem was a result of PHP fixes.  To resolve the issue, I used the patch located at http://cvs.sf.net/viewcvs.py/squirrelmail/squirrelmail/functions/imap_general.php?r1=1.140.2.29&r2=1.140.2.30

Squirrelmail info [also available under http://www.squirrelmail.org/wiki/KnownBugs]:

https://sourceforge.net/tracker/index.php?func=detail&aid=1366982&group_id=311&atid=100311

----------

## OneInchMen

Could you post a bug report for this on bugzilla?

Since php 5.0.5 got marked stable, a lot of users will have this problem... (unless squirrelmail 1.5.1 gets into portage fast)

-H-

----------

