Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was wondering if it is possible to setup sendmail to forward / send it's mails to an existing mail server on the network?
The company I work for has a Domino / Notes mail system. One of our servers which acts as a spam filter is setup to send various emails to certain admins. All I want it to do is forward those mails to the mail server so they reach the users specified?
Just one question if you don't mind. How does the server know what machine to send the email out to though? For example, if the company mail server is called say "mailserv" and the IP is 10.10.10.10 is there anywhere that I should be putting this information?
If all your mail is/can be forwarded through one central SMTP mail gateway, you'll probably want to set up sendmail on your server to use a 'smarthost' configuration.
About line 57 [YMMV] in the sendmail.cf file, you should be able set the DS parameter to the IP or DNS name of the mail gateway:
57 # "Smart" relay host (may be null)
58 ##DS
Add: [ without the quotes :-) ]
"DS10.10.10.10"
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Whoooooa there, don't go hacking your .cf file, that's dangerous and pretty much unsupported. The correct way is to modify the .mc file and run m4 again.
In sendmail.mc
Code:
define(`SMART_HOST', `10.10.10.10')dnl
Then do the whole deal of regenerating your sendmail.cf by running m4. I don't have the procedure right here in front of me, but it only takes a minute with Google to locate the sendmail m4 sendmail.mc to sendmail.cf steps.
Thanks for clearing that up for me. I haven't done it in a while but from memory it is something like m4 sendmail.mc > sendmail.cf. I'll double check before doing it
Thanks again though. You have all been a great help!!!
Chort sez:
>Whoooooa there, don't go hacking your .cf file, that's dangerous
>and pretty much unsupported. The correct way is to modify the .mc
>file and run m4 again.
Well... The sendmail guru's are split on the subject. And I don't consider it terribly dangerous. (You do keep backup copies of your important configs don't you?) In general, the m4 solution makes maintenance easier for people who don't understand the sendmail.cf options, tokens, re-write rules, or after they've been away from it for a while...
I just find it much easier to hack up the sendmail.cf file. But thats why we all have personal preferances. :-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.