Enhancement #2153

Mail-server: avoid warning if Samba is not installed

Added by Giacomo Sanchietti almost 8 years ago. Updated over 7 years ago.

Status:CLOSEDStart date:11/12/2013
Priority:NormalDue date:11/13/2013
Assignee:-% Done:

100%

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

Description

If samba package is not installed, the system will raise warnings during expansion of /etc/dovecot/active-directory.conf and /etc/postfix/active-directory.cf templates.

Extract form messages:

Jul  4 14:54:32 localhost esmith::event[15681]: WARNING in /etc/e-smith/templates//etc/dovecot/active-directory.conf/10base: Can't exec "/usr/bin/net": No such file or directory at /etc/e-smith/templates//etc/dovecot/active-directory.conf/10base line 4.
Jul  4 14:54:32 localhost esmith::event[15681]: WARNING in /etc/e-smith/templates//etc/dovecot/active-directory.conf/10base: readline() on closed filehandle C
FG at /etc/e-smith/templates//etc/dovecot/active-directory.conf/10base line 8.
Jul  4 14:54:32 localhost esmith::event[15681]: WARNING: Template processing succeeded for //etc/dovecot/active-directory.conf: 1 fragment generated warnings
Jul  4 14:54:32 localhost esmith::event[15681]:  at /etc/e-smith/events/actions/generic_template_expand line 56

Jul  4 14:54:32 localhost esmith::event[15681]: WARNING in /etc/e-smith/templates//etc/postfix/active-directory.cf/10base: Can't exec "/usr/bin/net": No such file or directory at /etc/e-smith/templates//etc/postfix/active-directory.cf/10base line 8.
Jul  4 14:54:32 localhost esmith::event[15681]: WARNING in /etc/e-smith/templates//etc/postfix/active-directory.cf/10base: readline() on closed filehandle CFG
 at /etc/e-smith/templates//etc/postfix/active-directory.cf/10base line 12.
Jul  4 14:54:32 localhost esmith::event[15681]: WARNING: Template processing succeeded for //etc/postfix/active-directory.cf: 1 fragment generated warnings
Jul  4 14:54:32 localhost esmith::event[15681]:  at /etc/e-smith/events/actions/generic_template_expand line 56

Add a check inside the fragment to avoid the warning.

Associated revisions

Revision 5ed62e54
Added by Davide Principi over 7 years ago

Check if /usr/bin/net exists. Refs #2153

Dovecot and Postfix Active Directory configuration templates must
check if /usr/bin/net executable exists to avoid template warnings. We
cannot assume samba is always installed.

History

#1 Updated by Giacomo Sanchietti almost 8 years ago

  • Target version changed from ~FUTURE to v6.5-beta3

#2 Updated by Giacomo Sanchietti almost 8 years ago

  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20
  • Estimated time set to 1.00

#3 Updated by Davide Principi over 7 years ago

  • Due date set to 11/13/2013
  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Davide Principi
  • Start date set to 11/12/2013
  • % Done changed from 20 to 30

#4 Updated by Davide Principi over 7 years ago

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

Test case

After upgrading to the modified version of nethserver-mail-server the warning messages are not emitted:

    # grep -F "WARNING" /var/log/messages

QA note

During development I tested also AD join.

#5 Updated by Davide Principi over 7 years ago

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

In nethserver-testing:
nethserver-mail-server-1.4.6-2.0git5ed62e54.ns6.noarch.rpm

#6 Updated by Giacomo Sanchietti over 7 years ago

  • Assignee set to Giacomo Sanchietti

#7 Updated by Giacomo Sanchietti over 7 years ago

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

Tested also with perl packages from CentOS 6.5.

No warning found:

grep -F "WARNING in /etc/e-smith/templates//etc/dovecot" /var/log/messages

Mail server works fine.

Marking VERIFIED.

#8 Updated by Davide Principi over 7 years ago

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

In nethserver-updates:
nethserver-samba-1.4.0-1.ns6.noarch.rpm
nethserver-directory-1.3.0-1.ns6.noarch.rpm
nethserver-dnsmasq-1.1.0-1.ns6.noarch.rpm
nethserver-shorewall-1.0.3-1.ns6.noarch.rpm
nethserver-mail-server-1.5.0-1.ns6.noarch.rpm
nethserver-mail-filter-1.1.4-1.ns6.noarch.rpm
nethserver-nethgui-1.3.0-1.ns6.noarch.rpm
nethserver-base-1.5.0-1.ns6.noarch.rpm
nethserver-lib-1.4.0-1.ns6.noarch.rpm
nethserver-httpd-admin-1.1.0-1.ns6.noarch.rpm
nethserver-yum-1.2.0-1.ns6.noarch.rpm
nethserver-ntopng-1.1.0-1.ns6.noarch.rpm

Also available in: Atom PDF