Code Monkey home page Code Monkey logo

go-mail-admin's People

Contributors

fnetx avatar introverziert avatar kekskurse avatar thevaan avatar thomasleister avatar tobenderzephyr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-mail-admin's Issues

valid spf entry declared as invalid

v=spf1 a:mail.hostname.org mx -all
record == "v=spf1 a:"+d.hostname+" ?all"
perhaps chaging the line into
strings.Contains(record,"a:"+d.hostname)
would be more generic

Allow configuration of IP, eg. localhost

Hi!

Nice work! However, I need to run this behind a proxy which already does ssl and auth and I can't see a way to get go-mail-admin to listen to localhost?

Am I missing something?

Cannot set or create anything in GUI

Hi,

I cannot create anything (users, aliases, domains) in teheweb-gui. Pressing the save-button just does nothing. I can view all existing users, etc. so the connection to the database seems to be ok. In the system-log-files no error messages are created.
Is there some way to see what is happening?

I tried Chrome and Firefox as browsers.

I installed go-mail-admin via .deb-file on a new debian buster system after following Thomas Leisters guide.

thanx
Juergen

empty dashboard

Hi,

i installed the .deb package, added a user with full access to the database, configured the env file but have an empty dashboard.

/var/log/mysql/error.log says:

Aborted connection 23961 to db: 'vmail' user: 'gomail' host: 'localhost' (Got an error reading communication packets).

Quota is not saved for new account

When creating a new account the quota is not stored in database.

I inserted a quota of 5120, after saving the account has a quota of 0. Setting the quota again on account edit page stores quota to database correctly.

Auto advance to next mail input on "@" keystroke or paste

Hey,

I tried to implement the following functionality to alias and account editing, but since I'm not very familiar with VueJS I had troubles selecting the correct next input fields. I ended up with some tiny fixes in PR #15

What I wanted to build:
When editing or creating an alias or new account it is necessary to manually select the next input fields for 'user' @ 'domain'. I wanted to have the app autoselect the next input field when the '@' key is pressed, so I can simply type 'user@domain' and have it filled in the correct fields.
In addition, I wanted to detect occurrences of '@' when pasting so someone could simply paste in a mail address and have the app fill the data in the correct fields.

I'd love to see this functionality implemented or implement it by myself with some help.

I tried something like
v-on:keyup.keyq="$event.target.nextElementSibling.focus()"
but since you use the DOM of the browser doesn't find the correct next input. I assume that manually walking up and down the DOM tree is a very dirty approach, so I decided to better ask you on how to implement this.

Thank you very much!

[feature] form-based login/logout

Hello, love the tool - fantastic work!

I have just one request, due to the sensitive information this tool can expose, would it be possible to implement a form-based login/logout system? I think it would help quite a bit for general security.

Thanks so much!

help wanted: SSHA512

I installed with docu from Thomas Leister, using SHA512. After install go-mail-admin I changed in /etc/dovecot/dovecot-sql.conf default_pass_scheme = SHA512 to SSHA512.

But this not work.
In Log: dovecot[47560]: imap-login: Disconnected (auth failed, 3 attempts in 14 secs):

Dovecot Version 2.3.13
Debian 11

Going back to SHA512 all is fine. What is the matter, what is my mistake, what can I do?
Thanks!

Unix socket support for redis

Would it be possible to support unix sockets for redis?

As far as I can see, in redis.go in line 24 at the redis.Dial("tcp", ...) could you please provide the option to redis.Dial("unix", getConfigVariableWithDefault("REDIS_SOCKET", "/var/run/redis.sock"))?

Or maybe instead of the parameters GOMAILADMIN_REDIS_SERVER and GOMAILADMIN_REDIS_PORT you could make GOMAILADMIN_REDIS_NETWORK (with default "tcp") and GOMAILADMIN_REDIS_ADDRESS (with default "localhost:6379")?

Then line 24 would look like: redis.Dial(getConfigVariableWithDefault("REDIS_NETWORK ", "tcp"), getConfigVariableWithDefault("REDIS_ADDRESS", "localhost:6379"))

So anyone who wants to use unix socket for redis could:
GOMAILADMIN_REDIS_NETWORK=unix
GOMAILADMIN_REDIS_ADDRESS=/path/to/socket

Feature Request: Login as user

In some cases the user wants to manage his own email account with restricted rights. Based on #38 it might be able to be integrated similar to #32. This way go-mail-admin gains similar features in that regard as postfixadmin has.

Login with some kind of session store

Change the login method from HTTP-Basic Auth to an Login with some kind of session store. Based on Ticket #4

Add a url /api/v1/login where the username and password with returns a session token. That token need to send to each api requests as header information. The Username is an email address, the password is used from the account table. The Admin E-Mail is a setting in the enviroment.

In the config the basic auth can be disabled or enabled. The sames is true for the user credential login. If both methods are enabled only one of them is necessary to perform the action. If non of them is enabled all calls will be executed.

Maybe a new middelware has to be written. For the session store a inmemory solution sould work, as long as there is just one mailserver the admin interface is used there should be just one instance of go-mail-admin is running.

alias creation page typo

Hi!
on the alias creation page there are two rows with "Source Username".
Maybe the lower one should read "Destination Username"?

regards
Juergen

Feature Request: Create Alias for a group of people

It would be great to have the option to create an alias for a group of people. For now you have to create per user the same alias:

Alias per user

Alias per group (internally still per user)

SSHA512

I installed with docu from Thomas Leister, using SHA512. After install go-mail-admin I changed in /etc/dovecot/dovecot-sql.conf default_pass_scheme = SHA512 to SSHA512.

