Commit Graph
34 Commits
Author SHA1 Message Date
Kenneth Skovhede 473c6cbbb8 Merge commit '4f577c65a4d8806f79637c50c21ca3a683c5a07a' into feature/kestrel-avalonia-upgrade 2024-03-04 12:21:53 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Thomas Suckow 1b72212533 Dnslite doesn't work on mac/linux in .net5 2021-04-10 13:39:53 -07:00
Kenneth Skovhede 4e5f4a12bf Merge branch 'master' into feature/filters-for-sendmail
Integrated changes to support log-lines and to have a common shared module for reporters

# Conflicts:
#	Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj
#	Duplicati/Library/Modules/Builtin/RunScript.cs
#	Duplicati/Library/Modules/Builtin/SendHttpMessage.cs
#	Duplicati/Library/Modules/Builtin/SendJabberMessage.cs
#	Duplicati/Library/Modules/Builtin/SendMail.cs
2018-04-12 11:16:57 +02:00
Stephen Gregory b7bda1d1c4 Add result serializers 2018-04-11 22:40:44 -02:30
Stephen Gregory 637e5a4a48 Change method signature of ResultSerializer 2018-04-11 22:40:43 -02:30
Stephen Gregory 46170de84e Extract result serialization to file 2018-04-11 22:40:42 -02:30
Kenneth Skovhede 731ecfc47d Rewrote the report modules to use a shared base class with all the non-sending specific code.
Change the logic for how the log data is included. It is now added as log lines _after_ the normal messages.
Added support for limiting the number of log lines sent.
Added support for setting the log levels on the modules.
Added support for setting a log filter on the modules.
Added support for sending log data as JSON from the http module.
2018-04-10 12:58:06 +02:00
Kenneth Skovhede bceed2ffbe Work on adding filters to send-mail 2018-04-02 11:20:46 +02:00
Kenneth Skovhede 842fd96543 Implemented a new logging system that is more transparent and allows a more granular way of picking log messages.
Added ID's to each log message and each exception to allow later introduction of a Knowledgebase service that explains each error in more detail.
2018-03-15 09:12:34 +01:00
Tyler Gill 83a1dcfb64 Replace all instances of InvariantCultureIgnoreCase with OrdinalIgnoreCase in string comparisons.
InvariantCulture is useful when comparing / sorting human language strings in a culturely correct way. It handles things like accented letters in a way that makes sense to humans (e.g., 'a' should be sorted next to 'á', rather than after 'z').
Ordinal looks just at the raw code points of the characters. As such, it is recommended for use in cases when comparing system strings (file paths, command line parameters, config settings, etc.). Since it doesn't need to use the culture specific sorting rules, this method can often be faster.

For more information, see https://stackoverflow.com/questions/492799/difference-between-invariantculture-and-ordinal-string-comparison (and other related questions)
2017-09-18 23:55:08 -06:00
Tyler Gill 768cd93923 Normalize some whitespace 2017-09-13 22:30:12 -07:00
Kenneth Skovhede 80d533b839 Updated Jabber, Http and Mail modules to always set the parsedresult variable. 2017-09-01 10:49:12 +02:00
Kenneth Skovhede 9e6eefad9f Merge branch 'feature/add_single_result_code'
# Conflicts:
#	Duplicati/Library/Modules/Builtin/Strings.cs
2017-01-23 23:32:30 +01:00
Kenneth Skovhede 1424be05f9 Fixed a bunch of typos.
This fixes #2278.
2017-01-23 22:12:24 +01:00
Kenneth Skovhede bc725e0edf Updated SendMail and SendJabberMessage to use the new result codes.
This fixes #2257
2017-01-23 20:49:33 +01:00
Kenneth Skovhede 34ee487379 Fixed a spelling issue 2017-01-15 23:08:52 +01:00
Kenneth Skovhede 6bb1579aa9 Updated MailKit, fixed a bug with DnsLite, added backward compatible tls support from MailKit.
This fixes #1540.
This fixes #1948.
This fixes #2060
This fixes #2225
2017-01-09 23:21:00 +01:00
Max 3ace0ee9b7 fix done 2016-06-25 22:34:53 +02:00
Kenneth Skovhede 841d87abd2 Fixed an issue where the %PARSEDRESULT% field would be empty if a custom --send-mail-level was set 2015-12-26 22:37:30 +01:00
Kenneth Skovhede afdf2e5224 Improved logic for mail templates 2015-09-05 10:17:21 +02:00
Kenneth Skovhede 89e70c1f7b Added the parsed result status as a field that can be sent in the xmpp or email templates.
This fixes #1371.
2015-05-04 10:53:19 +02:00
Kenneth Skovhede d0090632c9 Fixed usage of EntryAssembly to work better with NUnit 2015-04-09 21:52:07 +02:00
Kenneth Skovhede 16c791f0b5 Removed all resx files, now using Duplicati.Library.Localization exclusively 2015-01-20 21:07:24 +01:00
Kenneth Skovhede 997e72ee0e Fixed a warning with --send-mail-level 2014-09-02 18:03:49 +02:00
Kenneth Skovhede 5d5559e169 Added support for multiple mail servers, both manually and through DNS lookup.
Each address is tried by priority until the message passes.
2014-01-18 23:16:34 +01:00
Kenneth Skovhede 393e5e325f Improved autodetection of target stmp server, and added fallback DNS support for Google and OpenDNS 2014-01-18 22:28:51 +01:00
Kenneth Skovhede cb88c5c90b Update issue #882
Status: Fixed

