The postfix server puts sometimes mails in corrupt queue. These mails are never checked because there is an error in the file (I see "bad record type: 43 in message content"). In the documentation, I can see "Unreadable or damaged queue files are moved here for inspection".
OK. I can read them with postcat, but after that, what should I do ? Can I remove them without error ? What should I do to put them back in send queue ? I found somewhere to move the files to maildrop but nothing happens.
Thanks !
Dom
It's quite a strange behaviour, I've never seen postfix doing that, ever, you either have a very old postfix, or you must have some sort of hardware problem somewhere, like memory corruption or hard drive corruption.
To put back your email into the queue, the easiest way would be to do so with
postcat
and a bit ofawk
, something like (but YMMV) :I wound up with corrupted messages after manually editing errant messages with vim. To fix this I had to edit the files using a hex editor okteta. Briefly, the first line of the message contains 5 ascii values. The first and last values are the message length, the second value is the envelope length. Not sure about the other values.
Each record is preceded by a 1-byte record type, and a 1-byte record length. Both of these values are binary and need to be changed as necessary with a hex editor.
You can use various options on postcat to detect if there are any errors.
To resend the message, I had to add "HELO myfqdn\n" immediately prior to the "MAIL FROM:"
Can you provide a postfix version number? Which distribution is this?
(Still most likely this indicates a hardware problem.)
EDIT: then its filesystem corruption and/or memory problem. Try to run memtest.