This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| computing:roundcube [2025/02/15 22:30] – oemb1905 | computing:roundcube [2026/11/07 17:28] (current) – oemb1905 | ||
|---|---|---|---|
| Line 97: | Line 97: | ||
| < | < | ||
| < | < | ||
| - | < | + | < |
| < | < | ||
| + | < | ||
| + | < | ||
| < | < | ||
| - | Change " | + | Change " |
| - | | + | |
| + | | ||
| ' | ' | ||
| ' | ' | ||
| Line 136: | Line 139: | ||
| ' | ' | ||
| ' | ' | ||
| - | ];> | + | ]; |
| - | Next, we will... | + | Alright, the basic configuration is now done. I can send and receive emails using jonathan@domain.com, with full health spf, dkim, and appropriate dmarc setup. To update: |
| + | < | ||
| + | cd /var/www | ||
| + | wget https:// | ||
| + | tar xvf roundcubemail-1.6.15-complete.tar.gz | ||
| + | rm roundcubemail-1.6.15-complete.tar.gz | ||
| + | rm -f roundcube | ||
| + | ln -s roundcubemail-1.6.15 roundcube | ||
| + | cp roundcubemail-1.6.10/ | ||
| + | chown root:root -R roundcube | ||
| + | chown www-data: | ||
| + | systemctl restart apache2 php8.4-fpm | ||
| + | </ | ||
| - | --- // | + | 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 / | ||
| + | sudo -u www-data ./ | ||
| + | |||
| + | To setup a fail2ban filter that works with this setup, use something like the following: | ||
| + | |||
| + | < | ||
| + | nano / | ||
| + | [Definition] | ||
| + | failregex = ^\[\S+\s+\S+\s+\S+\]: | ||
| + | ignoreregex = | ||
| + | </ | ||
| + | |||
| + | Inside jail.local or an appropriate sub-directory, | ||
| + | < | ||
| + | [roundcube-haack] | ||
| + | enabled | ||
| + | filter | ||
| + | logpath | ||
| + | port = http,https | ||
| + | maxretry = 2 | ||
| + | datepattern = ^\[DayMONExYear 24hour: | ||
| + | </ | ||
| + | |||
| + | This command can help during testing the jail: | ||
| + | |||
| + | fail2ban-client reload --restart --unban roundcube-haack | ||
| + | |||
| + | Make sure the log directories and files exist and have proper perms: | ||
| + | |||
| + | mkdir -p / | ||
| + | touch / | ||
| + | chown www-data: | ||
| + | |||
| + | For nginx, you can use these: | ||
| + | |||
| + | < | ||
| + | server { | ||
| + | listen 80; | ||
| + | listen [::]:80; | ||
| + | server_name mail.domain.com; | ||
| + | return 301 https:// | ||
| + | } | ||
| + | |||
| + | server { | ||
| + | listen 443 ssl http2; | ||
| + | listen [::]:443 ssl http2; | ||
| + | server_name mail.domain.com; | ||
| + | |||
| + | root / | ||
| + | index index.php; | ||
| + | |||
| + | ssl_certificate | ||
| + | ssl_certificate_key / | ||
| + | |||
| + | access_log / | ||
| + | error_log | ||
| + | |||
| + | location / { | ||
| + | try_files $uri $uri/ / | ||
| + | } | ||
| + | |||
| + | # Required for 1.7+ static assets (skins, plugins, program) | ||
| + | location ~ ^/ | ||
| + | try_files $uri / | ||
| + | } | ||
| + | |||
| + | location ~ \.php(?: | ||
| + | fastcgi_split_path_info ^(.+\.php)(/ | ||
| + | include snippets/ | ||
| + | fastcgi_pass unix:/ | ||
| + | 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 ~ ^/ | ||
| + | # deny all; | ||
| + | #} | ||
| + | |||
| + | location ~ /\.ht { | ||
| + | deny all; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | And for fail2ban: | ||
| + | |||
| + | < | ||
| + | nano / | ||
| + | [Definition] | ||
| + | failregex = ^< | ||
| + | ^< | ||
| + | ^< | ||
| + | ignoreregex = | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | nano / | ||
| + | [roundcube-haack] | ||
| + | enabled | ||
| + | port = http,https | ||
| + | filter | ||
| + | logpath | ||
| + | maxretry = 2 | ||
| + | </ | ||
| + | |||
| + | --- // | ||