The valid values were not reported for --send-mail-level
2013-11-07 10:14:35 +01:00
Kenneth Skovhede 8f69fc85c2 Removed a bunch of warnings 2013-06-26 21:29:03 +02:00
Kenneth Skovhede d696670598 Reworked the result reporting to support type safe values 2013-05-25 16:40:15 +02:00
Kenneth Skovhede 86b52d364d Added a custom URL parser 2013-05-05 21:18:00 +02:00
kenneth@hexad.dk 86e19e76f8 Fixed a bug where the sendmail-levels were reported as invalid.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1473 59da171f-624f-0410-aa54-27559c288bec
2012-11-03 18:27:37 +00:00
kenneth@hexad.dk 23515674fd Added --backup-name to help when constructing emails and running scripts
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1445 59da171f-624f-0410-aa54-27559c288bec
2012-08-27 18:43:58 +00:00
kenneth@hexad.dk 6822fc69fa Update issue #29
This adds the email feature to Duplicati.
Currently there is no GUI for this, just advanced options.
The options supported are:
--send-mail-to="Name <test@example.com>, Other <test2@example.com>, test3@example.com"
--send-mail-from="Backup Admin <admin@example.com>
--send-mail-subject="Duplicati %OPERATIONNAME% Report"
--send-mail-body="%RESULT%%"
--send-mail-url="tls://smtp.google.com:587"
--send-mail-username="username"
--send-mail-password="password"
--send-mail-level="Warning"
--send-mail-any-operation=true

The only required setting is --send-mail-to.
If the --send-mail-from is not set, it will use the host of the "to" and set "no-reply@" in front.
E.g. --send-mail-to="name@example.com" will cause the sender to be "no-reply@example.com".

If the --send-mail-url is not set, a DNS lookup will find the MX record for the first recipient domain,
and send directly to that. The url can be either "smtp://server:port" or "tis://server:port".

The --send-mail-subject and --send-mail-body parameters can contain placeholders like %RESULT%.
Each option will be exported like this, e.g. %volsize% or %use-ssl%. The special placeholders are:
%RESULT% - The result/log of the backup
%OPERATIONNAME% - The name of the operation, usually "Backup", but could be "Restore" etc.
%REMOTEURL% - The backend url
%LOCALPATH% - The path to the local folders involved (i.e. the folders being backed up)

The --send-mail-level can be either "Success", "Warning" or "Error". Default "Success" means all backups generate an email. "Warning" will only send an email if the backup caused a warning or an error. "Error" will only send an email if the backup failed.

The --send-mail-any-operation can be set to "true" if all operations (e.g. "Restore", "Cleanup", "DeleteAllButN", ...) should generate an email. By default only backup operations will send an email.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@1436 59da171f-624f-0410-aa54-27559c288bec
2012-08-21 09:35:55 +00:00