Operating System - Linux
1753944 Members
8851 Online
108811 Solutions
New Discussion юеВ

Re: relay mails via linux server to MS Exchange 5.5

 
SOLVED
Go to solution
'chris'
Super Advisor

relay mails via linux server to MS Exchange 5.5

hi

I'd like to relay all mails via linux server to MS Exchange 5.5, because of relaying and spam problem.
That means linux gets all mails, filters with spamassassin and forwards to Mickysoft Exchange 5.5
Do I need more than fetchmail, spamassassin and postfix on linux ?

regards
chris
8 REPLIES 8
Phil Barker
Occasional Advisor
Solution

Re: relay mails via linux server to MS Exchange 5.5

Hello Chris,
Your solution depends on a number of answers:
Which Linux distribution are you using?
Are you using sendmail or postfix?
Which anti-virus is installed on the Linux box?
What I did here was to install mailscanner which includes a preconfigured spamassassin package and also installed clamav which works with mailscanner to inspect all inbound/outbound attachments for virii.
The exchange box here polls the Linux box with
PopBeamer and injects any new email into the
exchange server. If you look for mailscanner with google, you'll find the author's website
in the UK which includes very detailed information on installation, configuration and troubleshooting.
Cheers,
Phil
'chris'
Super Advisor

Re: relay mails via linux server to MS Exchange 5.5

Which Linux distribution are you using?
linux SUSE 8.2

Are you using sendmail or postfix?
postfix-2.0.6-8

Which anti-virus is installed on the Linux box?
no antivirus installed at the moment and I'm looking for some opensource

and do I need fetchmail to received mails on linux ?

greetings
chris

Steven E. Protter
Exalted Contributor

Re: relay mails via linux server to MS Exchange 5.5

If you relay all mail through Exchange 5.5 you get the following:

Outbound mail will be forwarded to the Exchange server instead of the sendmail configuration tyring to resolve the domain name and deliver the mail itself. This is from the DS=hostname_of_exchange_server directive in sendmail.cf

That configuration will not process any mail through spamassassin.

You can with /etc/alias entries or .forward files forward individual user mail to the Exchange server. In that case the way spamassin works, the mail will be processed and blocked according to the rules of that product.

If the mail makes it through that it gets pushed to the exchange server. In this scenario the Linux box must be receiving mail from somewhere. It can be the public Internet or forwarded from a server in your DMZ.

What is the goal? Please restate it and I or someone else will try and give you a scenario that helps.

I've developed some custom sendmail configurations that are quite useful in shutting down spam.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Phil Barker
Occasional Advisor

Re: relay mails via linux server to MS Exchange 5.5

Hello Chris and Steven,

Here I'm using Redhat Enterprise Server version 2.1 and have added MailScanner and ClamAV and had very good results. The exchange server picks up queued mail using popbeamer and injects it into the exchange queue system.
Steven is an excellent resource and we could both learn something from his experiences with sendmail. Out of curiousity Steven, do you use and milter functions in your sendmail config?
Cheers,
Phil
'chris'
Super Advisor

Re: relay mails via linux server to MS Exchange 5.5

can I use fetchmail to get mails and postfix (instead of sendmail) to send mails (forward) to the MS Exchange ?
Phil Barker
Occasional Advisor

Re: relay mails via linux server to MS Exchange 5.5

Hello Chris,
I believe that MailScanner does have support for PostFix, but I didn't look for that as I've always used Sendmail for my MTA.
Unless you can find a version of Fetchmail that runs on NT, you may need to find something else (like popbeamer) to poll your linux server for POP3 email.
You can find more details directly from the author of MailScanner at: www.mailscanner.info/

It's an excellent package that is very easy to work with.
Cheers,
Phil
'chris'
Super Advisor

Re: relay mails via linux server to MS Exchange 5.5

sorry a big mistake, I don't have to find Fetchmail that runs on NT !

I'd like to setup:

Firewall -> linux server with Fetchmail and Postfix -> NT 4.0 with MS Exchange

linux recives all mails from internet and forwards to MS Exchange

That means MS Exchange get all mails through linux,
but sends all mails directly to the internet without linux.

Fetchmail gets mails and postfix sends.
Both running on linux.


Chris Saunderson
Frequent Advisor

Re: relay mails via linux server to MS Exchange 5.5

It's an ugly ugly hack, but you can set the MXes up as follows:

MX 10 exchange.yourcompany.com
MX 20 linux.yourcompany.com

Then block inbound SMTP (port 25) to exchange.yourcompany.com at your firewall for everyone but linux.yourcompany.com MTAs will then try to deliver to the secondary which will succeed. Downsides are that you will have to filter out log messages on your firewall regarding the failed SMTP attempts and it will slightly delay your mail in and out. It's also a pain in the butt to remember, but it does work. I wouldn't recommend this as a technique other than to buy time to implement the real solution.
Ted Nugent called. He wants his shirt back.