- 1 Basic MTA configuration
- 2 Outgoing Internet Traffic
- 3 Routing local messages into Scalix
Basic MTA configuration
By default, the MTA will not be visible to the outside world; this means it must be configured not to listen on the system's external IP address.
With Postfix, this configuration is archieved by setting the inet_interfaces parameter. As with most configuration changes, this should be done using postconf and the MTA be restarted afterwards:
postconf -ev inet_interfaces=loopback-only
This has to be added to /etc/postfix/main.cf:
Then do /etc/init.d/postfix restart
Outgoing Internet Traffic
The Scalix service router places messages adressed to Internet/SMTP recipients on the ROUTER queue. This queue is being processed by the outgoing Internet mail gateway, the unix.out process. Depending on the format selected for the recipient (MIME or TNEF), the message is being transformed and finally a RFC-2822 compliant message is being generated.
The message is then handed over to the operating system's MTA through a local SMTP conversation. The MTA is invoked through the command line interface; the exact command to be used is specified in /var/opt/scalix/sys/unix.mapper, e.g.
transport-service = /usr/sbin/sendmail -bs
Note: This configuration will also work with Postfix as it provides a /usr/sbin/sendmail by default that will emulate a number of sendmail options; the -bs option for local SMTP mode is one of them.
The message will then be processed by the MTA as usual. A few special configurations require additional configuration.
Setting up a Smarthost with sendmail
To set up a Smarthost (with authentication) in sendmail, we have to create the File /etc/mail/auth/client-info and modify the sendmail.mc.
The content in /etc/mail/auth/client-info is our Login on the Smarthost.
AuthInfo:<smarthost> "U:<username>" "I:<account>" "P:<password>"
AuthInfo:mailto.provider.com "U:firstname.lastname@example.org" "I:email@example.com" "P:Uh_this_is_secret"
Now build the Database with
# cd /etc/mail/auth/ && makemap hash client-info < client-info
The next step is to tell sendmail, that all outgoing Mail is send via Smarthost
Edit the /etc/mail/sendmail.mc and insert before the line MAILER_DEFINITIONS
... define(`SMART_HOST', mailto.provider.com)dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl FEATURE(`authinfo', `hash /etc/mail/auth/client-info')dnl dnl # dnl # Default Mailer setup MAILER_DEFINITIONS ...
and build the sendmail.cf
# m4 sendmail.mc > sendmail.cf
NOTE: If you get an error message like that "sendmail.mc:10: m4: Cannot open /usr/share/sendmail-cf/m4/cf.m4: No such file or directory" you need to install the SENDMAIL-CF rpm package.
Setting up a Smarthost with Postfix
To setup the smarthost in Postfix, execute the following commands to reconfigure and restart Postfix:
postconf -ev <relayhost>[:<portnumber>] /etc/init.d/postfix restart
Configurations without DNS
Setting up sendmail without DNS
Routing local messages into Scalix
Some applications on the Scalix server will also submit messages via /usr/sbin/sendmail or similar. If the recipient of the message is a local Scalix user, the message must be passed on to Scalix as if it was an incoming Internet mail message. Therefore, the MTA will have to recognize the message recipient as local.
Mapping local recipients with sendmail
To bar sendmail sending local Mail thru the Smarthost, tell him your local processed Mail-Domains. For this, insert your domains in the file /etc/mail/local-host-names.
This file should look like
localhost scalix.localdomain mylocaldomain.com anotherlocaldomain.org
run make in /etc/mail
# cd /etc/mail && make
Mapping local recipients with Postfix