View previous topic :: View next topic |
Author |
Message |
thorpe l33t
Joined: 09 May 2005 Posts: 618 Location: Sydney, Australia.
|
Posted: Wed Nov 08, 2006 1:05 am Post subject: mail system setup? |
|
|
Ok... you'll need to pardon my ignorance, Ive never delved into this area before. I have just successfully completed following this guide and now have a mailserver setup (utilserv.mydomain). This mailsever also has a webserver running on it and I can now successfully log into squirrelmail (http://mail.mydomain) and send / recieve mail. All of this is tied to the outside world using dyndns.
Sweet.
Now. I have 2 other machines here on my lan (ob.mydomain and fw.mydomain) and I would like to set them up so that any programs that require the ability to send email (eg; portage logs, messages from cron, whatever) can use the mailserver I already have setup.
Now... it might sound funny but because that guide was so well written it just worked, and I still don't really understand how. So now Im stuck in that Im not sure what I need on these other machines to make them have the ability to send mail without having to follow the same guide for them aswell.
Do I just need to setup sendmail or something? Sorry... Im just a little lost as to what they actually need. I dont want them to be full blown mail servers.
Any advice would be MUCH appreciated. _________________ Research before taking any advice from me. I'm still coming to grips with this myself. |
|
Back to top |
|
|
papal_authority Veteran
Joined: 31 Mar 2004 Posts: 1823 Location: Canada
|
Posted: Wed Nov 08, 2006 4:37 am Post subject: |
|
|
I can't get to that HOWTO, but did it involve setting up an SMTP server (e.g. postfix or sendmail)? If it did you, you just need to allow it to relay from those two machines. I have a similar setup at home. My roomies all send through my mail server. _________________ The free market gave me gonorrhea. |
|
Back to top |
|
|
thorpe l33t
Joined: 09 May 2005 Posts: 618 Location: Sydney, Australia.
|
Posted: Wed Nov 08, 2006 12:35 pm Post subject: |
|
|
Yes, I have postfix installed on the server. What I want to be able to do however is send mail via the other two machines.
Anyone? _________________ Research before taking any advice from me. I'm still coming to grips with this myself. |
|
Back to top |
|
|
papal_authority Veteran
Joined: 31 Mar 2004 Posts: 1823 Location: Canada
|
Posted: Wed Nov 08, 2006 2:45 pm Post subject: |
|
|
You want the other two machines to send mail via your postfix server? If so, that's trivial. _________________ The free market gave me gonorrhea. |
|
Back to top |
|
|
thorpe l33t
Joined: 09 May 2005 Posts: 618 Location: Sydney, Australia.
|
Posted: Wed Nov 08, 2006 3:15 pm Post subject: |
|
|
Yes.... that is what I want Im sorry, I just have no idea how to go about it. Also, I do some php dev on one of these machines, Ide like to be able to send mail via my postfix server through php.
The php.ini askes for me to set the path to sendmail, but its not on this machine. I wantr to send the mail via my allready existing postfix server.
Sorry, Im just a little confused as to how this all ties together. I guess, I need to make a little script (/usr/bin/sendmail) that will send mail via my mail server on my other machine. _________________ Research before taking any advice from me. I'm still coming to grips with this myself. |
|
Back to top |
|
|
papal_authority Veteran
Joined: 31 Mar 2004 Posts: 1823 Location: Canada
|
Posted: Wed Nov 08, 2006 4:39 pm Post subject: |
|
|
Server Config:
IIRC, if you set "smtpd_recipient_restrictions = permit_mynetworks" in /etc/postfix/main.cf, it will accept mail from all your local machines. I'm guessing all three machines are on the same LAN? If they're not, you can create a client_access file and add each of the two machines (there's a bit more to this step if you need to do this).
Client Config:
Next you need an SMTP daemon on the client boxes whose smart host points to your primary server. Note you only need this for command line stuff and PHP. If you're just using mutt or Thunderbird, you can point them at the server already. If you do need command line stuff, I'd recommend installing ssmtp as all it is an SMTP daemon which knows just enough to pass mail off to another server. It's in portage and the config file is as simple as can be:
Code: | root=your_email_address
mailhub=your_main_mail_server.mydomain
hostname=this_slave_computer.mydomain |
_________________ The free market gave me gonorrhea. |
|
Back to top |
|
|
thorpe l33t
Joined: 09 May 2005 Posts: 618 Location: Sydney, Australia.
|
Posted: Wed Nov 08, 2006 9:06 pm Post subject: |
|
|
Thankyou VERY much buddy, Im off to try that right now. _________________ Research before taking any advice from me. I'm still coming to grips with this myself. |
|
Back to top |
|
|
|