louis-lau / duckyapi Goto Github PK
View Code? Open in Web Editor NEWDomain admin API on top of the WildDuck API. Back-end for DuckyPanel.
Home Page: https://louis-lau.github.io/DuckyAPI
License: GNU Affero General Public License v3.0
Domain admin API on top of the WildDuck API. Back-end for DuckyPanel.
Home Page: https://louis-lau.github.io/DuckyAPI
License: GNU Affero General Public License v3.0
Hello, thanks for developing DuckyAPI !
I'm new developer in duckyAPI, when i follow the instruction in readme.md, I found some error after doing "npm install". so I can't continue to the next step such as "npm run build", and "npm run start".
In my analysis, I can't run command "npm run start" because there is no directory named '/dist' and file 'main.js' insinde it.
I need your help to continue my project, Thanks in advance
Hello,
I setup DuckyAPI on different server, and try to query to wildduck server, but i got forbidden server respond when trying to get domain list, here is detail:
{
"statusCode": 403,
"error": "PermissionForbiddenError",
"message": "You do not have the permission to access this resource."
}
How could i solve it?
Thanks a lot.
I can't seem to open the "Domains" page anymore. I keep getting an error:
Backend service not reachable
The HTTP request gets a 500 error. All the other pages work fine though.
Hi,
Before installing the panel, I had created some accounts directly with wildduck-webmail
After installing the panel, I've added my domain.
New users are created just fine
However, I cannot see the accounts created before installing DuckyPanel & DuckyAPI
Is there any way to see them?
Hello!
In the request response for creating a new normal user says:
{ "statusCode": 400, "message": [ { "property": "packageId", "children": [], "constraints": { "isMongoId": "packageId must be a mongodb id" } } ], "error": "ValidationError" }
I have to specify the new ID?
I am unable to install on an existing WildDuck instance using Ubuntu 20.04.
Please see error message
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @nestjs/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/rxjs
npm ERR! rxjs@"^6.6.2" from the root project
npm ERR! rxjs@"6.6.3" from @angular-devkit/[email protected]
npm ERR! node_modules/@angular-devkit/core
npm ERR! @angular-devkit/core@"11.2.6" from @angular-devkit/[email protected]
npm ERR! node_modules/@angular-devkit/schematics
npm ERR! @angular-devkit/schematics@"11.2.6" from @angular-devkit/[email protected]
npm ERR! node_modules/@angular-devkit/schematics-cli
npm ERR! @angular-devkit/schematics-cli@"0.1102.6" from @nestjs/[email protected]
npm ERR! node_modules/@nestjs/cli
npm ERR! 2 more (@nestjs/cli, @schematics/schematics)
npm ERR! @angular-devkit/core@"11.2.6" from @angular-devkit/[email protected]
npm ERR! node_modules/@angular-devkit/schematics-cli
npm ERR! @angular-devkit/schematics-cli@"0.1102.6" from @nestjs/[email protected]
npm ERR! node_modules/@nestjs/cli
npm ERR! dev @nestjs/cli@"^7.4.1" from the root project
npm ERR! 2 more (@nestjs/cli, @schematics/schematics)
npm ERR! 5 more (@angular-devkit/schematics, @angular-devkit/core, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer rxjs@"^7.1.0" from @nestjs/[email protected]
npm ERR! node_modules/@nestjs/common
npm ERR! @nestjs/common@"^9.4.2" from the root project
npm ERR! peer @nestjs/common@"^6.10.11 || ^7.0.0 || ^8.0.0 || ^9.0.0" from @nestjs/[email protected]
npm ERR! node_modules/@nestjs/bull
npm ERR! @nestjs/bull@"^0.6.3" from the root project
npm ERR! 11 more (@nestjs/bull-shared, @nestjs/core, @nestjs/jwt, ...)
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/rxjs
npm ERR! peer rxjs@"^7.1.0" from @nestjs/[email protected]
npm ERR! node_modules/@nestjs/common
npm ERR! @nestjs/common@"^9.4.2" from the root project
npm ERR! peer @nestjs/common@"^6.10.11 || ^7.0.0 || ^8.0.0 || ^9.0.0" from @nestjs/[email protected]
npm ERR! node_modules/@nestjs/bull
npm ERR! @nestjs/bull@"^0.6.3" from the root project
npm ERR! 11 more (@nestjs/bull-shared, @nestjs/core, @nestjs/jwt, ...)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /root/.npm/_logs/2023-05-24T10_28_55_687Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-05-24T10_28_55_687Z-debug-0.log
root@mail:~/DuckyAPI#
Hi,
I followed steps here to install DuckyApi:
https://github.com/louis-lau/DuckyAPI/blob/master/README.md#integrated-duckypanel
This is my error output:
"
[
{
"property": "TOKEN_SECRET",
"children": [],
"constraints": {
"notContains": "Set TOKEN_SECRET to something safe and random!"
}
},
{
"property": "REDIS_URL",
"children": [],
"constraints": {
"isString": "REDIS_URL must be a string",
"isNotEmpty": "REDIS_URL should not be empty"
}
}
]
"
Is there anyway i can disable redis completely
Happy coding :)
Hi,
in my production.env , I've set DEFAULT_DKIM_SELECTOR to dec2020 (this is the selector the install script gave me)
but in the Panel, it still looks for ducky and therefore tells me there's no dkim record
I'm using the panel integrated with DuckyAPI
Please is there a guide I can follow to use Ducky API with a Docker based WildDuck installation?
Thank you.
Hello, I already run the duckyAPI and DuckyPanel in production, but I have a trouble when login using token that I get from generate admin apikey.
when I login using curl or swagger, always preview message below.
{
"statusCode": 401,
"message": "Your access token has an invalid format",
"error": "UnauthorizedError"
}
what is the correct format for login to the DuckyAPI ?
Hi,
My SPF record is the one suggested by the install script:
v=spf1 a:mail.mydomain.com a:mydomain.com ip4:aaa.bbb.ccc.ddd ~all
The DNS Check tells me it's not valid and I need a valid one to receive emails
I can receive emails just fine though
Is it OK to dismiss this warning?
Ducky is setting default quotas, I don't want any of these. Just want them to be unlimited.
Heyho.
I was looking at WildDuck and of course it refers to this project for the administration backend and it's pretty cool looking, even if it isn't totally "ready for business". I was wondering, is this project going to be brought up to speed in terms of Nestjs? Or, is it more or less "fork and go for it on your own" right now?
Thanks for the work put into it at any rate. Looks promising for us!
Scott
I'm trying to create a new admin user just the way the example states in the README, but I get this error:
node dist/cli create-admin skerit
โ Failed creating admin user with username: "skerit" and password: "[object Object]":
InternalServerErrorException: Unknown error
at UsersService.<anonymous> (/opt/duckyapi/dist/cli.js:604:35)
at Generator.throw (<anonymous>)
at rejected (/opt/duckyapi/dist/cli.js:395:65)
at processTicksAndRejections (internal/process/task_queues.js:97:5) {
response: {
statusCode: 500,
message: 'Unknown error',
error: 'Internal Server Error'
},
status: 500
}
MONGODB_URL='mongodb://<username>:<password>@mongo-primary.service.consul:27017,mongo-secondary.service.consul:27017/ducky-api?tls=true&tlsCertificateKeyFile=/secrets/certs/bundle.pem&tlsCAFile=/secrets/certs/CA.pem'
Other software from wildduck stack connects just fine with similar mongodb url
MongoError: database names cannot contain the character '.'
at Function.create (/usr/local/ducky-api/node_modules/mongodb/lib/core/error.js:57:12)
at validateDatabaseName (/usr/local/ducky-api/node_modules/mongodb/lib/operations/db_ops.js:344:24)
at new Db (/usr/local/ducky-api/node_modules/mongodb/lib/db.js:190:3)
at MongoClient.db (/usr/local/ducky-api/node_modules/mongodb/lib/mongo_client.js:318:14)
at MigrationExecutor.<anonymous> (/usr/local/ducky-api/node_modules/typeorm/migration/MigrationExecutor.js:470:34)
at step (/usr/local/ducky-api/node_modules/typeorm/node_modules/tslib/tslib.js:141:27)
at Object.next (/usr/local/ducky-api/node_modules/typeorm/node_modules/tslib/tslib.js:122:57)
at /usr/local/ducky-api/node_modules/typeorm/node_modules/tslib/tslib.js:115:75
at new Promise (<anonymous>)
at Object.__awaiter (/usr/local/ducky-api/node_modules/typeorm/node_modules/tslib/tslib.js:111:16)```
When using ACL (username:password
) auth or legacy auth (just password
, username is implied as default
) there are errors in the log:
stdout:
[Nest] 1 - 01/16/2022, 4:26:03 PM [SuspensionProcessor] Error for job undefined (Error): undefined +2002ms
[Nest] 1 - 01/16/2022, 4:26:03 PM [DeleteForDomainProcessor] Error for job undefined (Error): undefined +1ms
[Nest] 1 - 01/16/2022, 4:26:05 PM [SuspensionProcessor] Error for job undefined (Error): undefined +2003ms
[Nest] 1 - 01/16/2022, 4:26:05 PM [DeleteForDomainProcessor] Error for job undefined (Error): undefined +1ms
stderr:
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 9)
(node:1) UnhandledPromiseRejectionWarning: Error: getaddrinfo ENOTFOUND ducky
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26)
Seems that it tries to resolve ducky
which is a name of a user in redis. When using legacy auth (<password>@redis:6379/10
) it will try to resolve the password.
REDIS_URL=redis://<username>:<password>@master.redis-mail.service.consul:6379/10
Hi!
I've installed DuckyAPI
Put it on port 3001 since wildduck-webmail already uses this port
SERVE_DUCKYPANEL is set to true and BASE_URL to /api
Created a /var/log/DuckyAPI so I could start DuckyAPI like this
nohup npm start > /var/log/DuckyAPI/DuckyAPI.log 2> /var/log/DuckyAPI/DuckyAPI.error.log &
Maybe there's a smarter way to do this, I'll look into this later
I'll also need to ensure DuckyAPI is up after server restart
For now, no problem in create the admin user & the first user
But then when browsing to localhost:3001, FF says it cannot connect
It's weird as "telnet localhost 3001" does respond but nothing happens when I do a "GET /"
"GET /api" kicks me out immediately so I know that DuckyAPI is there
But it seems DuckyPanel is not there
Other weird thing: when I "netstat -nlp", I can see the node listening on IPV6 on :::3001 but I can't see anything listening on IPV4 on port 3001
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.