Koozali.org: home of the SME Server

SME7 as an email gateway for 2 domains

Offline albatroz

  • *****
  • 159
  • +0/-0
SME7 as an email gateway for 2 domains
« on: December 13, 2006, 10:11:54 PM »
I have an Exchange Server that handles 2 email domains and I would like
to use SME 7 as an email gateway using the email server delegation feature.
You know, for filtering spam and virii.

My question is how do I setup these 2 domains in SME?

Offline mmccarn

  • *
  • 2,651
  • +10/-0
SME7 as an email gateway for 2 domains
« Reply #1 on: December 15, 2006, 03:35:30 AM »
Here are my notes from my last SME-before-Exchange installation (although the imaginary local domain may be completely pointless...):

install SME with imaginary local domain & create a domain alias for each internal domain.
In server-manager:
- Make sure "internal mail server" is blank
- set spam filter from "medium" to "custom"; mark=5, reject=18
- Create a domain alias for each of your internal domains (e.g. changeme.org)
db domains setprop changeme.org MailServer <your mail server's IP>
signal-event email-update

- optional: install sme7-admin for pretty graphs of your server including mail/spam volume
http://sme.firewall-services.com/cgi-bin/index.pl?page=sme7admin

- optional: install qmHandle for managing the qmail queue if there's a problem
http://www.saco-support.de/index.php?_m=downloads&_a=view&parentcategoryid=3&pcid=0&nav=0

- optional: install mailstats to get daily emails about email statistics
cd /etc/cron.d
wget http://mirror.contribs.org/smeserver/contribs/bread/mailstats/mailstats.cron
cd /usr/bin
wget http://mirror.contribs.org/smeserver/contribs/bread/mailstats/spamfilter-stats-7.pl

- optional: install sa-update to update your spamassassin rules regularly
cd /etc/cron.daily
wget http://mirror.contribs.org/smeserver/contribs/bread/mailstats/sa-update
chmod +x sa-update
./sa-update

- optional: enable Autolearn for Bayes filter to let spamassassin improve itself
cd #
wget http://mirror.contribs.org/smeserver/contribs/michaelw/sme7/smeserver-spamassassin-features-0.0.2-0.noarch.rpm
yum localinstall smeserver-spamassassin-features-0.0.2-0.noarch.rpm
config setprop spamassassin BayesAutoLearnThresholdSpam 12.00
sa-learn --sync --dbpath /var/spool/spamd/.spamassassin -u spamd
chown spamd.spamd /var/spool/spamd/.spamassassin/bayes_*
chown spamd.spamd /var/spool/spamd/.spamassassin/bayes.mutex
chmod 750 /var/spool/spamd/.spamassassin/bayes_*
signal-event post-upgrade
signal-event reboot

- optional: Delete double-bounce messages (may not be needed since the sme updates of 11/7/06)
config setprop qmail DoubleBounceTo devnull
signal-event email-update
/etc/init.d/qmail restart


The SME Updates posted on 11/7/06 include changes to qpsmtpd that will check incoming email sent to an internal mail server and bounce them at the smtp level if the message would be bounced by the internal mail server.  This is very useful and should eliminate the need to "delete double-bounce messages".

Be sure to configure your Exchange box to reject email to recipients who are not in the Active Directory, then enable the recipient filtering policy on the SMTP connector.