Enhancement #2843

Avoid excessive postfix reload

Added by Davide Principi almost 7 years ago. Updated almost 7 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-mail-server
Target version:v6.5
Resolution: NEEDINFO:No

Description

We could avoid postfix reload if only DB files are modified:

http://www.postfix.org/DATABASE_README.html#detect

This will speed up user, group, and mail alias related events.

Associated revisions

Revision 38aa2ab5
Added by Davide Principi almost 7 years ago

Avoid excessive postfix reloads. Refs #2843

History

#1 Updated by Davide Principi almost 7 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Davide Principi
  • % Done changed from 20 to 30

#2 Updated by Davide Principi almost 7 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 30 to 60

Test case

  • Upgrade to modified version
  • Check user group and mail aliases are created/deleted/modified immediatly after changes from server-manager. For instance run smtptest:
      smtptest --ehlo vboxnet1.tld --to newemail@vboxnet0.tld --from davidep@example.com --addr 8.8.8.8   --port 25
    

#3 Updated by Davide Principi almost 7 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

In nethserver-testing:
nethserver-mail-common-1.3.3-1.19git5aeec2c.ns6.noarch.rpm
nethserver-mail-server-1.7.0-1.9git836d38e.ns6.noarch.rpm
nethserver-mail-filter-1.1.6-5.0git2ea5d3e8.ns6.noarch.rpm

#4 Updated by Giacomo Sanchietti almost 7 years ago

  • Assignee set to Giacomo Sanchietti

#5 Updated by Giacomo Sanchietti almost 7 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 70 to 90

After alias creation from web interface, Postfix is not reloaded:

Sep  3 07:38:18 localhost /sbin/e-smith/db[6106]: /var/lib/nethserver/db/accounts: OLD test3@=(undefined)
Sep  3 07:38:18 localhost /sbin/e-smith/db[6106]: /var/lib/nethserver/db/accounts: NEW test3@=pseudonym
Sep  3 07:38:18 localhost /sbin/e-smith/db[6106]: /var/lib/nethserver/db/accounts: OLD test3@=pseudonym
Sep  3 07:38:18 localhost /sbin/e-smith/db[6106]: /var/lib/nethserver/db/accounts: NEW test3@=pseudonym|Access|public
Sep  3 07:38:18 localhost /sbin/e-smith/db[6106]: /var/lib/nethserver/db/accounts: OLD test3@=pseudonym|Access|public
Sep  3 07:38:18 localhost /sbin/e-smith/db[6106]: /var/lib/nethserver/db/accounts: NEW test3@=pseudonym|Access|public|Account|admin
Sep  3 07:38:18 localhost /sbin/e-smith/db[6106]: /var/lib/nethserver/db/accounts: OLD test3@=pseudonym|Access|public|Account|admin
Sep  3 07:38:18 localhost /sbin/e-smith/db[6106]: /var/lib/nethserver/db/accounts: NEW test3@=pseudonym|Access|public|Account|admin|Description|
Sep  3 07:38:18 localhost esmith::event[6108]: Event: pseudonym-create test3@
Sep  3 07:38:19 localhost /etc/e-smith/events/pseudonym-create/S01nethserver-mail-pseudonym-initialize[6109]: /var/lib/nethserver/db/accounts: OLD test3@=pseudonym|Access|public|Account|admin|Description|
Sep  3 07:38:19 localhost /etc/e-smith/events/pseudonym-create/S01nethserver-mail-pseudonym-initialize[6109]: /var/lib/nethserver/db/accounts: NEW test3@=pseudonym|Access|public|Account|admin|Description||_prevAccount|admin
Sep  3 07:38:19 localhost esmith::event[6108]: Action: /etc/e-smith/events/pseudonym-create/S01nethserver-mail-pseudonym-initialize SUCCESS [0.046536]
Sep  3 07:38:19 localhost esmith::event[6108]: expanding /etc/postfix/vmailbox
Sep  3 07:38:19 localhost esmith::event[6108]: expanding /etc/postfix/virtual
Sep  3 07:38:19 localhost esmith::event[6108]: expanding /etc/postfix/internal_access
Sep  3 07:38:19 localhost esmith::event[6108]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.105966]
Sep  3 07:38:19 localhost esmith::event[6108]: Action: /etc/e-smith/events/pseudonym-create/S30nethserver-mail-postmap-update SUCCESS [0.088015]
Sep  3 07:38:19 localhost esmith::event[6108]: Action: /etc/e-smith/events/pseudonym-create/S30nethserver-mail-pseudonym-update SUCCESS [0.125732]
Sep  3 07:38:19 localhost esmith::event[6108]: Event: pseudonym-create SUCCESS

But the alias is available:

[root@localhost ~]# postalias -q test3@mydomain.loc /etc/postfix/virtual
admin

#6 Updated by Giacomo Sanchietti almost 7 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Released in nethserver-updates:
  • nethserver-mail-server-1.8.0-1.ns6.noarch.rpm
  • nethserver-mail-common-1.4.0-1.ns6.noarch.rpm
  • nethserver-mail-filter-1.2.0-1.ns6.noarch.rpm
New documentation:

Also available in: Atom PDF