Skip to content

Commit 5a0a002

Browse files
authored
2868 [Bug] Missing logrotate config file for Roundcube logs (hestiacp#2904)
* hestiacp#2868 Create logrotate config for roundcube * Add info message * Clean up session when mail-wrapper.php runs
1 parent 3c55dc1 commit 5a0a002

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

install/deb/logrotate/roundcube

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/var/log/roundcube/*.log {
2+
rotate 12
3+
monthly
4+
missingok
5+
notifempty
6+
create 644 www-data www-data
7+
}

install/rpm/logrotate/roundcube

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/var/log/roundcube/*.log {
2+
rotate 12
3+
monthly
4+
missingok
5+
notifempty
6+
create 644 www-data www-data
7+
}

install/upgrade/versions/1.6.8.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,11 @@ for version in $($HESTIA/bin/v-list-sys-php plain); do
3636
sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 100M/g" /etc/php/$version/fpm/php.ini
3737
sed -i "s/post_max_size = 8M/post_max_size = 100M/g" /etc/php/$version/fpm/php.ini
3838
sed -i "s/max_execution_time = 30$/max_execution_time = 60/g" /etc/php/$version/fpm/php.ini
39-
done
39+
done
40+
41+
if [ -d /etc/roundcube ]; then
42+
if [ ! -f /etc/logrotate.d/roundcube ]; then
43+
echo "[ * ] Create config roundcube logrotate file"
44+
cp -f $HESTIA_INSTALL_DIR/logrotate/roundcube /etc/logrotate.d/
45+
fi
46+
fi

web/inc/mail-wrapper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,5 @@
3939
if ((!empty($to)) && (!empty($subject))) {
4040
send_email($to,$subject,$mailtext,$from, $from_name);
4141
}
42+
43+
session_destroy();

0 commit comments

Comments
 (0)