How to upgrade roundcubemail! From 1.1.1 to 1.3.3

This day we make update update to new version roundcubemail-1.3.3

    1. First step  make backup of actual version.
cp -R -p webmail_old/ /root/work/webmail_old-20171221
mysqldump -uroot -p yourpassword --routines --single-transaction your_roundcube_db > /etc/sqldump/your_roundcube_db.dump.sql

2. Second step download new version.


3. Unarhive and test if you have all you need to run

tar -zxvf roundcubemail-1.3.3-complete.tar.gz -C /path/to/folder/
( ex: tar -zxvf roundcubemail-1.3.3-complete.tar.gz -C /var/www/html/ )
read file roundcubemail-1.3.3/UPGRADING for REQUIREMENTS and roundcubemail-1.3.3/INSTALL

4. Final step, upgrade roundcubemail.

roundcubemail-1.3.3/bin/ webmail_old/
Upgrading from 1.1.1. Do you want to continue? (y/N)

Tips after update:
a. Check .htaccess settings (some php settings could become required)
b. If you’re using build-in addressbook, run indexing script /bin/
c. When upgrading from version older than 0.6-beta you should make sure
your folder settings contain namespace prefix. For example Courier users
should add INBOX. prefix to folder names in main configuration file.
d. Change layout in file  roundcubemail-1.3.3/config/

// Interface layout. Default: 'widescreen'.
//  'widescreen' - three columns
//  'desktop'    - two columns, preview on bottom
//  'list'       - two columns, no preview
$config['layout'] = 'widescreen';

default come with ‘widescreen’ but I like ‘desktop’.
and ‘show_images‘ change to 1.

// display remote inline images
// 0 - Never, always ask
// 1 - Ask if sender is not in address book
// 2 - Always show inline images
$config['show_images'] = 0;

Enjoy !

VirtualBox command line create Snapshot

Today we want to create a snapshot from command line interface on VirtualBox.
Let see the command sintax:

VBoxManage snapshot <uuid|vmname>
 take <name> [--description <desc>] [--live]
 [--uniquename Number,Timestamp,Space,Force] |
 delete <uuid|snapname> |
 restore <uuid|snapname> |
 restorecurrent |
 edit <uuid|snapname>|--current
 [--name <name>]
 [--description <desc>] |
 list [--details|--machinereadable]
 showvminfo <uuid|snapname>

Now we take a snapshot:

VBoxManage snapshot Team76 take snap-20170502-Team76

Team76 it is the name of  virtual machine ‘vmname’.
snap-20170502-Team76 it is the name of ‘snapname’.

If you get an error when you make  a snapshot your sistem will be shutdown.

Now we check if the snapshot is recorded:

vboxmanage showvminfo Team76



Name: snap-20170502-Team76 (UUID: f29f55a3-ff0a-4732-a287-c8399a73d2a5) *

In a future if you will need to revert back to the snapshot:

VBoxManage snapshot Team76 restore snap-20170502-Team76

If you need to detele old snapshot you have to write this:

VBoxManage snapshot Team76 delete snap-old-Team76

How to reset admin password wordpress from SQL.

Q: How to reset WordPress password via SQL ?

A: Login to mysql database

mysql -u wordpress -p

use db_wordprs;

MariaDB [(none)]> use db_wordprs;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

MariaDB [db_wordprs]> select * from wp_users;

| ID | user_login | user_pass | user_nicename | user_email | user_url | user_registered | user_activation_key | user_status | display_name |
| 1 | admin | $P$BeI/6SDDb5x33lthRtdqaoVuO8.TfH/ | admin | | | 2016-10-26 07:55:16 | | 0 | admin |
1 row in set (0.00 sec)

And now change / update password:
UPDATE wp_users SET user_pass= MD5(‘Your-Password’) WHERE ID = 1;

MariaDB [db_rezes]> UPDATE wp_users SET user_pass= MD5(‘Your-Password’) WHERE ID = 1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

Enjoy, done.

How to fix auto-read-only mdadm.

This guide shows you a simple way to fix your mdadm raid based drives which are not syncing or in the auto-read-only mode.

To find the names of your drives which are under auto-read-only mode or not syncing

cat /proc/mdstat

Force the drives to sync.

mdadm --readwrite /dev/md9

Replace md9 with the name of the drive like md127 etc.
server ~ # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear] [multipath]
md125 : active (auto-read-only) raid1 sda1[0] sdb1[1]
      192640 blocks [2/2] [UU]

md126 : active raid1 sda5[0] sdb5[1]
      97650944 blocks [2/2] [UU]

md127 : active raid1 sdb2[1] sda2[0]
      97659008 blocks [2/2] [UU]
      [=>...................]  resync =  8.8% (8686848/97659008) finish=64.0min speed=23148K/sec

md128 : active (auto-read-only) raid1 sdb6[1] sda6[0]
      288875200 blocks [2/2] [UU]

Source Info:

CP: max source files number arguments for copy utility


Today we have a problem: We get this error when we try to copy over 32356 file in other folder.
[root@mail]# cp -p office_23\* office\
-bash: /bin/cp: Argument list too long

Solutions: run your command in a loop.

[root@mail]# for file in office_23\*; do cp -p “$file” office\; done

And works very well.

Roundcubemail change default format for date_short

If you want to change time show for mail in roundcubemail you need to do next:

[root@mail ~]# grep date_short /var/www/html/roundcubemail/config/
//$config['date_short'] = 'D H:i';
$config['date_short'] = 'd-m-Y H:i';

But no effect ? Go to Settings —–> Preferences —-> User Interfaces and uncheck “Pretty Dates” like picture below.

Roundcubemail date format

Ubuntu server 12.04 LTS with GUI and xRDP.

Some people like GUI interface and some steps show here.

First step is to go comand line interface:

sudo apt-get update
sudo apt-get install ubuntu-desktop

install Gnome 
apt-get install gnome-shell

and reboot

After reboot we need to install xRDP

apt-get install xrdp

root@server-ubuntu-12:~# sysv-rc-conf --list | grep xrdp
xrdp 0:off 1:off 2:on 3:on 4:on 5:on 6:off