On Sat 12 June, Carlos E. R. wrote: On Tue 1 June, I wrote: On Mon 31 May, Carlos E.R. wrote: On Mon 31 May, alan@ibgames.com wrote:
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.
Ah - that appears to be the missing link! I can have 'mail' send messages now. Thanks!
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.
(Running 8.2 here) sh: ~> file /bin/mail /bin/mail: symbolic link to ../usr/bin/nail sh: ~> file /usr/bin/Mail /usr/bin/Mail: symbolic link to nail sh: ~> file /usr/bin/mail /usr/bin/mail: symbolic link to nail sh: ~> file /usr/bin/mailx /usr/bin/mailx: symbolic link to nail sh: ~> rpm -qf /usr/bin/nail mailx-10.3-31 Everything is just the same, eh?
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.
Uhm, I just never took the effort to install the local mail system and find out how to set more than one provider and that sort of things. With wvdial and wvdial.conf it's very clear and easy, so I'd rather stick with that. Regards, Sjoerd