Error starting setup-bot in mailadm

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’}

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

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

1 Like

Thank you very much!
This works! :slightly_smiling_face: