Solved

Using Sendmail as a mail router

Posted on 1997-02-09
1
199 Views
Last Modified: 2010-04-20
How do i set up sendmail (8.7) so that incoming smtp mail to a linux box will automatically be routed on to other smtp mail servers.  Using the following rules

Incoming mail  XXX@domain1.com is to be routed on to another smtp mail server (local to the network) based on  XXXX

ie  Fred@domain1.com   -> fred@mailserver1.domain1.com
    Bob@domain1.com -> Bob@mailserver2.demon1.com

Any other mail eg XXXX@anyolddomain.com is forwarded to a smarthost run by our internet provider.

Can this be achieved without a local dns server to look up the mailserver1 and mailserver2 ip addresses.  Can sendmail be told to route to a ip address

eg  fred@domain1.com  -> Fred@192.168.1.1

where 192.168.1.1 is a local mail server

Robert
0
Comment
Question by:Robert011497
1 Comment
 
LVL 1

Accepted Solution

by:
mart010897 earned 100 total points
ID: 1584121
Well... sendmail should at least think that it can get hosts by name.  You should minimally have entries in /etc/hosts for those mailservers that you'll be sending to.  The stuff about XXX@domain.com --> YYY@somehost.domain.com can be done using the aliases table.  BUT:  Whoever does provide the DNS service for your domain needs to have an MX record for domain.com that points at your Linux box.  So some mucking about with DNS is necessary at some point regardless.

Sendmail is fiendishly complex, and it can do just about anything; so I'm not going to go into the topic of rulesets and rewriting rules with you-- it's so complex that they wrote a book on it; O'Reilly and Associates "sendmail", you can't miss it at your local book shop, pink spine, about 350 pages, just says "sendmail"; that's the definitive guide if you're getting in to sendmail administration.

If you really want to keep it simple, have you considered using MMDF mail instead of sendmail?  That's the "deliver" package.  As far as I know you can do what you want to do using MMDF, and it's much simpler to configure.  Look at ftp://ftp.cdrom.com/pub/linux/sunsite/system/Mail/delivery/mmdf-IIb-4.3.tar.gz for the package, it comes with some docs n pointers.

Hope this helps...

Mart
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now