# After upgrading from Ubuntu 18.04 to 22.04, I can no longer move mail between spam folder and inbox folder

**URL:** <https://discourse.mailinabox.email/t/after-upgrading-from-ubuntu-18-04-to-22-04-i-can-no-longer-move-mail-between-spam-folder-and-inbox-folder/10039>\
**Category:** Help with Unusual Circumstances\
**Created:** [January 22, 2023, 2:14am UTC](https://discourse.mailinabox.email/t/after-upgrading-from-ubuntu-18-04-to-22-04-i-can-no-longer-move-mail-between-spam-folder-and-inbox-folder/10039 "2023-01-22T02:14:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![firstan](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/f/ba8739/32.png) [@firstan](https://discourse.mailinabox.email/u/firstan)\
**Post date:** [January 22, 2023, 2:14am UTC](https://discourse.mailinabox.email/t/after-upgrading-from-ubuntu-18-04-to-22-04-i-can-no-longer-move-mail-between-spam-folder-and-inbox-folder/10039/1 "2023-01-22T02:14:57Z")

</div>

I can move the spam mail to any other folder. I can move mail between other folders. I just can’t move mail between “spam” and “inbox” folders.

I’m seeing the following errors:

- Thunderbird: [SERVERBUG] failed to send mail
- Roundcube: Server Error: UID MOVE: failed to send mail

I would appreciate any assistance on this (even if it’s how to diagnose what’s happening). No relevant lines pop up in `/var/log/mail.log` or `/mail/log/mail.err` when the error occurs, so I’m not sure where else to look.

---

<div class="post-metadata">

**Author:** ![firstan](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/f/ba8739/32.png) [@firstan](https://discourse.mailinabox.email/u/firstan)\
**Post date:** [January 29, 2023, 5:53am UTC](https://discourse.mailinabox.email/t/after-upgrading-from-ubuntu-18-04-to-22-04-i-can-no-longer-move-mail-between-spam-folder-and-inbox-folder/10039/2 "2023-01-29T05:53:14Z")

</div>

The issue in my case was that the `/usr/local/bin/sa-learn-pipe.sh` file was missing “group” and “other” read permissions (i.e. it only had execute permissions). This file is needed by the dovecot antispam plugin (to invoke spamassasin).

This question and answer helped me: [spam - SpamAssassin with dovecot-antispam training - Server Fault](https://serverfault.com/questions/703173/spamassassin-with-dovecot-antispam-training)

---

<div class="post-metadata">

**Author:** ![Pete](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/p/3ab097/32.png) [@Pete](https://discourse.mailinabox.email/u/Pete)\
**Post date:** [March 6, 2025, 1:53pm UTC](https://discourse.mailinabox.email/t/after-upgrading-from-ubuntu-18-04-to-22-04-i-can-no-longer-move-mail-between-spam-folder-and-inbox-folder/10039/3 "2025-03-06T13:53:44Z")

</div>

> [@firstan](#):
>
> /usr/local/bin/

I had the same issue, and solved it the same way thank you!
