Scalix interface with Sendmail

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

STrRedWolf
Posts: 13
Joined: Wed Aug 10, 2005 5:31 pm

Scalix interface with Sendmail

Postby STrRedWolf » Sat Sep 03, 2005 12:49 pm

A question as to some building, as I'm kinda confused. How does Scalix interface with Sendmail? Does it run outgoing mail through /usr/lib/sendmail, or communicates to it via SMTP?

The reason I'm asking is that I'd like to switch to Postfix... but things point to a problem with outgoing mail. If Scalix is sending outbound mail in a way that's compatible with Postfix, then I don't have to run both Postfix on the external IP and Sendmail on localhost:25 (and osmtpd on port 10027).

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Mon Sep 05, 2005 4:56 am

Support for integration with Postfix is something we have been asked for on a number of occasions and is a topic we continue to evaluate, although there are no firm plans for this right now.

In terms of your question, Scalix interfaces with Sendmail at a number of levels:

1. By default when Scalix is installed the incoming internet gateway (called the SMTP daemon) is configured to listen on port 25 for the hostname, e.g.

# telnet foo.bar.com 25
Trying 15.22.105.27
Connected to gengar.uk.scalix.com (15.22.105.27).
Escape character is '^]'.
220 foo.bar.com ESMTP Scalix SMTP Relay 9.4.0.6; Mon, 05 Sep 2005 09:24:41 +0100 (BST)

Sendmail is still bound to port 25 for localhost, e.g.

[root@gengar ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 foo.bar.com ESMTP Sendmail 8.13.1/8.13.1; Mon, 5 Sep 2005 09:27:20 +0100

You can re-config this to have sendmail listen on fqdn:25. Normally we do this when there is a need to integrate with SPAMAssasin and the like.

There are rules inserted in sendmail.cf to ensure that mail destined for Scalix is delivered there.

There are two types of mail that we need to accept:

a) Mail destined for a local scailx user (i.e. sent to their internet address)
b) Mail transported between Scalix servers, via the Sendmail Interface (SMINTFC)

For (a) you can see this via:

# /usr/sbin/sendmail -bv jg.test@foo.bar.com
jg.test@foo.bar.com... deliverable: mailer scalix, host any, user jg.test@foo.bar.com

Sendmail uses a program called ommapsmtp to work out if this is a local scalix address:

# ommapsmtp jg.test@foo.bar.com
scalix:any:jg.test@foo.bar.com

if the address is not a local scalix one then address is just returned, e.g.

# ommapsmtp not.scalix@foo.bar.com
not.scalix@foo.bar.com

For (b) you can see this via:

# /usr/sbin/sendmail -bv scalix@foo.bar.com
scalix@foo.bar.com... deliverable: mailer omxport, host any, user scalix

If you look at the mailer definitions for these mailers you can see what programs are used, e.g.

# grep '^Mscalix' /etc/mail/sendmail.cf
Mscalix, P=/opt/scalix/bin/unix.in, E=\n, F=PDFMXmnu, A=unix.in -s $h

# grep '^Momxport' /etc/mail/sendmail.cf
Momxport, P=/opt/scalix/bin/xport.in, F=LMn, A=xport.in -s $h $u

So, for mail destined for a local Scalix user either the SMTP relay talks directly to unix.in or sendmail does, depending on what is listening on port 25.

Similarly for mail transported between Scalix systems (which is basically a wrapped message sent from scalix@host1 to scalix@host2), this is given to xport.in. Again either directly by the SMTP relay or via the sendmail, depending on what is configured to listen on port 25.

As a "trusted" user you can run unix.in, e.g.

# /opt/scalix/bin/unix.in
220 Scalix ESMTP Ready.
ehlo foo.bar.com
250-Hello, pleased to meet you.
250 DSN

i.e. unix.in talks SMTP.

For outgoing mail the situation is as follows.

For a message sent from a Scalix user to the internet, the message is processed by the Internet Mail gateway (outgoing). Try looking at ~scalix/sys/unix.mapper and you'll see the line that configures what is called to process this, i.e.

transport-service = /usr/sbin/sendmail -bs

So this is basically saying call sendmail and talk SMTP to it.

For a message being sent from one Scalix to another, then take a look at ~scalix/sys/xport.mappers/XPORT, this contains the line:

transport-service = /usr/sbin/sendmail -odb -oem -f %N %R

i.e. the xport.out process wraps the message up and "submits" this to sendmail, the message going:

From: scalix@thishost.com
To: scalix@otherhost.com

Basically, for an incoming message for a local Scalix user, you need to call unix.in and talk SMTP to it. For an outgoing message to the internet you need to talk SMTP to a program configued by ~scalix/sys/unix.mapper.

For messages transported between Scalix systems, the message is sent from scalix@host1 to scalix@host2. Outoing ~scalix/sys/xport.mappers/XPORT controls which program is called. Incoming you'd need to ensure that any message addressed to scalix@host was passed to xport.in.

Hopefully that's enough for you to unravel what's going on.

I suspect this is enough for you to work out how to "replace" sendmail with Postfix, but please bear in mind this is currently unsupported.

Cheers,
JG

STrRedWolf
Posts: 13
Joined: Wed Aug 10, 2005 5:31 pm

Postby STrRedWolf » Mon Sep 05, 2005 11:26 am

Heh... this actually is quite eazy!

I haven't tested it, but this is how I would replace Sendmail in Postfix:

  1. Follow the HOWTO I posted earlier, but run it on all networks. Edit the master.cf file to have a "scalixd" service that spawn(8)'s unix.in and a "scalix" service that connects to scalixd via SMTP. Edit /etc/postfix/transport to deliver local mail to the scalix service. That should take care of incomming mail.
  2. Strip out Sendmail, because Postfix's sendmail command is compatible. Outgoing mail is taken care of.

I am not sure of mail between two Scalix servers within a domain. Mail between to Scalix servers across a WAN is already handled.
[/list]


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 14 guests