Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mail script

1 view
Skip to first unread message

tt

unread,
Jan 12, 2000, 3:00:00 AM1/12/00
to
Hello

I have to make script that sends some log files to myself via sendmail,
so can anybody help me with script syntax?

Thanks4help
tt

Tony Lawrence

unread,
Jan 12, 2000, 3:00:00 AM1/12/00
to tt
tt wrote:
>
> Hello
>
> I have to make script that sends some log files to myself via sendmail,
> so can anybody help me with script syntax?

SUBJECT="Here's your logs `date`"
SENDTO="bill tom ellen jack somebody@somewhereelse
ever...@aol.com"
FILE=/var/syslog
mail -s "$SUBJECT" $SENDTO < $FILE

Is that what you want?


--
Tony Lawrence (to...@aplawrence.com)
SCO articles, help, book reviews, tests,
job listings and more : http://www.ApLawrence.com

Steve Wertz

unread,
Jan 14, 2000, 3:00:00 AM1/14/00
to
In comp.unix.sco.misc tt <tep...@usa.net> wrote:
> Hello

> I have to make script that sends some log files to myself via sendmail,
> so can anybody help me with script syntax?

Tony posted the more traditional way. If you insist on using 'sendmail',
a quick look at the man-page suggests I do something like this:

517$ echo "."|/usr/lib/sendmail -bm swertz < /usr/adm/messages

Sometimes people wonder "where did the rest of my mail message
go", only to find that somewhere in the message was a line that started
with and contained only a single dot/period (which truncates a
message in mail/mailx, regardless of '[un]set dot' in your ~/.mailrc').

-sw


0 new messages