# How to re-fetch emails from the mail server via IMAP?
# Symptoms

If emails have not been processed by Swarmica for any reason and it is necessary to re-process those emails that have not been added to the tickets:

# Solution

* Make a backup copy of the "broken" emails just in case:

```shell
docker exec -it --env-file .env swarmica-cron-1 bash
cp logs/failed_email/*.eml uploads/

```

* Launch a forced re-scan of the IMAP server:

```shell
docker exec -it --env-file .env swarmica-cron-1 bash
for MAIL in `ls uploads/*.eml`; do python manage.py parse_incoming_email support@domain.tld -f $MAIL; done
```

