User Tools

Site Tools


computing:roundcube

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:roundcube [2026/11/02 17:36] – oemb1905computing:roundcube [2026/11/07 17:28] (current) – oemb1905
Line 155: Line 155:
 systemctl restart apache2 php8.4-fpm systemctl restart apache2 php8.4-fpm
 </code> </code>
 +
 +After update, you might need to update db tables or what not. Check the forums. Here's a 1.6 to 1.7 change and the script that roundcube provided to update the db:
 +
 +  cd /var/www/roundcube
 +  sudo -u www-data ./bin/updatedb.sh --package=roundcube --dir=SQL
  
 To setup a fail2ban filter that works with this setup, use something like the following: To setup a fail2ban filter that works with this setup, use something like the following:
Line 186: Line 191:
   chown www-data:www-data /var/www/roundcube/logs/errors.log   chown www-data:www-data /var/www/roundcube/logs/errors.log
  
- --- //[[alerts@haacksnetworking.org|oemb1905]] 2026/11/02 17:36//+For nginx, you can use these: 
 + 
 +<code> 
 +server { 
 +    listen 80; 
 +    listen [::]:80; 
 +    server_name mail.domain.com; 
 +    return 301 https://$host$request_uri; 
 +} 
 + 
 +server { 
 +    listen 443 ssl http2; 
 +    listen [::]:443 ssl http2; 
 +    server_name mail.domain.com; 
 + 
 +    root /var/www/roundcube/public_html; 
 +    index index.php; 
 + 
 +    ssl_certificate     /etc/letsencrypt/live/mail.domain.com/fullchain.pem; 
 +    ssl_certificate_key /etc/letsencrypt/live/mail.domain.com/privkey.pem; 
 + 
 +    access_log /var/log/nginx/roundcube_access.log; 
 +    error_log  /var/log/nginx/roundcube_error.log; 
 + 
 +    location / { 
 +        try_files $uri $uri/ /index.php?$query_string; 
 +    } 
 + 
 +    # Required for 1.7+ static assets (skins, plugins, program) 
 +    location ~ ^/(assets|skins|plugins|program)/ { 
 +        try_files $uri /static.php?$args; 
 +    } 
 + 
 +    location ~ \.php(?:$|/) { 
 +        fastcgi_split_path_info ^(.+\.php)(/.+)$; 
 +        include snippets/fastcgi-php.conf; 
 +        fastcgi_pass unix:/run/php/php8.4-fpm.sock; 
 +        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
 +        fastcgi_param PATH_INFO $fastcgi_path_info; 
 +        include fastcgi_params; 
 +    } 
 + 
 +    # Lock down installer after setup - UNLOCK / COMMENT OUT when fixing 
 +    #location ~ ^/(installer|SQL)/ { 
 +    #    deny all; 
 +    #} 
 + 
 +    location ~ /\.ht { 
 +        deny all; 
 +    } 
 +} 
 +</code> 
 + 
 +And for fail2ban: 
 + 
 +<code> 
 +nano /etc/fail2ban/filter.d/roundcube-haack.conf 
 +[Definition] 
 +failregex = ^<HOST> .* "POST /.*\?_task=login HTTP.*" 401 
 +            ^<HOST> .* "POST /index\.php\?_task=login HTTP.*" 401 
 +            ^<HOST> .* "POST /.* HTTP.*" 401 
 +ignoreregex = 
 +</code> 
 + 
 +<code> 
 +nano /etc/fail2ban/jail.local 
 +[roundcube-haack] 
 +enabled  = true 
 +port     = http,https 
 +filter   = roundcube-haack 
 +logpath  = /var/log/nginx/roundcube_access.log 
 +maxretry = 2 
 +</code> 
 + 
 + --- //[[alerts@haacksnetworking.org|oemb1905]] 2026/11/07 17:19//
computing/roundcube.1793641009.txt.gz · Last modified: by oemb1905