Solved

Using Sendmail as a mail router

Posted on 1997-02-09
1
200 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

895 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

13 Experts available now in Live!

Get 1:1 Help Now