How to read an unsent or blocked email from the Mobility Suite Server.
search cancel

How to read an unsent or blocked email from the Mobility Suite Server.

book

Article ID: 178531

calendar_today

Updated On:

Products

Mobility Suite

Issue/Introduction

 

Resolution

Open a Terminal window on the Mobility Suite Server and input the following commands:

 

1. Type mailq

"Example output"

1A2B3C4D5E     31337 Thu Dec 25 13:37:01  [email protected]
          (connect to tenant.domain.net[133.7.13.37]:25: Connection refused)
                                         [email protected]
 

2. Copy the message ID (Which is a 10 digit hexidecimal code like '1A2B3C4D5E'.) of the email to be viewed to the server's clipboard.

 

3. Type postcat -vq 1A2B3C4D5E (Paste the message ID in the clipboard in place of the '1A2B3C4D5E' entry.)

"Example output"

postcat: dict_eval: const  mail

postcat: dict_eval: const  ipv4

*** ENVELOPE RECORDS deferred/E/1A2B3C4D5E ***

message_size:            1337             133               7               3            1337

message_arrival_time: Thu Dec 25 13:37:10 1337

create_time: Thu Dec 25 13:37:01 1337

named_attribute: log_message_origin=local

named_attribute: trace_flags=0

sender: 

original_recipient: [email protected]

recipient: [email protected]

*** MESSAGE CONTENTS deferred/E/1A2B3C4D5E ***

regular_text: Received: by tenant.domain.net (Postfix)

regular_text: id 1A2B3C4D5E; Thu, 25 Dec 1337 13:37:01 -1337 (LOL)

regular_text: Date: Thu, 25 Dec 1337 13:37:01 -1337 (LOL)

 

4. Scroll through the Terminal output which displays the full unformatted email message to find the desired portion of text below the 'MESSAGE CONTENTS' line.

"Example output"

*** MESSAGE CONTENTS deferred/E/1A2B3C4D5E ***

regular_text: Subject: MDM Compliance: Device Test iPad could not be checked.

regular_text: From: [email protected]

regular_text: To: Example User <[email protected]>

regular_text: Date: Thu, 25 Dec 1337 13:37:01 -1337

regular_text: Message-ID: <[email protected]>

regular_text: X-Nukona-Host: tenant

 

*Note* - In order to send the output of the 'mailq' or 'postcat -vq 1A2B3C4D5E' commands to a text document, the following alternatives could be used for steps 1 and 3:

mailq > mailqoutput.txt

postcat -vq 1A2B3C4D5E > 1A2B3C4D5Eoutput.txt

 

These commands will create the files 'mailoutput.txt' and '1A2B3C4D5Eoutput.txt' in the directory that the Terminal displays next to the username@tenant entry before the '#' symbol.

 

The emails can also be deleted by using the below commands:

(Remove all emails)

# postsuper -d ALL

(Remove a specific email)

# postsuper -d mailID

Example:

# postsuper -d 1A2B3C4D5E