diff options
Diffstat (limited to 'roles/webmail')
-rw-r--r-- | roles/webmail/files/etc/nginx/sites-available/roundcube | 2 | ||||
-rw-r--r-- | roles/webmail/files/etc/php/fpm/pool.d/roundcube.conf | 2 | ||||
-rw-r--r-- | roles/webmail/handlers/main.yml | 4 | ||||
-rw-r--r-- | roles/webmail/tasks/roundcube.yml | 30 |
4 files changed, 20 insertions, 18 deletions
diff --git a/roles/webmail/files/etc/nginx/sites-available/roundcube b/roles/webmail/files/etc/nginx/sites-available/roundcube index 46012f8..602668f 100644 --- a/roles/webmail/files/etc/nginx/sites-available/roundcube +++ b/roles/webmail/files/etc/nginx/sites-available/roundcube @@ -65,7 +65,7 @@ server { # https://www.sjoerdlangkemper.nl/2016/11/07/current-state-of-breach-attack/#same-site-cookies gzip off; include snippets/fastcgi-php-ssl.conf; - fastcgi_pass unix:/var/run/php/php7.3-fpm@roundcube.sock; + fastcgi_pass unix:/var/run/php/php7.4-fpm@roundcube.sock; } location ~ "^/(?:plugins|program/js|program/resources|skins)(?:/[[:alnum:]][[:alnum:]\-\._]*)+\.(?:css|eot|gif|html|ico|jpg|js|pdf|png|svg|tiff?|ttf|webp|woff2?)$" { diff --git a/roles/webmail/files/etc/php/fpm/pool.d/roundcube.conf b/roles/webmail/files/etc/php/fpm/pool.d/roundcube.conf index 1512d66..1a7a1d8 100644 --- a/roles/webmail/files/etc/php/fpm/pool.d/roundcube.conf +++ b/roles/webmail/files/etc/php/fpm/pool.d/roundcube.conf @@ -1,7 +1,7 @@ [roundcube] user = _roundcube group = nogroup -listen = /run/php/php7.3-fpm@roundcube.sock +listen = /run/php/php7.4-fpm@roundcube.sock listen.owner = www-data listen.group = www-data listen.mode = 0600 diff --git a/roles/webmail/handlers/main.yml b/roles/webmail/handlers/main.yml index 5b730d7..8c70168 100644 --- a/roles/webmail/handlers/main.yml +++ b/roles/webmail/handlers/main.yml @@ -2,8 +2,8 @@ - name: Restart stunnel@ldap service: name=stunnel4@ldap state=restarted -- name: Restart php7.3-fpm - service: name=php7.3-fpm state=restarted +- name: Restart php7.4-fpm + service: name=php7.4-fpm state=restarted - name: Restart Nginx service: name=nginx state=restarted diff --git a/roles/webmail/tasks/roundcube.yml b/roles/webmail/tasks/roundcube.yml index dc73358..bd174bc 100644 --- a/roles/webmail/tasks/roundcube.yml +++ b/roles/webmail/tasks/roundcube.yml @@ -10,8 +10,8 @@ - php-enchant ## TODO: run php as a dedicated system user -- name: Configure PHP 7.3 Zend opcache - lineinfile: dest=/etc/php/7.3/fpm/php.ini +- name: Configure PHP 7.4 Zend opcache + lineinfile: dest=/etc/php/7.4/fpm/php.ini regexp='^;?{{ item.var }}\\s*=' line="{{ item.var }} = {{ item.value }}" owner=root group=root @@ -20,7 +20,7 @@ - { var: opcache.memory_consumption, value: 128 } - { var: opcache.revalidate_freq, value: 60 } notify: - - Restart php7.3-fpm + - Restart php7.4-fpm - name: Create '_roundcube' user user: name=_roundcube system=yes @@ -31,21 +31,21 @@ password=! state=present -- name: Delete PHP 7.3 FPM's www pool - file: path=/etc/php/7.3/fpm/pool.d/www.conf state=absent +- name: Delete PHP 7.4 FPM's www pool + file: path=/etc/php/7.4/fpm/pool.d/www.conf state=absent notify: - - Restart php7.3-fpm + - Restart php7.4-fpm -- name: Configure PHP 7.3 FPM's roundcube pool +- name: Configure PHP 7.4 FPM's roundcube pool copy: src=etc/php/fpm/pool.d/roundcube.conf - dest=/etc/php/7.3/fpm/pool.d/roundcube.conf + dest=/etc/php/7.4/fpm/pool.d/roundcube.conf owner=root group=root mode=0644 notify: - - Restart php7.3-fpm + - Restart php7.4-fpm -- name: Start php7.3-fpm - service: name=php7.3-fpm state=started +- name: Start php7.4-fpm + service: name=php7.4-fpm state=started # Make it sticky: `dpkg-statoverride --add _roundcube nogroup 0700 /var/lib/roundcube/temp` - name: Create cache directory /var/lib/roundcube/temp @@ -75,7 +75,7 @@ - aspell-sv - name: Install Roundcube - apt: pkg={{ packages }} default_release={{ ansible_lsb.codename }}-backports + apt: pkg={{ packages }} vars: packages: - roundcube-core @@ -123,6 +123,8 @@ - { var: smtp_auth_type, value: "'PLAIN'" } - { var: smtp_user, value: "'%u'" } - { var: smtp_pass, value: "'%p'" } + # avoid timeout + - { var: max_recipients, value: "15" } # System - { var: force_https, value: "true" } - { var: login_autocomplete, value: "2" } @@ -182,8 +184,8 @@ with_items: - managesieve -- name: Start php7.3-fpm - service: name=php7.3-fpm state=started +- name: Start php7.4-fpm + service: name=php7.4-fpm state=started - name: Copy /etc/cron.d/roundcube-core copy: src=etc/cron.d/roundcube-core |