Corrupt message

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Corrupt message

wa6vvv
I seem to have a couple corrupt messages.  Restarting postfix gives:

service postfix restart
postfix/postfix-script: stopping the Postfix mail system
postfix/postfix-script: warning: damaged message: corrupt/44t83n4KNbz2fjQV
postfix/postfix-script: warning: damaged message: corrupt/46jP9V452yz2fjRb
postfix/postfix-script: starting the Postfix mail system

I have tried postsuper -d 44t83n4KNbz2fjQV and it gives no errors, but doesn't remove the corrupt message.  I have found both of them in my cur mailbox and they are unimportant so I would like to get rid of them.  Clearly I am missing something on how to do that.  Thanks,

-- Doug

Reply | Threaded
Open this post in threaded view
|

Re: Corrupt message

Viktor Dukhovni
On Wed, Feb 12, 2020 at 07:43:59PM -0800, Doug Hardie wrote:

> I seem to have a couple corrupt messages.  Restarting postfix gives:
>
> service postfix restart
> postfix/postfix-script: stopping the Postfix mail system
> postfix/postfix-script: warning: damaged message: corrupt/44t83n4KNbz2fjQV
> postfix/postfix-script: warning: damaged message: corrupt/46jP9V452yz2fjRb
> postfix/postfix-script: starting the Postfix mail system

    1. Use "postcat" to check that the partially collected content has
       no value:

       # postcat /var/spool/postfix/corrupt/$qid

    SYNOPSIS                                                                                                                                 postsuper [-psSv] [-c config_dir] [-d queue_id]                                                                                           [-h queue_id] [-H queue_id]                                                                                                       [-r queue_id] [directory ...]
       ...

       -d queue_id
              Delete one message with the named queue ID from the named mail
              queue(s) (default: hold, incoming, active and deferred).
              ...

So postsuper(1) does not look in the "corrupt" directory, but even if
you explicitly try:

    # postsuper -d $qid corrupt

you'll get an error message, because "corrupt" is not a message queue,
it is just a directory, with detritus, that may or may not be safe to
remove.  Therefore, once you're sure you want to remove it:

    2. # /bin/rm /var/spool/postfix/corrupt/$qid

--
    Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: Corrupt message

wa6vvv
On 13 February 2020, at 03:28, Viktor Dukhovni <[hidden email]> wrote:

>
> On Wed, Feb 12, 2020 at 07:43:59PM -0800, Doug Hardie wrote:
>
>> I seem to have a couple corrupt messages.  Restarting postfix gives:
>>
>> service postfix restart
>> postfix/postfix-script: stopping the Postfix mail system
>> postfix/postfix-script: warning: damaged message: corrupt/44t83n4KNbz2fjQV
>> postfix/postfix-script: warning: damaged message: corrupt/46jP9V452yz2fjRb
>> postfix/postfix-script: starting the Postfix mail system
>
>    1. Use "postcat" to check that the partially collected content has
>       no value:
>
>       # postcat /var/spool/postfix/corrupt/$qid
>
>    SYNOPSIS                                                                                                                                 postsuper [-psSv] [-c config_dir] [-d queue_id]                                                                                           [-h queue_id] [-H queue_id]                                                                                                       [-r queue_id] [directory ...]
>       ...
>
>       -d queue_id
>              Delete one message with the named queue ID from the named mail
>              queue(s) (default: hold, incoming, active and deferred).
>              ...
>
> So postsuper(1) does not look in the "corrupt" directory, but even if
> you explicitly try:
>
>    # postsuper -d $qid corrupt
>
> you'll get an error message, because "corrupt" is not a message queue,
> it is just a directory, with detritus, that may or may not be safe to
> remove.  Therefore, once you're sure you want to remove it:
>
>    2. # /bin/rm /var/spool/postfix/corrupt/$qid
>
> --
>    Viktor.

Thanks. I finally understand it.  Interestingly enough, both of the corrupt/* files had zero length.

-- Doug

Reply | Threaded
Open this post in threaded view
|

Re: Corrupt message

Wietse Venema
Doug Hardie:
> Thanks. I finally understand it.  Interestingly enough, both of
> the corrupt/* files had zero length.

Did the files have permissions rwx? Then at some point they contained
an email message, before the file system lost the data.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Corrupt message

wa6vvv


> On Feb 13, 2020, at 16:05, Wietse Venema <[hidden email]> wrote:
>
> Doug Hardie:
>> Thanks. I finally understand it.  Interestingly enough, both of
>> the corrupt/* files had zero length.
>
> Did the files have permissions rwx? Then at some point they contained
> an email message, before the file system lost the data.
>
>    Wietse

Don’t recall. I already deleted them