[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Using Sendmail as a mail router

Posted on 1997-02-09
1
Medium Priority
?
211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
mart010897 earned 200 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

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 course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

650 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