LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-16-2004, 03:28 PM   #1
uncre8tv
LQ Newbie
 
Registered: Nov 2004
Location: KC
Distribution: FreeBSD 5.3
Posts: 4

Rep: Reputation: 0
Sendmail configuration


Please let me know if this question belongs elsewhere.

I am wanting to setup a sendmail "gateway" for the purpose of running all incoming mail thru spamassasin or other tools on it's way into my exchange server.

Currently I answer port 25 at the firewall on a public IP that answers to mail.mydomain.com which is listed as my MX. The firewall forwards port 25 to my internal Exchange server.

From a DNS standpoint it should be pretty easy to have my Sendmail box (FreeBSD 5.3 - sendmail 8.12) answer as the MX, then forward on to the Exchange server as an A host, right? Or do I need to do some internal/external MX trix?

But that's getting ahead of myself, the real issue is I don't know how to configure sendmail at all, much less to make it what I want: A pass-thru gateway that scans every SMTP headed to my Exchange host and drops anything it doesn't like.

I'm not looking for an exact step by step, but after spending a day staring at sendmail doc's I was wondering if anyone had some general pointers to writeups of similar projects? And a handy dandy noob guide to configuring sendmail?

thanks!
-keith - uncre8tv@yahoo.com
 
Old 11-16-2004, 10:57 PM   #2
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
Relyaing all inbound e-mail to your exchange server is the easy part. Simply add a mailertable entry to /etc/mail/mailertable:
Code:
mydomain.com      esmtp:[exchange.mydomain.com]
  -or-
mydomain.com      esmtp:[192.168.1.10]
Take your pick.

As for running a filter program like spamassassin against each inbound e-mail (prior to relaying), checkout "sendmail milter" using your favorite search engine. There are many available.

Also, once you configure sendmail to use the mailertable feature, it will relay *all* e-mail for mydomain.com to your exchange server. This is great!, until an e-mail arrives with a bogus address. Your exchange server will bounce this e-mail back to what will probably be a bogus return address. So its queues get clogged. To fix this annoying problem you will also need to configure sendmail to check whether or not the e-mail/mailbox exists on your exchange server prior to relaying. This can be done in one of two ways:

1) Statically - add each e-mail address/mailbox on your exchange server to /etc/mail/access2) Configure sendmail to issue an LDAP query against your exchange server to verify the e-mail address. Unfortunately, I don't have any examples of sendmail/LDAP, but if I remeber correctly, the sendmail site has some links on configuring sendmail to use LDAP.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail Configuration - I need Help ukjairaj Linux - Networking 5 06-23-2005 12:26 PM
SendMail Configuration ChaChi Linux - Newbie 6 06-10-2004 04:00 PM
Sendmail Configuration arshad Red Hat 3 12-14-2003 12:11 AM
Sendmail configuration lapthorn Linux - Newbie 2 12-09-2003 08:13 PM
Sendmail Configuration svsalian Linux - Software 7 08-29-2003 04:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration