# Using Dovecot for IMAP

{% hint style="info" %}
Docs are in progress and will be completed soon, this is here in case it's useful to anyone in the meantime.
{% endhint %}

Create a user for Dovecot IMAP:

```
adduser imapguy 
```

In this case, I see the new imapguy user has UID/GID of 1000 in the /etc/passwd file.&#x20;

Add these two lines at the bottom of velocity-install/conf/mta.conf, matching the UID/GID of the imapguy user:

```
Mail Directory UID: 1000
Mail Directory GID: 1000
```

Change the ownership of the mail directory to our Dovecot user.

```
chown -R imapguy.imapguy /root/velocity-install/mail
```

Restart Velocity MTA:&#x20;

```
./restart.sh
```

Future incoming messages will be created with the new UID/GID and readable by Dovecot.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emaildelivery.com/docs/velocity-mta-solutions/using-dovecot-for-imap.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
