Bug #3124

SMTP proxy: error on email domain creation

Added by Davide Principi over 6 years ago. Updated over 6 years ago.

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

100%

Category:nethserver-mail-common
Target version:v6.6
Security class: Resolution:
Affected version:v6.6-final NEEDINFO:No

Description

An error message is displayed when a mail domain is added.

In /var/log/messages:

Apr 16 12:00:08 mail2 httpd-admin: [WARNING] NethServer\Module\Mail\Domain\Modify: file_get_contents(/var/lib/nethserver/mail-disclaimers/test.yy.raw): failed to open stream: No such file or directory
Apr 16 12:00:08 mail2 esmith::event[11918]: Event: domain-create test.yy
Apr 16 12:00:08 mail2 esmith::event[11918]: expanding /etc/amavisd.conf
Apr 16 12:00:08 mail2 esmith::event[11918]: expanding /etc/postfix/vmailbox
Apr 16 12:00:08 mail2 esmith::event[11918]: expanding /etc/postfix/virtual
Apr 16 12:00:08 mail2 esmith::event[11918]: ERROR: No templates were found for /etc/postfix/virtual.
Apr 16 12:00:08 mail2 esmith::event[11918]:  at /etc/e-smith/events/actions/generic_template_expand line 64
Apr 16 12:00:08 mail2 esmith::event[11918]: [WARNING] expansion of /etc/postfix/virtual failed
Apr 16 12:00:08 mail2 esmith::event[11918]: expanding /etc/postfix/main.cf
Apr 16 12:00:08 mail2 esmith::event[11918]: expanding /etc/postfix/transport
Apr 16 12:00:08 mail2 esmith::event[11918]: Action: /etc/e-smith/events/actions/generic_template_expand FAILED: 1 [0.349358]
Apr 16 12:00:10 mail2 esmith::event[11918]: Action: /etc/e-smith/events/domain-create/S30nethserver-mail-postmap-update SUCCESS [1.683818]
Apr 16 12:00:10 mail2 esmith::event[11918]: [INFO] service amavisd reload
Apr 16 12:00:11 mail2 esmith::event[11918]: Reloading amavisd: [  OK  ]#015
Apr 16 12:00:11 mail2 esmith::event[11918]: [INFO] amavisd reload
Apr 16 12:00:12 mail2 esmith::event[11918]: [INFO] service postfix reload
Apr 16 12:00:12 mail2 esmith::event[11918]: Reloading postfix: [  OK  ]#015
Apr 16 12:00:12 mail2 esmith::event[11918]: [INFO] postfix reload
Apr 16 12:00:12 mail2 esmith::event[11918]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [2.118575]
Apr 16 12:00:12 mail2 esmith::event[11918]: Event: domain-create FAILED

Installed packages:

rpm -qa | grep -F .ns6 | sort
[...]
nethserver-firewall-base-2.5.1-1.ns6.noarch
[..]
nethserver-mail-common-1.4.3-1.ns6.noarch
nethserver-mail-filter-1.3.1-1.ns6.noarch
[...]

download.png (18.7 KB) Alessio Fattorini, 04/20/2015 06:47 AM

Associated revisions

Revision 15be81ca
Added by Davide Principi over 6 years ago

Remove /etc/postfix/virtual template expansion. Refs #3124

Revision 37759d63
Added by Davide Principi over 6 years ago

Don't expand /etc/postfix/virtual template during domain-* events. Refs #3124

Revision 270ac2ee
Added by Davide Principi over 6 years ago

Set default postfix/access prop "public". Refs #3124

History

#1 Updated by Davide Marini over 6 years ago

"Network services" section : smtp port 25 is not present in the ports list.

#2 Updated by Alessio Fattorini over 6 years ago

Same problem modifying email filter configuration, see attachments

#3 Updated by Davide Principi over 6 years ago

  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20
  • Affected version set to v6.6-final

#4 Updated by Davide Principi over 6 years ago

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

#5 Updated by Davide Principi over 6 years ago

In a SMTP PROXY host, the /etc/postfix/virtual table is expanded by domain-* and nethserver-mail-filter-save events

[davidep@nethservice ~]$ rpm -ql nethserver-mail-common | grep virtual
/etc/e-smith/events/domain-create/templates2expand/etc/postfix/virtual
/etc/e-smith/events/domain-delete/templates2expand/etc/postfix/virtual
/etc/e-smith/events/domain-modify/templates2expand/etc/postfix/virtual
/etc/e-smith/templates/etc/postfix/main.cf/60virtual_mailbox_domains
[davidep@nethservice ~]$ rpm -ql nethserver-mail-filter | grep virtual
/etc/e-smith/events/nethserver-mail-filter-save/templates2expand/etc/postfix/virtual

We must remove those expansions.

#6 Updated by Davide Principi over 6 years ago

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

MODIFIED

#7 Updated by Davide Principi over 6 years ago

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

In nethserver-testing:
nethserver-mail-common-1.4.3-1.1.g37759d6.ns6.noarch.rpm
nethserver-mail-common-1.4.3-1.2.g270ac2e.ns6.noarch.rpm
nethserver-mail-filter-1.3.1-1.1.g15be81c.ns6.noarch.rpm

#8 Updated by Giacomo Sanchietti over 6 years ago

  • Assignee set to Giacomo Sanchietti

#9 Updated by Giacomo Sanchietti over 6 years ago

Test case 1: PASSED
  • Install nethserver-mail-common
  • Create a new domain/Modify an existing one
  • No error is raised, /etc/postfix/virtual not expanded
Test case 2: PASSED
  • Install nethserver-mail-filter
  • Create a new domain/Modify an existing one
  • No error is raised, /etc/postfix/virtual not expanded
Test case 3: PASSED
  • Install nethserver-mail-server
  • Create a new domain/Modify or delete an existing one
  • No error is raised, /etc/postfix/virtual is expanded

Note
Every time a domain is created or modified, the following warning appears in /var/log/messages:

 [WARNING] NethServer\Module\Mail\Domain\Modify: file_get_contents(/var/lib/nethserver/mail-disclaimers/yourtest.co.raw): failed to open stream: No such file or directory

#10 Updated by Giacomo Sanchietti over 6 years ago

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

#11 Updated by Davide Principi over 6 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100

In nethserver-updates:
nethserver-mail-common-1.4.4-1.ns6.noarch.rpm
nethserver-mail-filter-1.3.2-1.ns6.noarch.rpm

Also available in: Atom PDF