LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Multiple Linux Machines using sendmail... (https://www.linuxquestions.org/questions/linux-general-1/multiple-linux-machines-using-sendmail-28814/)

needamiracle 08-26-2002 11:05 AM

Multiple Linux Machines using sendmail...
 
How do I get all the mail to go to one mail server. Do I alias it? Relay it? And what files do I need to modify? I have dug through the man pages and bought a book, but I am finding that sendmail is a little obscure.

Any help would be appreciated,
needamiracle

acid_kewpie 08-26-2002 11:58 AM

all the mail from where? i'm usre you know what your question means to you, but it could mean a million things to someone else. alias it as what?? relay what to where?? please try and explain your topolgy a bit to give some info.

needamiracle 08-26-2002 12:54 PM

Sorry bout that... Well, I have 4 Linux Machines on 192.168.1.0 network. I use one as a web server, db server, mail server, and development. Each machine has tripwire install, and a couple have some CRON jobs that run backups and whatnot. Right now I would like to have all of ROOT's mail be forwarded to the mail server from each of the machines. Does that help?

Regards,
needamiracle

acid_kewpie 08-26-2002 03:10 PM

right, well how do you access this mail? if you are just using a convetional unix mailbox system then you'd usually share the mailboxes as an nfs share and mount them on each machine as necessary, then acces them as you would the local mail (inded it then IS the local mail). you'd also set each clients SMTP server to be the mail server in order to send all mail out, and assuming you have an external IP, you would update your MX records to pass all mail to the mail server. Being Unix every question has loads of answers, and as most people hate to find out, a "mail server" on unix is made up of loads of little bits doing very different things... i get teh impression you know that fine though!

needamiracle 08-27-2002 10:37 AM

Well, I currently use ChangeIP.com as my Dynamic DNS provider. What is great about them is that they also allow Dynamic SMTP. Since my ISP (AT&T Broadband) blocks all traffic on port 25 (smtp) I was unable to receive mail. With the dSMTP, mail traffic flows over a high numbered port which is not monitored/blocked. The problem is that I do not want any of roots mail to be sent out to the web, and since ChangeIPs MX record has a greater precedence than mine (I think they do store and forward) roots mail would leave my network. That is the last thing that I want. So ideally, I would like each of the linux machine to relay/forward all my mail to one mailbox on my mailserver. Which I then use POP3 to retrieve.

acid_kewpie 08-27-2002 12:49 PM

yes, that's fine but the mail on the internal network never needs to know about the external IP's and everything, it's a closed little world of its own. you should just do what i sugested with the nfs shares. if you do have an internal sendmail running on each machine then you could always use procmail to forward it to the server, but that's really not necessary.. this is assuming you're only using linux / unix machines tho. windows need not apply...

needamiracle 08-27-2002 12:59 PM

what about fetchmail? I've been doing some reading, could I set that up to get all the mail from the mailserver?

Sixpax 08-28-2002 11:45 AM

Try this, on each of the machines, except the mail server, create/edit the /etc/aliases file.

Add an entry like so:

root : root@192.168.1.2 <---- IP or hostname of your mail server

Save it and run "newaliases".

Think you might have to restart sendmail afterwards, but not sure.

acid_kewpie 08-28-2002 12:25 PM

to get mail from where? fetchmail is used to download mail from a REMOTE server and place it in your standard unix mailbox, i.e. the same place where sendmail puts any mail it recieves. if you want to be able to access the same email from your other linux machines, then yet again, i'm referring you back to the nfs share method, a very simlpe and comprehensive idea. Sixpax's suggestion is fine too, but if that's the way you want to do it then you will need to use an imap or pop3 server on mail to get to the mail again

needamiracle 08-28-2002 01:11 PM

Hey Chris,

I already have POP3 running which I use KMAIL to view. I have several accounts aliased and all mail is to be picked up by my main user account. Since I administer all the machines on the network, I was looking for a way to retrieve all relevant mail via that user account. I currently don't run any NFS shares on my network and all file transfers are done via scp or sftp. I know that there is a benefit to using NFS but I want to keep things as simple as possible, and right now its using scp and sftp.

Thanks for the help, I do appreciate it.
Ryan

acid_kewpie 08-28-2002 01:41 PM

well if you're not willing to learn the very basics of networking under unix...

oh and kmail will totally shaft any MH mailbox in my experience

needamiracle 08-28-2002 02:21 PM

okay point taken...I'll try the NFS route. Do you have any suggestions for a different mail package other than KMAIL? Have you had any experience with Mozilla's mail package?

tangle 08-28-2002 02:27 PM

I think that there is a spot in the sendmail config file that says where all root mail is sent to. Just set that up to send to your account on your mail server. I use Webmin to config most of my settings, since it is quick and easy (I'm lazy). You might want to try it out. Also learn NFS, it's not that hard and you'll love it. It's a lot better than FTP, and you can backup directories to one server easily.

acid_kewpie 08-28-2002 02:38 PM

i'd suggest sylpheed if you want a big jumpy dancy mail client, personally i just use pine, and it rules.


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