Notifikasi Email Low Disk Space Harddisk

Semua mengenai lingkungan desktop Ubuntu.
User avatar
blinds
Posts: 14
Joined: 06 Jul 2011, 08:49
Location: Jakarta
Contact:

Notifikasi Email Low Disk Space Harddisk

Postby blinds » 11 Nov 2013, 11:58

agan" master ubuntu,
ane mo coba tes Notifikasi Email Low Disk Space Harddisk
saya dah cba pke perl/pyton script (hasil googling)
tpi lom berhasil

kiranya ada yang pernah pke script untuk Notifikasi Email Low Disk Space Harddisk ga ? . .


Thanks
User avatar
blinds
Posts: 14
Joined: 06 Jul 2011, 08:49
Location: Jakarta
Contact:

[Solved] Notifikasi Email Low Disk Space Harddisk

Postby blinds » 13 Jan 2014, 07:58



thanks gan
dah solved

caranya:
# install ssmtp
apt-get install smtp

# seting ssmtp
vi /etc/ssmtp/ssmtp.conf
------------
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids =$above) {
push @New,$_;
}
}

##### If there is anything found, send mail
if (@New) {
$mail = new FileHandle;
$mail->open("| /usr/sbin/sendmail -t") || die "Cannot open: $!";
$mail->print("From: $mailfrom\n");
$mail->print("To: $mailto\n");
$mail->print("Subject: Disk Space is Low\n\n");
$mail->print(@New, "\n");
$mail->close();
}
--------------------------------

# buat crontab
* * * * * /path/script
Last edited by blinds on 27 Feb 2016, 22:31, edited 1 time in total.
Reason: [Solved]

Return to “Ubuntu Desktop”

Who is online

Users browsing this forum: No registered users and 1 guest