Linux 'mail' program using relay on other host

Status
Not open for further replies.
Joined
Aug 15, 2005
Messages
2,329
Location
Lexington, KY
I see there are a number of Linux proficient folks here...

The built-in 'mail' program in UNIX-type operating systems works just fine for my purposes, as long as the machine it is running on is itself a mail relay. When the mail relay is a different machine I run into problems.

How can I make 'mail' work (to send mail) with the mail relay being a different machine on the LAN?

I know there are other free programs that can be used, but, if possible, I'd like to use a program that is guaranteed to be there with the OS, without additional software installation.

I'm looking for a solution that isn't Linux-flavor-specific, but in case it helps to know, the test bed is Debian.
 
The mail relay you will be sending to is no different than then machine that is sending the mail; the configuration is what sets them apart.

Some common mail serving programs are Exim, Postfix, sendmail. One will need to installed/configured on your host to forward mail to the relay. Postfix or Exim would be much easier to configure; sendmail will send you to the funny farm.

Of course, the mail relay MIGHT need to be configured to accept mail from your host.

@ our sight, numerous unix/linux machines (sendmail) send mail to an internal relay(sendmail), which sends it to an DMZ relay(exim) then out on the internet; We can control what internal machines can send mail to prevent compromised windows machine from e-mailing info off the site.

Of course you could use a client program like Thunderbird which allows you to specify an outgoing SMTP server. Is that what you are asking?
 
Last edited:
simple_gifts, thank you!

You've provided excellent answers.

The objective is sending within Linux, text/command line style, no Thunderbird.

The machines I am experimenting with are Debian Linux, with a Postfix relay running only on the one sending mail out to the Internet.

From your description, the other machine needs to have a relay running, but that one need only forward to the main relay that communicates outside the LAN.
 
Status
Not open for further replies.
Back
Top