But this not work.
In Log: dovecot[47560]: imap-login: Disconnected (auth failed, 3 attempts in 14 secs):

Dovecot Version 2.3.13
Debian 11

Going back to SHA512 all is fine. What is the matter, what is my mistake, what can I do?
Thanks!

v.0.2.3 does not start - FTL Fail init redis pool error

I ran go-mail-admin v.0.1.4 on my docker host sucessfully and tried to update to the current version by adapting the changes to my Dockerfile.
Yet i was surprised, it just fails because it isn't using the configuration:

/ # env
GOMAILADMIN_AUTH_Username_Password=
HOSTNAME=b3217a4e25de
SHLVL=1
HOME=/root
GOMAILADMIN_AUTH_HTTPBasic_Password=
GOMAILADMIN_APISECRET=
GOMAILADMIN_ADDRESS=
GOMAILADMIN_CHECK_DNS_RECORDS=
TERM=xterm
GOMAILADMIN_PORT=
GOMAILADMIN_AUTH_Username_Username=
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
GOMAILADMIN_DB=<redacted>
GOMAILADMIN_APIKEY=
GOMAILADMIN_SHOW_DNS_RECORDS=
GOMAILADMIN_DKIM_SELECTOR=
GOMAILADMIN_AUTH_HTTPBasic_Username=
GOMAILADMIN_CATCHALL=
GOMAILADMIN_DKIM_VALUE=
PWD=/
REDIS_NETWORK=
GOMAILADMIN_AUTH_METHOD=
REDIS_ADDRESS=redis

The error manually booting up is as follows:

/ # ./startup.sh
6:28PM DBG Start Go Mail Admin
6:28PM DBG Try to connect to Database
6:28PM DBG Ping Database
6:28PM DBG Connection to Database ok
6:28PM DBG Setup API-Routen
6:28PM FTL Fail init redis pool error="dial tcp 127.0.0.1:6379: connect: connection refused"

It seems, the environmental variable REDIS_ADDRESS is not used, instead it falls back to the default.

Missing dependencies in compilation guide

Hey,

I'm neither a node pro nor experienced with go dependencies, so I had some trouble when trying to build your project. After solving some issues with outdated node and npm versions, I apparently had to satisfy these two additional dependencies which are not mentioned in the building steps.

npm install --save chart.js
go get github.com/99designs/basicauth-go

Please check and consider mentioning them if they are really necessary for building go-mail-admin as it might save someone's nerves ๐Ÿ˜‰
Thank you.

Support catch-all accounts

Currently, creating a catch-all account as of the tutorial of thomas leister (setting the source_username to MySQL-NULL) is unsupported.

There is apparently no way to do so in the web config and doing it manually causes go-mail-admin to exit on table retrieval with:

sql: Scan error on column index 1, name "source_username": converting NULL to string is unsupported

and exit code 1.

Please

  • handle those errors gracefully without exiting the application with failure
  • support catch-all aliases.

I will have a look at it, but I'd be very glad about support. But I do understand if this issue is not urgent for you as you apparently don't need catch-all aliases ...

Thank you very much.

Additional table fields

I'm not sure if this is to be considered a bug or if I'm just using Go-Mail-Admin in a way it is not intended:

  1. I have set up my mailserver following the linked guide by Thomas Leister. Go-Mail-Admin worked fine.
  2. However, after adding two additional fields (1 TINYINT and 1 VARCHAR; without modifying the existing fields) to the tables aliases and accounts, Go-Mail-Admin crashes as soon as I point my browser to the web fronted. The Interface is loaded and the Number of domains is displayed correctly, but then it seems to crash as soon as an API call is made to determine the number of aliases. The error message is FTL Error Scan query result error="sql: expected 9 destination arguments in Scan, not 7".

I assume this can easily be fixed to allow additional table fields, but knowing little to nothing about Go, I wasn't able to find the corresponding lines of code right away.

Proper error handling

While testing #21 I noticed again that error handling of this app is pretty poor. For example, the app doesn't check if it can bind to the port and simply exits without any helpful error message. Even worse, it seems to simply end without saying anything (I didn't check if it even quits with error code zero in linux ...).

So I'd love to see some work on catching errors without crashing (like in #5) and maybe telling the user (administrator) exactly what's wrong.

I can't assign myself currently, but I'll also have a look at this.

Add subfolder support (feature request)

Hi,

I'm using Go Mail Admin with a nginx reverse proxy. I don't want create a subdomain, instead I want to use a subfolder-style for the Web GUI so I configured the proxy like this:

location /subfolder/ {
    proxy_pass http://localhost:3001/;
    proxy_set_header Host $host/subfolder;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

The website loads, but I cant reach the API, because it doesn't use Host from header but calling directly /api and this kills the subfolder. Would it be possible to add an optional environment variable like GOMAILADMIN_HOST: / (default) what can be configured to GOMAILADMIN_HOST: /subfolder and the var is added to the api url?

Best regards

Auth return JWT

Change the auth method to return a JWT instead of create a token and save it in the redis.

Later maybe disable http basic auth and all other ways to make auth simpler.

Needed for #32 and new gui.

OpenAPI Documentation

Move the API Documentation from the Readme.md and insomnia to a openapi dokumentation.

Authentication-method from .env-file is ignored

When i start the service, it says "Run without Basic auth, make sure to protect the API at another layer". In the .env-file, the auth-variable "GOMAILADMIN_AUTH_METHOD=Username". Changing the file permissions to 777 has no effect, when restarting the service. If i set the environment via export in the shell, it also has no effect. Where can i get a log of the starting process, to see why it is ignoring the settings from .env?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.