# Error starting setup-bot in mailadm

**URL:** <https://forum.delta.chat/t/error-starting-setup-bot-in-mailadm/2995>\
**Category:** Bots\
**Created:** [March 25, 2024, 8:49pm UTC](https://forum.delta.chat/t/error-starting-setup-bot-in-mailadm/2995 "2024-03-25T20:49:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarlosEVC63](https://forum.delta.chat/user_avatar/forum.delta.chat/carlosevc63/32/2092_2.png) [@CarlosEVC63](https://forum.delta.chat/u/CarlosEVC63)\
**Post date:** [March 25, 2024, 8:49pm UTC](https://forum.delta.chat/t/error-starting-setup-bot-in-mailadm/2995/1 "2024-03-25T20:49:21Z")

</div>

Hi Guys,

I have installed mailadm next to Mailcow (the mailserver works perfectly).  
I have tried mailadm cli commands and “mailadm init” runs. However, when it comes to “mailadm setup-bot” it gives the error below. Other commands work as well. I have been strugling trying to find out what is this message about, but I have not much clue.  
I would like to ask your help to overpass it, please.

Traceback (most recent call last):  
–email and --password not specified, creating account automatically…  
File “/usr/bin/mailadm”, line 8, in   
sys.exit(mailadm\_main())  
^^^^^^^^^^^^^^  
File “/usr/lib/python3.11/site-packages/click/core.py”, line 1157, in **call**  
return self.main(\*args, \*\*kwargs)  
^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3.11/site-packages/click/core.py”, line 1078, in main  
rv = self.invoke(ctx)  
^^^^^^^^^^^^^^^^  
File “/usr/lib/python3.11/site-packages/click/core.py”, line 1688, in invoke  
return \_process\_result(sub\_ctx.command.invoke(sub\_ctx))  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3.11/site-packages/click/core.py”, line 1434, in invoke  
return ctx.invoke(self.callback, \*\*ctx.params)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3.11/site-packages/click/core.py”, line 783, in invoke  
return \_\_callback(\*args, \*\*kwargs)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3.11/site-packages/click/decorators.py”, line 33, in new\_func  
return f(get\_current\_context(), \*args, \*\*kwargs)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3.11/site-packages/mailadm/cmdline.py”, line 126, in setup\_bot  
email, password = create\_bot\_account(ctx, email, password=password)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3.11/site-packages/mailadm/cmdline.py”, line 75, in create\_bot\_account  
mc.add\_user\_mailcow(email, password, “bot”)  
File “/usr/lib/python3.11/site-packages/mailadm/mailcow.py”, line 42, in add\_user\_mailcow  
raise MailcowError(result.json())  
mailadm.mailcow.MailcowError: {‘type’: ‘error’, ‘msg’: ‘api access denied for ip 172.22.1.1’}

---

<div class="post-metadata">

**Author:** ![missytake](https://forum.delta.chat/user_avatar/forum.delta.chat/missytake/32/591_2.png) [@missytake](https://forum.delta.chat/u/missytake)\
**Post date:** [March 25, 2024, 11:55pm UTC](https://forum.delta.chat/t/error-starting-setup-bot-in-mailadm/2995/2 "2024-03-25T23:55:26Z")

</div>

You have to allow API access for the internal IP of mailadm, in this case `127.22.1.1`.

You can add it in the web interface where you enabled the API:

![image](https://support.delta.chat/uploads/default/original/2X/8/879ee18687937cf4b212b11f17569921e4d839a8.png)

You can also _skip_ the IP check for the API if that specific IP doesn’t work.

It is described here: [How to Setup a Mail Server for Delta Chat - Delta Chat](https://delta.chat/en/serverguide#getting-an-api-token-from-the-web-interface)

---

<div class="post-metadata">

**Author:** ![CarlosEVC63](https://forum.delta.chat/user_avatar/forum.delta.chat/carlosevc63/32/2092_2.png) [@CarlosEVC63](https://forum.delta.chat/u/CarlosEVC63)\
**Post date:** [March 26, 2024, 3:31pm UTC](https://forum.delta.chat/t/error-starting-setup-bot-in-mailadm/2995/3 "2024-03-26T15:31:06Z")

</div>

Thank you very much!  
This works! 🙂

---

<div class="post-metadata">

**Author:** ![r10s](https://forum.delta.chat/user_avatar/forum.delta.chat/r10s/32/1513_2.png) [@r10s](https://forum.delta.chat/u/r10s)\
**Post date:** [October 6, 2026, 3:14pm UTC](https://forum.delta.chat/t/error-starting-setup-bot-in-mailadm/2995/4 "2026-10-06T15:14:52Z")

</div>


