Bug #3093
Error in /etc/postfix/virtual and /etc/dovecot/dovecot.conf template
Status: | CLOSED | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | nethserver-mail-filter | |||
Target version: | v6.6 | |||
Security class: | Resolution: | |||
Affected version: | v6.5 | NEEDINFO: | No |
Description
To reproduce
In a clean nethserver 6.5 installation, install nethserver-mail-filter
.
nethserver-mail-filter-1.2.1-1.ns6.noarch
In /var/log/messages:
Mar 23 15:39:47 localhost esmith::event[2647]: expanding /etc/amavisd.conf Mar 23 15:39:47 localhost esmith::event[2647]: expanding /etc/sudoers Mar 23 15:39:47 localhost esmith::event[2647]: expanding /etc/dovecot/dovecot.conf Mar 23 15:39:47 localhost esmith::event[2647]: ERROR: Cannot create output file //etc/dovecot/dovecot.conf.2649 No such file or directory Mar 23 15:39:47 localhost esmith::event[2647]: at /etc/e-smith/events/actions/generic_template_expand line 64 Mar 23 15:39:47 localhost esmith::event[2647]: [WARNING] expansion of /etc/dovecot/dovecot.conf failed Mar 23 15:39:47 localhost esmith::event[2647]: expanding /etc/postfix/virtual Mar 23 15:39:47 localhost esmith::event[2647]: ERROR in /etc/e-smith/templates//etc/postfix/virtual/15amavis_accounts: Program fragment delivered error <<Can't call method "getDeliveryDomains" on an undefined va lue at /etc/e-smith/templates//etc/postfix/virtual/15amavis_accounts line 11.>> at template line 4 Mar 23 15:39:47 localhost esmith::event[2647]: ERROR: Template processing failed for //etc/postfix/virtual: 1 fragment generated errors Mar 23 15:39:47 localhost esmith::event[2647]: at /etc/e-smith/events/actions/generic_template_expand line 64 Mar 23 15:39:47 localhost esmith::event[2647]: [WARNING] expansion of /etc/postfix/virtual failed Mar 23 15:39:47 localhost esmith::event[2647]: expanding /etc/postfix/master.cf Mar 23 15:39:47 localhost esmith::event[2647]: expanding /etc/postfix/main.cf Mar 23 15:39:47 localhost esmith::event[2647]: expanding /etc/postfix/sender_access Mar 23 15:39:47 localhost esmith::event[2647]: expanding /etc/cron.d/sa-update Mar 23 15:39:47 localhost esmith::event[2647]: Action: /etc/e-smith/events/actions/generic_template_expand FAILED: 1 [0.263624] [...] Mar 23 15:40:09 localhost esmith::event[2647]: Event: nethserver-mail-filter-update FAILED
Event nethserver-mail-filter-update fails.
Related issues
Associated revisions
Imported fragments from nethserver-mail-filter. Refs #3093
Moved fragments to nethserver-mail-server. Refs #3093
Skip spam training if sa-learn command is not installed. Refs #3093
History
#1 Updated by Davide Principi over 6 years ago
- Description updated (diff)
#2 Updated by Davide Principi over 6 years ago
- root/etc/e-smith/templates/etc/dovecot/dovecot.conf/50spam_training
- root/etc/e-smith/templates/etc/postfix/transport/40spam_training
- root/etc/e-smith/templates/etc/postfix/master.cf/40spam_training
- root/usr/libexec/nethserver/spam-training.sh
So expansion of dovecot.conf and dovecot restart can be removed. The spam-training.sh
script must check /usr/bin/sa-learn
availability before putting a message in spamtrain queue.
- root/etc/e-smith/templates/etc/postfix/virtual/15amavis_accounts
#3 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
#4 Updated by Davide Principi over 6 years ago
- Related to Bug #2979: Smarthost configuration: cannot disable authentication added
#5 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
Test case
- Check standalone installation of nethserver-mail-server (on server-only)
- Move a message into junkmail, no error should be reported
- Check standalone installation of nethserver-mail-filter (on gateway server)
- Check the bug is not reproducible
#6 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-server-1.8.6-1.2.g70ba93e.ns6.noarch.rpm
nethserver-mail-filter-1.3.0-1.1.gee40f97.ns6.noarch.rpm
#7 Updated by Giacomo Sanchietti over 6 years ago
- Assignee set to Giacomo Sanchietti
#8 Updated by Giacomo Sanchietti over 6 years ago
- Status changed from ON_QA to TRIAGED
- Assignee deleted (
Giacomo Sanchietti) - % Done changed from 70 to 20
Davide Principi wrote:
Test case
- Check standalone installation of nethserver-mail-server (on server-only)
- Move a message into junkmail, no error should be reported
No error is reported, but still the spam training is always executed since /usr/bin/sa-learn
is always present.
Find another condition to check if mail-filter is installed.
- Check standalone installation of nethserver-mail-filter (on gateway server)
- Check the bug is not reproducible
This one is verified.
#9 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
#10 Updated by Davide Principi over 6 years ago
- Status changed from ON_DEV to MODIFIED
- % Done changed from 30 to 60
NOT MODIFIED
Giacomo Sanchietti wrote:
No error is reported, but still the spam training is always executed since
/usr/bin/sa-learn
is always present.
You're right, the check is not needed. Anyway the training succeeds, so I'd keep the code as-is.
The bayes DB is filled but is not actually used, because mail-filter is not installed. This does not harm and could be useful instead: the mail-filter can be installed at a later time, or the DB is copied to another host.
#11 Updated by Davide Principi over 6 years ago
- Status changed from MODIFIED to ON_QA
- Assignee changed from Davide Principi to Giacomo Sanchietti
- % Done changed from 60 to 70
#12 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
#13 Updated by Giacomo Sanchietti over 6 years ago
- Status changed from VERIFIED to CLOSED
- % Done changed from 90 to 100
- nethserver-mail-server-1.8.7-1.ns6.noarch.rpm
- nethserver-mail-filter-1.3.1-1.ns6.noarch.rpm