LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-17-2004, 06:51 AM   #1
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30
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
 
Old 05-17-2004, 11:19 AM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
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.
 
Old 05-17-2004, 06:07 PM   #3
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
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
 
Old 05-17-2004, 06:32 PM   #4
olddog55
LQ Newbie
 
Registered: Jul 2003
Distribution: Debian Sarge & Woody, RedHat, tomsrtbt
Posts: 11

Rep: Reputation: 0
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 !
 
Old 05-17-2004, 06:35 PM   #5
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
That's great!!! Thanks olddog.

Thanks alot for all of your help, both of you!!!

Regards,
Craig
 
Old 05-18-2004, 01:28 AM   #6
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
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.
 
Old 05-18-2004, 06:31 AM   #7
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
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
 
Old 05-18-2004, 11:36 AM   #8
adm1329
Member
 
Registered: Mar 2004
Distribution: CentOS 5
Posts: 128

Rep: Reputation: 17
in the top of your sendmail.mc file it gives directions
Code:
make -C /etc/mail
 
Old 05-18-2004, 10:28 PM   #9
olddog55
LQ Newbie
 
Registered: Jul 2003
Distribution: Debian Sarge & Woody, RedHat, tomsrtbt
Posts: 11

Rep: Reputation: 0
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
quick question citrus Linux - Newbie 1 01-13-2005 06:08 AM
Question Concerning ISO's and one quick question. evrae Linux - Software 2 06-21-2004 03:53 AM
samba smb.config question (quick question) TheDOGG Linux - Networking 1 03-02-2004 07:19 AM
just a quick question awesome_man Linux - Software 1 01-26-2004 01:02 AM
Quick question CL-9.0 :-) Xterminator Conectiva 2 05-02-2003 12:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration