Bug 39021 - AUTH on port 25 should not be allowed
AUTH on port 25 should not be allowed
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Mail
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.1
Assigned To: Daniel Tröder
Sönke Schwardt-Krummrich
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-24 17:42 CEST by Tobias Birkefeld
Modified: 2015-11-17 12:12 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
60_tls.patch (675 bytes, patch)
2015-07-24 17:42 CEST, Tobias Birkefeld
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Birkefeld univentionstaff 2015-07-24 17:42:05 CEST
Created attachment 7049 [details]
60_tls.patch

Port 25 should not a valid submission port for authenticated user. Port 465 and better port 587 is the submission port for an authenticated user. In template main.cf.d/60_tls is "smtpd_sasl_auth_enable = yes" hardcoded. Therefore all ports/services of postfix (also port 25) provide a SASL AUTH.
The postfix default is "smtpd_sasl_auth_enable = no" (see http://www.postfix.org/postconf.5.html#smtpd_sasl_auth_enable). This provide no AUTH until it is configured.

With #38049 new UCRV are implemented to set options in master.cf. The standard is: "mail/postfix/mastercf/options/smtps/smtpd_sasl_auth_enable=yes". Therefore it is not necessary to activate smtpd_sasl_auth_enable global in main.cf. And with this settings, no AUTH is provide on port 25.

Patch is attached.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2015-07-27 09:21:54 CEST
The patch also activates "noplaintext". Is this tested on a UCS system?
I don't think that SASL/LDAP holds the required password hashes.

Nevertheless I think splitting incoming mails to different ports depending on their target (relaying vs. delivering) is a good idea but should not switch permanently before UCS 4.1.
Alternatively it becomes configurable via UCR in an erratum and the current default is kept.
Comment 2 Daniel Tröder univentionstaff 2015-09-01 13:12:05 CEST
With commit 63369 authentication (and thus submitting) has been disabled by default on all ports.

UCRVs (created in earlier bug) enable authentication by default on SMTPS (465) and Submission (587):
mail/postfix/mastercf/options/smtps/smtpd_sasl_auth_enable=yes
mail/postfix/mastercf/options/submission/smtpd_sasl_auth_enable=yes

To reenabled authentication on SMTP (port 25) using TLS set UCR variable
mail/postfix/mastercf/options/smtp/smtpd_sasl_auth_enable=yes
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2015-10-30 17:48:32 CET
(In reply to Daniel Tröder from comment #2)
> To reenabled authentication on SMTP (port 25) using TLS set UCR variable
> mail/postfix/mastercf/options/smtp/smtpd_sasl_auth_enable=yes

Added ucs-test script:
r65033 | Bug #39021: added 20_check_postfix_auth_per_port

OK: code change
OK: functional test
OK: added ucs-test script
REOPEN: entry in changelog-4.1-0.xml is missing
REOPEN: we should update the manual accordingly and give the admin/user some 
        hints, which ports should be used for mail delivery
Comment 4 Daniel Tröder univentionstaff 2015-11-02 14:47:24 CET
65073: backport 20_check_postfix_auth_per_port to 4.0-3
65074+65077: 4.1 changelog entry
65087+65090: add manual entry on SMTP ports and fix ports in pictures
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2015-11-05 16:08:15 CET
(In reply to Daniel Tröder from comment #4)
> 65073: backport 20_check_postfix_auth_per_port to 4.0-3
> 65074+65077: 4.1 changelog entry
> 65087+65090: add manual entry on SMTP ports and fix ports in pictures
→ OK

r65241 | Bug #39021: small changes for mail-*.xml

→ VERIFIED
Comment 6 Stefan Gohmann univentionstaff 2015-11-17 12:12:42 CET
UCS 4.1 has been released:
 https://docs.software-univention.de/release-notes-4.1-0-en.html
 https://docs.software-univention.de/release-notes-4.1-0-de.html

If this error occurs again, please use "Clone This Bug".