Can I extract content from a received email

Hi, I had a problem with SpamAssassin, and emails on servers were falling back to nobody.
Now I am trying to retrieve a specific email and I cannot find it. Is there a way to retrieve it.
The part from the maillog is this:

Sep 15 19:42:07 li1427-200 spamd[17631]: spamd: connection from localhost []:56466 to port 783, fd 5 Sep 15 19:42:07 li1427-200 spamd[17631]: spamd: handle_user (getpwnam) unable to find user: 'spamd' Sep 15 19:42:07 li1427-200 spamd[17631]: spamd: still running as root: user not specified with -u, not found, or set to root, falling back to nobody Sep 15 19:42:07 li1427-200 spamd[17631]: spamd: checking message <> for spamd:99 Sep 15 19:42:12 li1427-200 spamd[17631]: plugin: eval failed: bayes: (in learn) locker: safe_lock: cannot create tmp lockfile /.spamassassin/ for /.spamassassin/bayes.lock: No such file or directory Sep 15 19:42:12 li1427-200 spamd[17631]: spamd: clean message (-0.1/5.0) for spamd:99 in 4.1 seconds, 2855 bytes. Sep 15 19:42:12 li1427-200 spamd[17631]: spamd: result: . 0 - DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED scantime=4.1,size=2855,user=spamd,uid=99,required_score=5.0,rhost=localhost,raddr=,rport=56466,mid=<>,autolearn=unavailable autolearn_force=no Sep 15 19:42:12 li1427-200 spamd[17629]: prefork: child states: II

1 Reply

@zorland --

You're asking two different questions here:

  1. The title suggests that you have an email and you want to examine it's parts. The answer to that is an unqualified yes. There are many programs and language packs that can do this. I do this all the time (in ruby…but I know there's an equivalent perl package too).

  2. The body of your post says that you want to find a missing email after a spamassassin(1) mishap. The answer to that is maybe. First you have to figure out what you instructed your mail server to do in this case:

  • toss the message;
  • send it to a spam box; or
  • deliver it as normal.

If you told the mail server to toss the message, you are probably out of luck.

If you told it to send it to a spam box, you may have a chance. Look at the log messages right after the ones you posted to see if you can determine the final disposition of the message. You can egrep for the Message-ID to see if that filters out some of the chaff and you can narrow your focus.

The last is a variation of the 2nd thing. You may have to call the intended recipient of the message and ask if he got it. The message may have been removed from the delivery mailbox when the recipient collected his mail and reside on his client computer.

You could also contact the sender to see if it exists in his sent email box. This will depend on how the sender's email client sends mail.

Given the limited information you posted that's about all I can suggest. Good luck.

-- sw


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct