Carlos E. R. wrote:
The Monday 2004-05-31 at 07:40 +0100, alan@ibgames.com wrote:
I have a question for a mail program wiz.
I'm using 'mail' to send out a message from within a program using
"/usr/bin/mail -s "subject" < "filename &"
How do I make it talk to the network's smtp server? It works fine is I have the local sendmail running (except, of course that it can't get out thru the firewall :) )
I think "mail" calls the sendmail program for sending mail - that's why postfix has a "sendmail" binary - then you have to configure your local MTA (postfix, I suppose) to send mail through your network server.
According to man mail, a command like 'set smtp=smtp.your_isp.com' should do it. "Normally, nail invokes sendmail(8) directly to transfer messages. If smtp is set, a SMTP connection to the server specified by the value of this variable is used instead." However, after studying 'man mail' I haven't succeeded to send *any* message with 'mail' yet. After pressing Ctrl-D at the beginning of a line, 'EOT' appears, the bash prompt is back and nothing has been sent. So if your attempts have been successful, I'd be interested in how you did it. SH