Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
 
Go Back   Zimbra - Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra - Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-25-2007, 08:29 AM
Loyal Member
 
Posts: 88
Default [SOLVED] How to use zmmailbox to "show original"

Is there a way to view the raw ("show original") source of an email from the command line?

I've tried using the getMessage subcommand of zmmailbox, but that doesn't show all the headers.

Thanks,

Iain.
Reply With Quote
  #2 (permalink)  
Old 08-24-2007, 05:30 AM
Loyal Member
 
Posts: 88
Default

As a partial answer, using the -v flag with getMessage (or gm) shows some of the header information. It misses out routing information. However, the command zmmsgtrace gives that information.

So for example

Code:
zmmailbox
mbox> aa admin@myserver.com password
mbox> sm user@myserver.com
mbox> gaf
mbox> gf Inbox
mbox> s in:Inbox
mbox> gm -v 1274
mbox> quit

zmmsgtrace -s user@hotmail.com -r user@myserver.com
Having said that, I'm still trying to figure out how the message IDs work: when referencing a message by ID, it sometimes says it isn't there with one zmmailbox subcommand whilst appearing to show up with another.
Reply With Quote
  #3 (permalink)  
Old 08-26-2007, 07:29 PM
Zimbra Employee
 
Posts: 1,434
Default Get it via REST

Try something like "zmmailbox gru ?id=<your-msg-id>"
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #4 (permalink)  
Old 09-02-2007, 02:57 PM
Loyal Member
 
Posts: 88
Default

Thanks, that did the trick.

Having logged onto zmmailbox as admin and opened the mailbox to check, it seems to be a three-step process:

1. Find the conversation
e.g.
s "in:Inbox zimbra"

2. From the conversation, find the message
gc <conversation id>

3. View the message raw text
gru ?id=<message id>

Last edited by iain : 09-02-2007 at 03:07 PM.
Reply With Quote
  #5 (permalink)  
Old 09-03-2007, 09:05 AM
Zimbra Employee
 
Posts: 1,434
Default -t message

To collapse steps 1 and 2, you can use the -t message option to zmmailbox search to search for messages instead of conversations.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #6 (permalink)  
Old 09-03-2007, 09:19 AM
Loyal Member
 
Posts: 88
Default

Good tip - thanks.

s -t message in:Inbox

does the trick nicely.
Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0