Bug #2804

Smarthost configuration ignored during migration

Added by Nicola Rauso about 7 years ago. Updated almost 7 years ago.

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

100%

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

Description

During migration from NethService/SME Server the db records "SMTPSmartHost" and "smtp-auth-proxy" seem to be ignored: the settings are not migrated on new system.

Packages installed:
  • nethserver-mail-common-1.3.3-1.ns6.noarch
  • nethserver-mail-filter-1.1.6-1.ns6.noarch
  • nethserver-mail-server-1.7.0-1.ns6.noarch

Associated revisions

Revision e88225f2
Added by Davide Principi almost 7 years ago

migration-import event: migrate SmartHost configuration. Refs #2804

Revision 5490fadc
Added by Giacomo Sanchietti almost 7 years ago

Smarthost migration: set default port to 25. Refs #2894

History

#1 Updated by Giacomo Sanchietti about 7 years ago

  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20

I'd like to resolve the issue with a simple documentation page.

#2 Updated by Davide Principi about 7 years ago

  • NEEDINFO changed from No to Yes

Giacomo Sanchietti wrote:

I'd like to resolve the issue with a simple documentation page.

I agree!

IMO sending through a smart host should be a temporary workaround (for blacklisting or other troubles). If the smarthost configuration is required even after migration, it must be done manually with server-manager.

Nicola?

#3 Updated by Davide Principi about 7 years ago

  • Status changed from TRIAGED to NEW
  • % Done changed from 20 to 0

(set NEW state until a decision has been made)

#4 Updated by Nicola Rauso about 7 years ago

Davide Principi wrote:

Giacomo Sanchietti wrote:

I'd like to resolve the issue with a simple documentation page.

I agree!

IMO sending through a smart host should be a temporary workaround (for blacklisting or other troubles). If the smarthost configuration is required even after migration, it must be done manually with server-manager.

Nicola?

I agree too.
Smarthost should not be a lasting configuration.

#5 Updated by Filippo Carletti about 7 years ago

I'd like to resolve the issue with a simple documentation page.

Some scenarios require a smarthost. It should be migrated, because, if it is configured, it means it is permanently needed.

#6 Updated by Davide Principi about 7 years ago

Filippo Carletti wrote:

Some scenarios require a smarthost.

Could you define those scenarios?

#7 Updated by Davide Principi about 7 years ago

  • Subject changed from Smarthost configuration ingnored during migration to Smarthost configuration ignored during migration

#8 Updated by Filippo Carletti about 7 years ago

Could you define those scenarios?

  1. port 25 closed by the provider
  2. dynamic ip
  3. reverse resolution unavailable

#9 Updated by Davide Principi almost 7 years ago

  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20

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

In branch b2750

#11 Updated by Davide Principi almost 7 years ago

This is the SME Server source DB format to migrate into postfix/SmartHost... props

  • SMTPSmartHost is a key representing the host name or IP address of the smart host
  • smtp-auth-proxy has the following props
    • Passwd
    • Userid
    • PeerPort, optional. If value is 465 SSL is automatically enabled map to STARTTLS on port 25
    • status {enabled|disabled}

#12 Updated by Davide Principi almost 7 years ago

  • Category changed from nethserver-mail-server to nethserver-mail-common
  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 30 to 60

Test case

Check the following migration scenarios:

  • Unauthenticated smart host (SH)
  • Authenticated SH, port different from 465:
    port must be retained, SmartHostTlsStatus=disabled (=may)
  • Authenticated SH, port 465:
    port must be mapped to 25 SmartHostTlsStatus=enabled

Check also credentials are migrated

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

#14 Updated by Giacomo Sanchietti almost 7 years ago

  • Assignee set to Giacomo Sanchietti

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

Before migration:

    SmartHostAuthStatus=enabled
    SmartHostName=
    SmartHostPassword=
    SmartHostPort=25
    SmartHostStatus=disabled
    SmartHostTlsStatus=enabled
    SmartHostUsername=

After migration:

    SmartHostAuthStatus=enabled
    SmartHostName=77.88.99.11
    SmartHostPassword=mypass
    SmartHostPort=
    SmartHostStatus=enabled
    SmartHostTlsStatus=disabled
    SmartHostUsername=myuser

#16 Updated by Giacomo Sanchietti almost 7 years ago

  • Status changed from VERIFIED to ON_QA
  • % Done changed from 90 to 70

#17 Updated by Giacomo Sanchietti almost 7 years ago

  • Status changed from ON_QA to TRIAGED
  • % Done changed from 70 to 20

Actually the issue is NOT verified because the expansion of postfix template fails:

[root@localhost ~]# expand-template /etc/postfix/main.cf
ERROR in /etc/e-smith/templates//etc/postfix/main.cf/40smarthost: Program fragment delivered error <<Missing required database value at /etc/e-smith/templates//etc/postfix/main.cf/40smarthost line 10.>> at template line 4
ERROR: Template processing failed for //etc/postfix/main.cf: 1 fragment generated errors
 at /sbin/e-smith/expand-template line 45

The fragment requires thath both SmartHostName and SmartHostPort have a value, but usually the port was empty in old installations.
I think the best approach is to have a default value (25) for the port if SmartHostName has a value.

#18 Updated by Giacomo Sanchietti almost 7 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#19 Updated by Giacomo Sanchietti almost 7 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

#20 Updated by Giacomo Sanchietti almost 7 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70

New default for SmartHostPort is now "25".

Repeat the above test case and check postfix template is ok.

Package in nethserver-testing:
  • nethserver-mail-common-1.3.3-1.20git5490fad.ns6.noarch.rpm

#21 Updated by Davide Principi almost 7 years ago

  • Assignee set to Davide Principi

#22 Updated by Davide Principi almost 7 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 70 to 90

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