The Tuesday 2004-06-01 at 21:51 +0200, Sjoerd Hiemstra wrote: Sorry, I forgot to answer this one.
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.
That would have to go into the $HOME/.mailrc file.
"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."
Mmm. Just a note: The program "mail" included in recent versions of SuSE (since perhaps 8.1 or 8.2) is in fact, "nail" - as can be seen from "man mail". This new mail program is way more powerfull than the old, standard, "mail" program.
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.
Let me think. You are trying to use an external SMTP server, because if you use you local sendmail it doesn't get out because of the firewall. My guess would be that "mail" can't also get out, because of the firewall: after all, it needs to use the same port as sendmail/postfix would use. If your setup is diferent or I missunderstood, please explain. -- Cheers, Carlos Robinson