Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Red Hat Linux (http://www.linux-archive.org/red-hat-linux/)
-   -   use smtp / postfix + ssh to send a remote server's log (http://www.linux-archive.org/red-hat-linux/446339-use-smtp-postfix-ssh-send-remote-servers-log.html)

sunhux G 10-31-2010 01:27 PM

use smtp / postfix + ssh to send a remote server's log
 
On our Linux RHES4.x box, I've seen a vendor issuing
"telnet localhost 25"
helo ...
subject...
... content ...
quit (or exit or end?)

to send out mails to say a yahoo addr from our Linux box.

I'll need the exact commands in a Shell script to do :
ssh to a remote server to do "tail -f
/app/servers/slapd-hostname/logs/errors | grep -i replication"
if there's a replication message that appears in the log of the remote
server (which
does not have SMTP/postfix running in it), then email out the line of text
from the log
with replication message asap (within 30 secs) to xxxx@yahoo.com &
yyyy@yahoo.com

Note that our current SMTP/Postfix server can't ssh using public+private
keys to the remote server, just using password authentication, so the
ssh session once logged in to the remote box has to be left open/logged in
constantly
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

hike 10-31-2010 07:03 PM

use smtp / postfix + ssh to send a remote server's log
 
On Sun, Oct 31, 2010 at 10:27 AM, sunhux G <sunhux@gmail.com> wrote:

> On our Linux RHES4.x box, I've seen a vendor issuing
> "telnet localhost 25"
> helo ...
> subject...
> ... content ...
> quit (or exit or end?)
>
> to send out mails to say a yahoo addr from our Linux box.
>
> I'll need the exact commands in a Shell script to do :
> ssh to a remote server to do "tail -f
> /app/servers/slapd-hostname/logs/errors | grep -i replication"
> if there's a replication message that appears in the log of the remote
> server (which
> does not have SMTP/postfix running in it), then email out the line of text
> from the log
> with replication message asap (within 30 secs) to xxxx@yahoo.com &
> yyyy@yahoo.com
>
> Note that our current SMTP/Postfix server can't ssh using public+private
> keys to the remote server, just using password authentication, so the
> ssh session once logged in to the remote box has to be left open/logged in
> constantly
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>


Be careful, "sunhux G" is a known troll on the sunmangers mailing list!
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list


All times are GMT. The time now is 09:23 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.