Quick sendmail question
Hello.
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? Thanks alot. Craig |
You should be able to accomplish that by modifying the /etc/aliases file and redirecting those accounts, such as:
admin: jdoe@yourdomain You'll need to run the newaliases command when you're done. |
Hi chort,
Thanks alot for that. I'll give it a go. 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? Thanks alot! Regs Craig |
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" Good Luck ! |
That's great!!! Thanks olddog.
Thanks alot for all of your help, both of you!!! :) Regards, Craig :) |
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 |
Hi chort.
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!!! Best Regards, Craig |
in the top of your sendmail.mc file it gives directions
Code:
make -C /etc/mail |
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. :-) /od |
All times are GMT -5. The time now is 09:53 PM. |