Bug #2979

Smarthost configuration: cannot disable authentication

Added by Nicola Rauso 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.5-final NEEDINFO:No

Description

You cannot configure a smarthost omitting authentication credentials.
Submitting a smarthost configuration without credentials web interface generates an error (see attachment).

In /var/log/messages you find

 
Dec 12 17:01:23 serv01 esmith::event[4707]: ERROR in /etc/e-smith/templates//etc/postfix/sasl_passwd/10smarthost_password: Program fragment delivered error <<Missing required database value at /etc/e-smith/templates//etc/postfix/sasl_passwd/10smarthost_password line 15.>> at template line 4
Dec 12 17:01:23 serv01 esmith::event[4707]: ERROR: Template processing failed for //etc/postfix/sasl_passwd: 1 fragment generated errors
Dec 12 17:01:23 serv01 esmith::event[4707]:  at /etc/e-smith/events/actions/generic_template_expand line 64
Dec 12 17:01:23 serv01 esmith::event[4707]: [WARNING] expansion of /etc/postfix/sasl_passwd failed
Dec 12 17:01:23 serv01 esmith::event[4707]: expanding /etc/postfix/access
Dec 12 17:01:23 serv01 esmith::event[4707]: expanding /etc/postfix/transport
Dec 12 17:01:23 serv01 esmith::event[4707]: Action: /etc/e-smith/events/actions/generic_template_expand FAILED: 1 [0.173291]

Postfix db configuration:

# config show postfix
postfix=service
    AccessPolicies=
    AdsGroupsDeliveryType=copy
    AdsMapUserPrincipalStatus=enabled
    AlwaysBccAddress=
    AlwaysBccStatus=disabled
    ConnectionsLimit=0
    ConnectionsLimitPerIp=0
    ContentInspectionType=default
    HeloHost=
    KrbStatus=enabled
    MessageQueueLifetime=4
    MessageSizeMax=20000000
    MessageSizeMin=1048576
    MxRecordStatus=enabled
    RblServers=
    RblStatus=disabled
    SmartHostAuthStatus=enabled
    SmartHostName=smtp.xxxxx.org
    SmartHostPassword=
    SmartHostPort=25
    SmartHostStatus=enabled
    SmartHostTlsStatus=disabled
    SmartHostUsername=
    SpfStatus=disabled
    SystemUserRecipientStatus=disabled
    TCPPorts=25,465,587
    access=public
    status=enabled

If you configure auth credentials everything works fine.

package list:

  • nethserver-mail-server-1.8.3-1.ns6.noarch
  • nethserver-mail-filter-1.2.1-1.ns6.noarch
  • nethserver-mail-common-1.4.2-1.ns6.noarch

smarthost.png (38.2 KB) Nicola Rauso, 12/12/2014 11:42 AM


Related issues

Related to NethServer 6 - Bug #3093: Error in /etc/postfix/virtual and /etc/dovecot/dovecot.co... CLOSED

Associated revisions

Revision 8c93dbfb
Added by Davide Principi over 6 years ago

Disable SMTP authentication if username or password is not provided. Refs #2979

Revision 03872ff7
Added by Davide Principi over 6 years ago

Disable SMTP/AUTH if SmartHost credentials are not provided. Refs #2979

Removed postfix/SmartHostAuthStatus prop.

Revision e32a3fcb
Added by Davide Principi over 6 years ago

Migration of smtp-auth-proxy/status prop. Refs #2979

Migrate smtp-auth-proxy/status prop, by mapping to
postfix/SmartHostUsername and postfix/SmartHostPassword.

History

#1 Updated by Nicola Rauso over 6 years ago

The workaround is change the value of "SmartHostAuthStatus" prop in "Postfix" db:

config setprop postfix SmartHostAuthStatus disabled
signal-event nethserver-mail-server-save

You could be able to change that value from web interface.

#2 Updated by Nicola Rauso over 6 years ago

the attachment

#3 Updated by Giacomo Sanchietti over 6 years ago

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

#4 Updated by Giacomo Sanchietti over 6 years ago

  • Category set to nethserver-mail-common

#5 Updated by Giacomo Sanchietti over 6 years ago

  • Target version changed from v6.5 to v6.6-rc1

#6 Updated by Giacomo Sanchietti over 6 years ago

  • Target version changed from v6.6-rc1 to v6.6

#7 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

#8 Updated by Davide Principi over 6 years ago

  • Related to Bug #3093: Error in /etc/postfix/virtual and /etc/dovecot/dovecot.conf template added

#9 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 the bug is not reproducible
  • Check the prop postfix/SmartHostAuthStatus no longer exist
  • Check if the SmartHostAuthStatus was "disabled" SmartHostUsername and SmartHostPassword are forced to empty string.

Some commands:

grep smtp_sasl_auth_enable /etc/postfix/main.cf
cat /etc/postfix/sasl_passwd
config getprop postfix SmartHostAuthStatus

#10 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.2-1.1.g03872ff.ns6.noarch.rpm
nethserver-mail-common-1.4.2-1.3.g1ab4da6.ns6.noarch.rpm

#11 Updated by Giacomo Sanchietti over 6 years ago

  • Assignee set to Giacomo Sanchietti

#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

All tests passed.

VERIFIED

#13 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Released in nethserver-updates:
  • nethserver-mail-common-1.4.3-1.ns6.noarch.rpm

Also available in: Atom PDF