# How to configure automatic email notifications via gmail for every backup job

**URL:** https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869
**Category:** How-To
**Created:** [October 1, 2017, 1:55pm UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869 "2017-10-01T13:55:26Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Marc\_Aronson](https://forum.duplicati.com/user_avatar/forum.duplicati.com/marc_aronson/32/3539_2.png) [@Marc\_Aronson](https://forum.duplicati.com/u/Marc_Aronson)
#### Post date: [October 1, 2017, 1:55pm UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/1 "2017-10-01T13:55:26Z")

</div>

This article explains how to configure automated email notifications via gmail at the conclusion of every Duplicati operation (backup, restore, etc.). With this approach, every Duplicati job on the machine will send automated notifications – you don’t need to configure each job individually.

- Open Duplicati

- Click on Settings.

- Scroll down to “default options” and click on “edit as text”.

- Copy the text block below, and paste it into the “Options” text box

- Click on the “Edit as list” button

You will now see 7 advanced options.

> **Screenshot 5**
>
> ![image](https://forum.duplicati.com/uploads/default/original/1X/3757dba33ca5f1e99e61c8c3e3f8da00bea8b1e6.png)

The first 3 do not need to be modified. The last 4 need to be modified as follows:

- Replace _[destination\_email\_address@whatever.com](mailto:destination_email_address@whatever.com)_ with the email address you want the status message sent to.
- Replace _[your\_sending\_gmail\_username@gmail.com](mailto:your_sending_gmail_username@gmail.com)_ with the email address of the gmail account you are using to send the message. (Note that there are two places where you need to make this change)
- Replace **_your\_sending\_gmail\_password_** with the password of the gmail account you are using to send the message.
- Replace **_This\_computers\_name_** with the name of the computer that the backup job is running on.

Click the “OK” button at the bottom of the screen to save your results.

You will now receive an email message at the conclusion of every Duplicati job that is run on the current computer.

This can generate a lot of email clutter – a report for every backup job run. There are two approaches to reducing the volume of email received.

My recommend approach is using [dupReport.py](https://forum.duplicati.com/t/announcing-dupreport-a-duplicati-email-report-summary-generator/1116) to generate summary reports. This excellent tool was developed by @handyguy. If you do this, be sure to modify the “subjectregex=” line in dupReport.rc as shown below to ensure the summary reports work for either the default subject line or the subject line used in this writeup.

`subjectregex = ^Duplicati ([\w]*, |)Backup report for`

You also need to add a filter to your email client to automatically move the duplicati-generated email’s out of your inbox and into an email folder which dupReport.py can process.

Alternatively, as suggested by @sanderson, below, you can add this setting:  
`--send-mail-level=Warning,Error,Fatal`

The one downside to this approach is that it doesn’t differentiate between a backup job that succeeded and one that never ran, as the result of both conditions is that no email is sent. This is why I prefer the dupReport.py approach.

Enjoy!

Marc

---

<div class="post-metadata">

### Author: ![sanderson](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/s/dfb087/32.png) [@sanderson](https://forum.duplicati.com/u/sanderson)
#### Post date: [October 2, 2017, 1:52am UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/2 "2017-10-02T01:52:29Z")

</div>

If you don’t want email on every backup, but only if there is a problem you can added this setting:

```
--send-mail-level=Warning,Error,Fatal

```

---

<div class="post-metadata">

### Author: ![magnust](https://forum.duplicati.com/user_avatar/forum.duplicati.com/magnust/32/251_2.png) [@magnust](https://forum.duplicati.com/u/magnust)
#### Post date: [October 9, 2017, 6:51am UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/3 "2017-10-09T06:51:21Z")

</div>

Brilliant! Thank you.

---

<div class="post-metadata">

### Author: ![JohnnyBeGood](https://forum.duplicati.com/user_avatar/forum.duplicati.com/johnnybegood/32/640_2.png) [@JohnnyBeGood](https://forum.duplicati.com/u/JohnnyBeGood)
#### Post date: [November 5, 2017, 3:22am UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/4 "2017-11-05T03:22:08Z")

</div>

Thank you very much [Marc\_Aronson](https://forum.duplicati.com/u/Marc_Aronson) for posting your how-to it works great!  
Until now I wasn’t able to find more clear instructions anywhere including this forum.

---

<div class="post-metadata">

### Author: ![JohnnyBeGood](https://forum.duplicati.com/user_avatar/forum.duplicati.com/johnnybegood/32/640_2.png) [@JohnnyBeGood](https://forum.duplicati.com/u/JohnnyBeGood)
#### Post date: [November 5, 2017, 3:23am UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/5 "2017-11-05T03:23:26Z")

</div>

Thanks for posting this little hint [sanderson](https://forum.duplicati.com/u/sanderson), it is really helpful!

---

<div class="post-metadata">

### Author: ![Marc\_Aronson](https://forum.duplicati.com/user_avatar/forum.duplicati.com/marc_aronson/32/3539_2.png) [@Marc\_Aronson](https://forum.duplicati.com/u/Marc_Aronson)
#### Post date: [March 6, 2018, 2:52pm UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/7 "2018-03-06T14:52:08Z")

</div>

> [@Stephen\_Mag](#):
>
> What you say about backing up Gmail in other file formats.

Hi Stephen, I don’t back up my google docs or email.

I back up my google photos by downloading them via Picassa periodically. I am thinking of switch from this to google takeout at some point.

Marc

---

<div class="post-metadata">

### Author: ![paglino](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@paglino](https://forum.duplicati.com/u/paglino)
#### Post date: [March 7, 2018, 8:02am UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/8 "2018-03-07T08:02:56Z")

</div>

> [@Marc\_Aronson](#):
>
> –send-mail-from=This\_computers\_name backup \<your\_sending\_gmail\_username@gmail.com\>

Thanks Marc,  
but for me this line did not work, so I had to change it:  
[--send-mail-from=your\_sending\_gmail\_username@gmail.com](mailto:--send-mail-from=your_sending_gmail_username@gmail.com)

P.S.  
I do not use Gmail, but my personal email

---

<div class="post-metadata">

### Author: ![Marc\_Aronson](https://forum.duplicati.com/user_avatar/forum.duplicati.com/marc_aronson/32/3539_2.png) [@Marc\_Aronson](https://forum.duplicati.com/u/Marc_Aronson)
#### Post date: [March 7, 2018, 2:13pm UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/9 "2018-03-07T14:13:15Z")

</div>

> [@paglino](#):
>
> but for me this line did not work, so I had to change it:
> 
> [--send-mail-from=your\_sending\_gmail\_username@gmail.com](mailto:--send-mail-from=your_sending_gmail_username@gmail.com)

That’s strange – the notation:  
`Firstname Lastname <emailaddress@foobar.com>`  
is standard notation and works on 3 other machines I have configured with duplicati.

If your happy without the “from” email containing the name of the computer backed up, then all is well.

If you want help getting it to work the other way, then PM me your settings exported as text, with any passwords masking out.

THanks!

Marc

---

<div class="post-metadata">

### Author: ![airhead1981](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/a/ccd318/32.png) [@airhead1981](https://forum.duplicati.com/u/airhead1981)
#### Post date: [April 11, 2018, 5:30am UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/10 "2018-04-11T05:30:32Z")

</div>

Anyone knows why they just don’t add a simple EMAIL ALERT ACCOUNT SETUP within the DUPLICATI setup.  
The tool is great, this should be a simple modification compared to all the coding already done.

---

<div class="post-metadata">

### Author: ![Pectojin](https://forum.duplicati.com/user_avatar/forum.duplicati.com/pectojin/32/1231_2.png) [@Pectojin](https://forum.duplicati.com/u/Pectojin)
#### Post date: [April 11, 2018, 5:57am UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/11 "2018-04-11T05:57:23Z")

</div>

It just has not been done yet. But I agree, it’s pretty easy to implement 🙂

---

<div class="post-metadata">

### Author: ![JonMikelV](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@JonMikelV](https://forum.duplicati.com/u/JonMikelV)
#### Post date: [April 13, 2018, 2:57pm UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/12 "2018-04-13T14:57:19Z")

</div>

> [@Pectojin](#):
>
> I agree, it’s pretty easy to implement

Did I just hear a volunteer? 😉

---

<div class="post-metadata">

### Author: ![Pectojin](https://forum.duplicati.com/user_avatar/forum.duplicati.com/pectojin/32/1231_2.png) [@Pectojin](https://forum.duplicati.com/u/Pectojin)
#### Post date: [April 13, 2018, 4:36pm UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/13 "2018-04-13T16:36:16Z")

</div>

I’ll add it to the end of my to-do list so I can look at it next year 😉

---

<div class="post-metadata">

### Author: ![Folgore101](https://forum.duplicati.com/user_avatar/forum.duplicati.com/folgore101/32/421_2.png) [@Folgore101](https://forum.duplicati.com/u/Folgore101)
#### Post date: [June 22, 2018, 8:10am UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/14 "2018-06-22T08:10:37Z")

</div>

Hi [Marc\_Aronson](https://forum.duplicati.com/u/Marc_Aronson), thanks for the great guide, it works very well.

---

<div class="post-metadata">

### Author: ![whitenack](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@whitenack](https://forum.duplicati.com/u/whitenack)
#### Post date: [July 20, 2018, 6:16pm UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/15 "2018-07-20T18:16:41Z")

</div>

Hey guys, just popping in here to request an update. Looks like you need to add quotes around the subject wording if you have spaces between words.

`--send-mail-subject="Duplicati %PARSEDRESULT%, %OPERATIONNAME% report for %backup-name%"`

Also, this code needs to be added:

`--accept-any-ssl-certificate=true`

---

<div class="post-metadata">

### Author: ![rinogo](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/r/a5b964/32.png) [@rinogo](https://forum.duplicati.com/u/rinogo)
#### Post date: [August 24, 2018, 6:18pm UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/16 "2018-08-24T18:18:59Z")

</div>

I don’t know when/if something changed in `dupReport`, but this how-to needs to be updated to use [Source-Destination Pairs](https://github.com/HandyGuySoftware/dupReport#source-destination-pairs).

This means using a `--send-mail-subject` line like the following (notice the “-My\_Backup\_System” portion):

`--send-mail-subject="Duplicati %PARSEDRESULT%, %OPERATIONNAME% report for %backup-name%-My_Backup_System"`

---

<div class="post-metadata">

### Author: ![JonMikelV](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@JonMikelV](https://forum.duplicati.com/u/JonMikelV)
#### Post date: [September 2, 2018, 3:40am UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/17 "2018-09-02T03:40:59Z")

</div>

Hello @rinogo, welcome to the forum - and thanks for the reminder for any other new readers on this topic!

---

<div class="post-metadata">

### Author: ![Marc\_Aronson](https://forum.duplicati.com/user_avatar/forum.duplicati.com/marc_aronson/32/3539_2.png) [@Marc\_Aronson](https://forum.duplicati.com/u/Marc_Aronson)
#### Post date: [September 3, 2018, 1:47pm UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/18 "2018-09-03T13:47:33Z")

</div>

Hi, original author here. When I get some spare cycles I’ll upgrade to the latest version to dupReport and update the howto.

Marc

---

<div class="post-metadata">

### Author: ![Ideafix](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/i/e68b1a/32.png) [@Ideafix](https://forum.duplicati.com/u/Ideafix)
#### Post date: [November 6, 2018, 11:48am UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/19 "2018-11-06T11:48:54Z")

</div>

Hi there,

Thank you for this guide.

This may sound a bit obvious, but for the more distracted folks, like myself, you need to enable access for less secure apps in the Google account, or else Gmail will refuse the connection.

I fumbled around with the --send-mail settings of Duplicati for a couple of hours, pulling my hairs, before I remembered that I needed to do that.

---

<div class="post-metadata">

### Author: ![sjl1986](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@sjl1986](https://forum.duplicati.com/u/sjl1986)
#### Post date: [December 20, 2018, 8:59am UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/20 "2018-12-20T08:59:47Z")

</div>

Can anyone help with the subjectregex to match this subject?

**%PARSEDRESULT%: Duplicati %OPERATIONNAME% report for**

Is a colon or dash acceptable after the %PARSEDRESULT%?

I like having the result as the first word to make it easy to see when the email comes in. I understand I won’t look at the individual emails as much once this is working.

I’m not great with code, so don’t fully understand the expressions. Thanks for any assistance in advance!

I was able to finally get it to match **%PARSEDRESULT%, Duplicati %OPERATIONNAME% report for** (with a comma rather than a colon after %PARSEDRESULT%) using **^([\w]\*, |)Duplicati Backup report for**. I’d prefer a colon or dash, but this will work if there’s not a way.

---

<div class="post-metadata">

### Author: ![JonMikelV](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@JonMikelV](https://forum.duplicati.com/u/JonMikelV)
#### Post date: [December 20, 2018, 2:05pm UTC](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869/21 "2018-12-20T14:05:12Z")

</div>

Where are you using this regex - in your email program to filter messages?

[Next page](https://forum.duplicati.com/t/how-to-configure-automatic-email-notifications-via-gmail-for-every-backup-job/869.md?page=2)
