www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

[Howto] Failover mail alert in zeroshell

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
aseques



Joined: 16 Jun 2009
Posts: 59

PostPosted: Wed Jul 08, 2009 2:27 pm    Post subject: [Howto] Failover mail alert in zeroshell Reply with quote

I did some changes in failoverd script, to enable the failover monitor to send mails in case there's a change in the state of a line.

Basically what I did was to use an opensource program called smtp-client.pl writen in perl that permits you to send mail directly.

In order for this to work, we need to replace failoverd with the modified version and place smtp-client.pl on /root/kerbynet.cgi/scripts/ (this is done on boot time via the rc.pre script)

After that, if we have in our profile a file called kerbynet-local.conf (_DB.001/etc/kerbynet-local.conf)
With the content:

MAIL_HOST=ip_address_of_outgoing_server
MAIL_RCPT=from@example.com
MAIL_FROM=to@example.com
MAIL_USER=username
MAIL_PASS=password

I've tested and it works really fine, and the modifications are done on a way that it doesn't disturb if you don't have the smpt-client available.

Simplified instruccions to install in the repository
You can find the modifications on http://bitbucket.org/aseques/zeroshell-documentation


Last edited by aseques on Wed Mar 13, 2013 11:53 am; edited 4 times in total
Back to top
View user's profile Send private message
fulvio
Site Admin


Joined: 01 Nov 2006
Posts: 1073

PostPosted: Wed Jul 08, 2009 9:28 pm    Post subject: Reply with quote

Very nice solution.

Thanks a lot
Fulvio
Back to top
View user's profile Send private message Send e-mail
aseques



Joined: 16 Jun 2009
Posts: 59

PostPosted: Thu Jul 09, 2009 8:04 am    Post subject: Reply with quote

I'd be glad if you could integrate this at the next release, no problem with the licenses, since the changes are on the scripts, it'd be already GPL
An the smtp-client is also GPL2.
Back to top
View user's profile Send private message
securenet



Joined: 27 Apr 2009
Posts: 64

PostPosted: Tue Mar 16, 2010 8:18 pm    Post subject: Reply with quote

Are there written step-by-step instructions for installing and configuring SMTP on Zeroshell as described in this Post? If not, can some instructions be created and posted?

I am also not finding the opensource program smtp-client.pl.
Back to top
View user's profile Send private message
aseques



Joined: 16 Jun 2009
Posts: 59

PostPosted: Mon Jun 14, 2010 1:56 pm    Post subject: Reply with quote

Have a look here, you'll find both:
http://bitbucket.org/aseques/zeroshell-documentation/src
Back to top
View user's profile Send private message
aseques



Joined: 16 Jun 2009
Posts: 59

PostPosted: Tue Jul 20, 2010 10:55 am    Post subject: Reply with quote

I just updated a little bit the documentation, these are the changes:
.- Updated the script to copy the patches
.- Updated the version of smtp-client to the current version
.- Verified that everything still works with beta13
Back to top
View user's profile Send private message
ponsudhakar



Joined: 20 Jan 2012
Posts: 1

PostPosted: Fri Jan 20, 2012 8:15 am    Post subject: Re: Mail alert on failover update Reply with quote

Hi team,

Am using ZS as USB bootable. as a dedicated firewall. How to include the smtp-client.pl and where to install and configure the same. I did as instructed on aseques bitbucket. but no luck.


Please help me in this regards


Rgds
VPS
Back to top
View user's profile Send private message
aseques



Joined: 16 Jun 2009
Posts: 59

PostPosted: Wed Mar 13, 2013 11:53 am    Post subject: Reply with quote

Just updated the script and patches for the current failoverd (zs RC2), enjoy Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group