Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I used mailq command and I got a line like for example:

A705238B4C   603953 Wed May 23 11:09:58  apache@myserver.com

So, now I'm wondering is there a way where I can "read" an actual content of the mail by it's id A705238B4C

share|improve this question

1 Answer 1

up vote 12 down vote accepted

The best way is to make use of the postcat command.

postcat -q A705238B4C

At least the system I can look at right now, /var/spool/postfix is the master directory. Subdirectories of that which matter include active, deferred, bounce, etc. Queued files may be stored using the full file name (A705238B4C) or with some level of hashing depth (A/7/05238B4C).

share|improve this answer
    
If you do dig down into these directories rather than using postcat, the files are part binary but mostly text so strings or hexdump are the best utilities for reading them depending on which bits you want to see. –  Ladadadada May 23 '12 at 22:21
    
postfix queue files are RFC822 messages. There is no binary data other than in the queue headers used internally by postfix (nexthop data, queue delay etc.) –  adaptr May 24 '12 at 9:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.