>Can I get my logs mailed using "mail" or any other
> command-line utility?
sendmail directly.
M.
M.
I am trying to get a remote system that is not running any services to
email me some log files periodically. I was trying to write a bash
script to be run by "cron" that would mail me the info.
However, after reading the "mail" man page, I cannot find any way to
specify a SMTP server... or any indication that "mail" had the
capability to send mail itself. I have an availible SMTP server (on
another computer)... Can I get my logs mailed using "mail" or any other
command-line utility?
TiA,
John
>I am trying to get a remote system that is not running any services to
>email me some log files periodically. I was trying to write a bash
>script to be run by "cron" that would mail me the info.
>However, after reading the "mail" man page, I cannot find any way to
>specify a SMTP server... or any indication that "mail" had the
>capability to send mail itself. I have an availible SMTP server (on
>another computer)... Can I get my logs mailed using "mail" or any other
>command-line utility?
--
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/ http://cgi-help.virtualave.net/
> Hello all --
> I am trying to get a remote system that is not running any services to
> email me some log files periodically. I was trying to write a bash
> script to be run by "cron" that would mail me the info.
> However, after reading the "mail" man page, I cannot find any way to
> specify a SMTP server... or any indication that "mail" had the
> capability to send mail itself. I have an availible SMTP server (on
> another computer)... Can I get my logs mailed using "mail" or any other
> command-line utility?
> TiA,
> John
My english isnt very good but I hope that Ive understood your
question!
You can mail the logfiles with the command "cat <logfile>|mail
martin
--
Martin Fries
InnNet GmbH Internet-Services
http://www.InnNet.de
Gewerbering 12
D-83549 Eiselfing
Tel. 08071/9233-0
Fax 08071/9233-29
Partner der Stadt Wasserburg unter
http://www.wasserburg.de
Thanks for everybody who has replied thus far. I can't figure out what
I am doing wrong yet...
I tried
and also...
sendmail -C<path to your sendmail.cf> -t <<EOF
both times I see my modem lights blink and data leaves my computer, but
I have yet to receive any e-mail. I even tried turning on sendmail to see
if it would make a difference (like maybe I would get a return
message (saying some error I would guess))... but no luck.
Do I have to edit /etc/sendmail.cf? (on Red Hat 6.1 anyways)
Sendmail worked fine without modification on a box that had a real static
IP address. (This one does as well, but since its a masquerading gateway
attached to a private net, I gave it a fake host name.) Do you think my
mail is getting bounced/dropped?
TiA for any help...
Cheers,
John
> I am trying to get a remote system that is not running any services to
> email me some log files periodically. I was trying to write a bash
> script to be run by "cron" that would mail me the info.
> However, after reading the "mail" man page, I cannot find any way to
> specify a SMTP server... or any indication that "mail" had the
> capability to send mail itself. I have an availible SMTP server (on
> another computer)... Can I get my logs mailed using "mail" or any other
> command-line utility?
> TiA,
> John
> Hello all again,
> Thanks for everybody who has replied thus far. I can't figure out what
> I am doing wrong yet...
> I tried
> and also...
> sendmail -C<path to your sendmail.cf> -t <<EOF
Therefore you need a SMTP-Server running at your local host.
Second way: Install ncftpget on your local host an tell an appropriate
cron-job to fetch the logfile from the server in question periodically.
(If you need to fetch it via http, use for example wget (it's a gnu-tool).)
Third way: On the remote server, tell the cron-job to send the mail to
your account on the remote server.
Install fetchmail on your local host and tell cron to execute it periodically
to fetch your mail from the remote server.
Contact me in case of further questions, as I'm no regular reader
of comp.os.linux.hardware.
:) Thomas Neurauter
--
a h net it-consultant
a h n e t digitale medien
http://www.ahnet.at
tel 43.732.71 { 5355 | 6000 } fax
1. problems piping from "split" to "mail" (split | mail)
: Hi !
:
: Can anybody give me a hint why the following doesnt work?
:
:
: Piping from uuencode to split works flawless (checked it with "tee"), but
: something doesnt work out in piping from split to mail. What happens is:
: the uuencoded file gets split up correctly (lets assume its split into
: four pieces) and four mails are sent of to the correct address, but they
: are empty. Instead the four files are found on disk. Any ideas?
Yeah, you didn't read the man page for split:
split(1)
split(1)
NAME
split - split a file into pieces
SYNOPSIS
split [-l line_count] [-a suffix_length] [file [name]]
split [-b n[k|m]] [-a suffix_length] [file [name]]
Obsolescent:
split [-n] [file [name]]
DESCRIPTION
split reads file and writes it in pieces (default 1000 lines) onto a
set of output files. [...]
*sigh*
--Dave
--
http://armf18.dow.on.doe.ca:6700/~dbrown "On two occasions I have been asked
[by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine
wrong figures, will the right answers come out?' I am not able rightly to
apprehend the kind of confusion of ideas that could provoke such a question."
2. Generic x86 boot code [was Linux OS boilerplate]
3. Sendmail: mails rejected with "550-unrouteable mail domain "blade150.lafr.de""
4. Mouse cursor postion at X init
5. "Server" via mail: /usr/spool/mail/me a named pipe
7. HELP! "mail loops back to myself"
9. how do i program a "mail server"?
10. GETSERVBYNAME()????????????????????"""""""""""""
11. Local Mail (using "mail") Does Not Get Delivered?
12. Looking for "voice mail"/"answering machine" software
13. Mail for user "backup" going to "root"