Topic: mail server config question.

I have a mail server using postfix and qmail.

I wonder is there a way to have my workstations local mail sent through the server. Here's an example to clear things up.

The Server: Santiago
The Workstation: Atomizer - has accounts root & roddierod

On Atomizer I want to root to send an email to roddierod via Santiago.

Is this possible? Atomizer doesn't have sendmail or any other mail server enabled.

"An educator never says what he himself thinks, but only that which he thinks it is good for those whom he is educating to hear."
-Nietzsche

Re: mail server config question.

http://msmtp.sourceforge.net/ - is this what you're looking for ?

Keep Smiling

Re: mail server config question.

looks promising. Thanks I will try it out.

"An educator never says what he himself thinks, but only that which he thinks it is good for those whom he is educating to hear."
-Nietzsche

Re: mail server config question.

Install postfix and configure the relayhost option to point to the IP of the mail server in square brackets [] (the brackets tell it to connect directo to the IP without doing a DNS MX lookup on the IP).

Re: mail server config question.

phoenix,

I think I'm missing something. I've setup postfix, but this is what I not understanding. I set the relayhost to 192.168.1.104 my mail server.

now if I want my workstation 192.168.1.105 to mail something to the user roddierod on itself, shouldn't I have to set something up on the server??

when I try this on the server it just hangs...

mail -s TEST roddierod

I even have an email address roddierod@opensourcebeef.net which works, but trying to mail to it from the workstation does work either. Postfix is running.

"An educator never says what he himself thinks, but only that which he thinks it is good for those whom he is educating to hear."
-Nietzsche

Re: mail server config question.

Wait, you want to send local messages (from root@atomizer to roddie@atomizer) via an external SMTP server??  That completely defeats the purpose of running an SMTP server on the local system.

Local messages (from user1 to user2 on the same host) should never need to leave that host.

Re: mail server config question.

maybe I'm not understanding how local mail works then. I didn't have sendmail or anything enabled on atomizer so I was recieving no mail at all from local user to local user or from the system.

I'm guessing that I have to have sendmail enabled to correct this.

"An educator never says what he himself thinks, but only that which he thinks it is good for those whom he is educating to hear."
-Nietzsche

Re: mail server config question.

In order to deliver mail from one local user to another local user, or to deliver system mail, you need to have an SMTP server running on at least 127.0.0.1 (localhost).  This SMTP server will access mail from locally running applications (mail at the commandline, cron, periodic, etc) and will deliver it to local user mail spools (/var/spool/mail).

Which SMTP server you use is up to you.  The default config for sendmail in FreeBSD is a local-only SMTP server.  You have to manually change the config file in order for it to receive messages from other servers (ie listen on a real IP).

Postfix can be configured as a localhost-only SMTP server by setting inet_interfaces to localhost and/or mynetworks_style to host.

No idea how to configure QMail, as I personally avoid it and recommend that people don't use it.  smile

Re: mail server config question.

thanks phoenix. I'm just going with the default sendmail setup since it just local.

"An educator never says what he himself thinks, but only that which he thinks it is good for those whom he is educating to hear."
-Nietzsche