izderadicka / xapi-back

Simple backup tool for Xen Api - backups VMs images
2 stars 3 forks source link

Debug: send e-mail #10

Closed forall closed 8 years ago

forall commented 8 years ago

I have problem with e-mail after finished backup, I don't know that problem occur on the script side or server mta side.. because works good and suddenly I don't received e-mail... It's possible to add that option to script e.g --debug-mail?

izderadicka commented 8 years ago

New branch logmail is pushed with this commit b2374004e5706a0bac23308cccb05369fc78fe95. It adds some logging capabilities to sending email. As usual you can use --debug switch. It will log locally if email was sent without problems. There is no possibility to log in detail smtp session, because it all happens internally in smtplib. However all issues are also logged locally in local log.

forall commented 8 years ago

I tested a new option and it is enough for me. When e-mail not send I have info in log file. Thanks.

I observed a different thing with e-mail, when I run a mistake command or wrong I received a e-mail, e.g this e-mail: I forgottent run xb with --no-ssl-crt-check and then I received bellow message on e-mail. 2016-04-02 10:23:53,094 ERROR Command list failed with [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) Script can send only e-mail after backup,restore e.g...?

izderadicka commented 8 years ago

Script basically can send email after any action. EmailIng is based on special log appended and if there is anything in log during tool run it is sent. If you do not want to receive emails during interactive sessions create other configuration file without email setup. configuration file is by default in home directory so you can also create two users - one for interactive use another for batch use.

On April 4, 2016 4:15:55 PM GMT+02:00, forall notifications@github.com wrote:

I tested a new option and it is enough for me. When e-mail not send I have info in log file. Thanks.

I observed a different thing with e-mail, when I run a mistake command or wrong I received a e-mail, e.g this e-mail: I forgottent run xb with --no-ssl-crt-check and then I received bellow message on e-mail. 2016-04-02 10:23:53,094 ERROR Command list failed with [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) Script can send only e-mail after backup,restore e.g...?


You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/izderadicka/xapi-back/issues/10#issuecomment-205314003

Sent from my Android device with K-9 Mail. Please excuse my brevity.

izderadicka commented 8 years ago

Merged to master branch