You need:
- Scalix (duh)
- Postfix (don't remove Sendmail!) -- I'm using Postfix for two reasons: It's eazier to configure than Sendmail and Amavisd-new integrates nicely with it. Get a 2.2.x version.
- Amavisd-new
- SpamAssassin
Make sure those are installed, but don't run Postfix, Amavisd-new, nor SpamAssassin yet.
1. Make Scalix listen on an alternate port: In /var/opt/scalix/sys/smtpd.cfg, add the line:
Code: Select all
LISTEN_PORT=10027
If you have Scalix Web Access (webmail) installed: Edit /etc/opt/scalix/webmail/partner.xml and append :10027 to the smtpServer= line, and then restart Tomcat.
Restart Scalix's SMTP relay (omstpd), or the whole thing if you're lazy.
2. Make Sendmail only listen to localhost:25. Edit /etc/mail/sendmail.cf and make sure this is the only DaemonPortOptions line there:
Code: Select all
O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
Restart Sendmail, and wash your hands of that config file. We've now made room for Postfix.
3. Configure Amavisd-new and SpamAssassin. The default Amavisd-new configuration is good if you already have an antivirus checker setup, but for me, I edited /etc/amavisd.conf and disabled it since I don't have any installed. The default SpamAssassin config works fairly well.
Ether way, once done, start Amavisd-new up.
4. Configure Postfix for Amavisd-new. First, you need to edit /etc/postfix/master.cf. You need to tweak an smtpd line, and add a few more:
Code: Select all
smtp inet n - n - - smtpd
-o content_filter=smtp-amavis:[127.0.0.1]:10024
smtp-amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o disable_dns_lookups=yes
-o smtp_send_xforward_command=yes
-o max_use=20
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks_style=host
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
Then edit /etc/postfix/main.cf. You need to tweak inet_interfaces so that Postfix only runs on any interface *BUT* localhost (or else it'll complain and nothing will get through). You also have to blank out local_recipient_maps so it doesn't bounce anything managed by Scalix:
Code: Select all
local_recipient_maps =
One last line to add, which will tell Postfix to forward all good mail to Scalix:
Code: Select all
transport_maps = hash:/etc/postfix/transport
If you're carrying more than one domain, you'll have to tweak other settings too, but if you're using Scalix for just one, save it, you're done in here.
And finally, edit /etc/postfix/transport and add one line:
Code: Select all
yourdomain.com smtp:[ youriphere ]:10027
Save it, run postmap on it, and start Postfix up.
5. Test it! It took me a few tries to make things work -- the end result is this HOWTO. Test it out. If it works, all you need to do is make sure things start up on boot.
Now why did I keep Sendmail? I basically wasn't sure how Scalix interfaced with Sendmail. To be on the safe side, Sendmail handles outgoing, Postfix handles incomming, and Scalix gets clean mail.