New Question
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Download >>


What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more


Top Tags

View all Tags

Can I analyze multipart emails using the PRTG IMAP sensor?



Your Vote:



With the IMAP sensor I can check the content of emails for certain keywords. Does this work with multipart emails, too?

email imap-sensor keyword mime-format multipart prtg

Created on Mar 4, 2015 8:06:34 AM by  Martina Wittmann [Paessler Support]

Last change on Nov 29, 2016 2:13:01 PM by  Martina Wittmann [Paessler Support]

1 Reply

Accepted Answer



Your Vote:



This article applies to PRTG Network Monitor 14 or later

Checking Content of Multipart Emails with the IMAP Sensor

The internet standard Multipurpose Internet Mail Extensions (MIME), an extension of the original Simple Mail Transfer Protocol (SMTP), allows the transmission of messages containing a multipart body.

A multipart email is recognized as one if the content type indication contains the word “multipart”. There are different types of multipart messages, for example multipart/digest, multipart/mixed, multipart/parallel, multipart/related or multipart/alternative. The different parts of a multipart message are typically delimited by long random character strings called boundaries.

A multipart/alternative email, for example, contains in its alternative parts the same information coded in different ways.

It can look like this:
(We surrounded our comments with ### to help you better find your way through this multipart email.)

Content-Type: multipart/alternative;

###Boundary Identifier of the Multipart Email###

###Alternative 1 of Boundary x-x-x-x-891c660d3750###

Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

=0D=0AUhrzeit: Today at 04:28 , Successful Offsite Copy auralisSt=
B , Copied 178,7 MB (compressed to 17,64 MB) for 4 files. (Durati=
on: 1 minute),=0D=0A=0D=0A=0D=0A

###Alternative 2 of Boundary x-x-x-x-891c660d3750###

Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

Today at 04:28: (auralisStB) Successful Offsite Copy - Copied 178=
,7 MB (compressed to 17,64 MB) for 4 files. (Duration: 1 minute)=0D=0A=

###Alternative 3 of Boundary x-x-x-x-891c660d3750###

Content-Type: multipart/related; type="text/html";


Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64



###End of Boundary x-x-x-x-891c660d3750###

Additionally, the content or text types are indicated, like text/plain, text/html or image/png.

PRTG’s IMAP sensor can scan the different parts of a multipart email for a certain keyword. You just have to add this sensor type to a device that represents your mailbox in PRTG and the sensor checks all incoming emails, also multipart messages. For example, you can define the sensor to search for “Backup succeeded” in emails from certain backup services in your network. This way, you can monitor if your backups succeeded last night.

Note: There has to be at least one part encoded quoted-printable in your multipart email so that the keyword string search can be completed successfully. If you want the IMAP sensor to look for the string “Backup succeeded” in a base64-encoded multipart, it won’t be able to find it, because it would look like this: "QmFja3VwIHN1Y2NlZWRlZA=="

Note: If your emails contain an HTML body, it can be convenient to use regular expressions when searching for keywords. See IMAP Sensors with RegEx for HTML Emails.

Created on Mar 4, 2015 8:24:33 AM by  Martina Wittmann [Paessler Support]

Last change on Mar 30, 2015 11:07:35 AM by  Gerald Schoch [Paessler Support]

Please log in or register to enter your reply.

Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.