Feature #60683

Ability to switch off passing external SMTP-messages to sendmail

Added by Dirk Ahrnke over 2 years ago. Updated over 2 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:ServerDevsGroup% Done:
Target version:-
Operation System:--


The long-time default behaviour of omsmtpd is to accept not just addresses which are known in SYSTEM (local mailboxes, groups, public folders etc) and scalix@fqdn (xport.in).
Depending on the settings in smtpd.cfg messages will also be passed to the local MTA.
This may cause message loops or other unwanted behaviour at least as long as the behaviour of the local MTA is not adjusted, for example by configuring "local-host-names".

It should be considered if it is possible to disable the redirection to the MTA and only accept messages for destinations that are defined and deliverable in Scalix.
This should be the default for new installations. It should be discussed if we want to leave the behaviour for existing installations as known.


#1 Updated by Dirk Ahrnke over 2 years ago

as discussed in #60680

#2 Updated by Andrea Lanfranchi over 2 years ago

Well there are several implications in such an implementation.

As already pointed out Scalix does not own the mail domains configured: if the sender is entitled to relay then every message addressed to an email which is not in Scalix's directory will be routed to the unix queue (sendmail) for delivery.

Now on Sendmail's side we have to analyze this:

  1. By default installation Scalix does not alter the "local domains" configured on sendmail: this means that every message addressed to an Scalix's unknown address is routed to Sendmail which will try to deliver the message resolving MX records for that domain generating a loop (in fact it's Scalix itself which is authoritative for that domain)
  2. It' aint no use to add the mail domain to the list of "local domains" handled by sendmail: this will generate the undesiderable effect to have all system accounts and their aliases to automatically have an email address bound to the domain. For example an authenticated user could send an email to "" or "" or "" (given scalix.it is the default domain for Scalix install) and expect some Scalix user to read the message: but it will not happen as Sendmail will deliver the message to a local account; only users with direct access to the server could read those messages using mail CLI; This is not irrelevant as per RFC rules you should have an postmaster and an abuse address ... but who reads it ?
  3. We could tweak sendmail (http://www.sendmail.com/sm/open_source/docs/m4/ldap.htm) in the same manner Rafael's pointed out for Zimbra/Postfix (see https://rm.scalix.com/issues/60680#note-7) but this does not solve the problem: unauthenticated users trying to deliver to not existent scalix's mailbox will receive a 550 5.7.1. Unable to relay error (cause they're not allowed to be passed to the unix queue) and authenticated users (who can relay) will receive only a late NDR report

IMHO we should endorse a setting in smtpd.cfg to consider a "relay" action everything that is not addressed to locally handled (by scalix) domains: if the addressee address matches the local domain part and the whole address is not found in the local directory then a prompt 550 5.1.1 User unknown error should be sent at SMTP conversation level.

Also available in: Atom PDF