mailtrain icon indicating copy to clipboard operation
mailtrain copied to clipboard

Mailtrain v2 Beta Available - help needed with testing

Open bures opened this issue 7 years ago • 56 comments

Dear all,

it's my pleasure to announce general availability of Mailtrain v2 beta. You can find it in the development branch. The repo contains installation scripts for CentOS 7 and Ubuntu 18.04 LTS. There is also a Docker image with a docker-compose script provided. All info how to install it is in README.md.

This version should have all features of Mailtrain v1 with a bunch of new things added. Notably those are:

  • multiple users and organisational namespaces with fine-grained user permissions (the mapping of user permissions to roles is defined in config file)
  • various new features in lists (e.g. list export)
  • various new features in templates (e.g. support for MJML, management of files, isolation of template editors to prevent XSS attacks)
  • various new features in campaigns (e.g. ability to send to multiple lists with prevention of double delivery)
  • multiple send configurations
  • ability to localize the UI per user (as opposed to per installation as it was in v1)
  • changes in the architecture (await/async on server side, ReactJS-based single-page application on the client side)
  • builtin ZoneMTA, which is used as a default delivery mechanism (this requires close-to-zero configuration of the mailer)

Note however that there are several features which I didn't have a chance and possibility to test. In particular:

  • LDAP
  • delivery via AWS SES
  • delivery via Postfix
  • delivery via Sparkpost
  • delivery via Sendgrid
  • delivery via Mailgun
  • bounce handling via VERP
  • most of the API calls

I would like to ask you for help with testing these features above. If it turns out that there is no one to test the feature, I will assume that that feature is not need and will exclude it in stable release of Mailtrain v2.

If you file an issue, please mark it with v2.0 milestone.

Thanks. T.

bures avatar Dec 25 '18 19:12 bures

I got an error when installing Mailtrain with docker-compose. Here is the full log: https://pastebin.com/AYMkBNCu

hoducha avatar Dec 26 '18 05:12 hoducha

Is it possible to install manually on a single domain? I am running a Centos 7 server with Plesk. And I want to install this in a subdomain(as I have already with v1)

I see that we need 3 endpoints now though. Can I host all the endpoints in subdirectories, rather than seperate subdomains?

If that’s possible, then I’m totally in for some small delivery tests with Mailgun, as I have this all workin well for mailtrain v1.

sweetppro avatar Dec 26 '18 06:12 sweetppro

@sweetppro - How strong is this requirement (of hosting on single endpoint)?

The reason there are three endpoints is the security. If you host it on a single endpoint, then there is no protection against XSS through templates or custom subscription forms. For instance one user may insert malicious JS code to template or subscription form. The code would be executed with admin permissions once admin opens the template to view it. To prevent this, the sandbox endpoint has to be a different domain (i.e. different sub-domain or different port). Having it in a subdirectory does not help, because that does not count as a separate domain.

I could generally extend Mailtrain to allow hosting from a single domain. It can't do it now, but (fingers crossed) I believe the architecture should allow it with some tweaks. It's just that doing so would completely defy the security. Mailtrain on one endpoint would generally count as if all users were admins.

So just let me know pls, if that is a reasonable use-case. I don't have experience with Plesk, so it's difficult for me to tell if there is some way of exposing three different ports on one sub-domain or three subdomains for one nodejs app. However if that would be an option, I would prefer it to hosting it on a single endpoint.

Thanks.

bures avatar Dec 26 '18 07:12 bures

@hoducha - thanks for giving it a try. See the last line of your log: "... no space left on device"

Just give it more space. I don't recall correctly how much space I needed, but if I'm not mistaken, it was aroud 1.5GB.

bures avatar Dec 26 '18 07:12 bures

At the end it says no space left on device. Did you make sure you have enough free space? // david-------- Ursprungligt meddelande --------Ämne: Re: [Mailtrain-org/mailtrain] Mailtrain v2 Beta Available - help needed with testing (#505)Från: Ho Duc Ha Till: Mailtrain-org/mailtrain Kopia: Subscribed I got an error when installing Mailtrain with docker-compose. Here is the full log: https://pastebin.com/AYMkBNCu

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

sommarnatt avatar Dec 26 '18 07:12 sommarnatt

Oops, that's my mistake.. how could I miss that line? I've deployed Mailtrain successfully after cleaning up the Docker images. I'm exploring the Mailtrain v2 now... Thank @bures and @sommarnatt.

hoducha avatar Dec 26 '18 08:12 hoducha

@bures - Opening up seperate ports shouldn’t be an issue on a single subdomain.

I am already running a rails app on another subdomain, and nodeBB on yet another subdomain. The parent domain hosts my static pages built with Hugo, linking to all the various subdomains.

I also already have letsencrypt setup on the parent domain as a wildcard.

I could install the seperate components on they’re own subdomains, but installing manually would perhaps be the easiest for my setup as I’m no expert on Plesk. I’m not sure how it would deal with the extra subdomains not being generated via it’s interface? I’d probably need to configure Nginx/Apache/dns manually which I could probably figure out...

sweetppro avatar Dec 26 '18 08:12 sweetppro

@sweetppro - Then let's try it as different ports on the same subdomain.

I would suggest to have: trusted on 8443, sandbox on 8444 and public on 443.

I place public on 443 because some firewalls might disallow non-standard ports and with subscribers you cannot regulate from where they will access Mailtrain.

Trusted and sandbox could be on non-standard ports because there will be only you (or limited set of people) accessing them.

Do you need any help with the setup on configuring Mailtrain to use one domain with 3 different ports? If so, please open a separate issue, we can deal with that there.

Thanks.

bures avatar Dec 26 '18 08:12 bures

@bures - Sounds good, I’ll give it a try tonight and see how it goes

sweetppro avatar Dec 26 '18 09:12 sweetppro

@bures this is really great. We will definitely put it to test in coming weeks. thanks for releasing this version! its really really great to see this out.

yashsaxena avatar Dec 28 '18 18:12 yashsaxena

A small announcement - I just migrated Mailtrain v2 beta to Bootstrap 4 with CoreUI theme and the newest React. This should be hopefully the last bigger change before v2 release.

Please note that if you are upgrading an already installed Mailtrain v2 beta, you will have to reinstall modules and rebuild the client. To do so, execute the following from Mailtrain's root directory:

for idx in client shared server zone-mta; do
    (cd $idx && npm install)
done
    
(cd client && npm run build)

bures avatar Dec 31 '18 00:12 bures

First impression: it looks really good, clean and I am looking forward to the further development of mailtrain! I will write down some ideas and impression while testing everything in docker.

  • I would like one option to change the main-color and maybe add my own logo for the overall look.
  • Account / General settings: When I tried to change my login from admin:test to something else, there was no field to see the actual username, only name and email. An option to change that username would be nice additionally.
  • Dashboard: I would like to see the last sent campaigns and some results: no. of mails sent, opened, clicked, and a link to see the preview of the campaign. Maybe a list of prepared but not sent campaigns as well.
  • RSS-campaigns: I tried to delete an RSS-campaign, but instead of deleting I get: "content is not defined", the campaign is still there.
  • RSS-campaigns: I would really love the possibility to sent a weekly or daily collection of a feed in one mail, where all new articles in the feed are used to create the mailing.
  • Namespaces/Create: I would be interested to get an explanation, what a namespace is. Maybe in general it would be good to have some place, where users get more informations about the features they see, like a questionmark in the corner?
  • Global settings: Instead of tracking with Google Analytics, an option to use Matomo (Piwik) would be great, especially when you are in love with self-hosting like I am.
  • I couldn't test the API, also MJML seems not to be integrated yet, but at least I get a message on the new subdomain, when I try to create a template.

The overall impression is really good. First I was a bit afraid, that the new 3-domain-system would be a problem for my and upgrading my existing installation, but now I don't see it as a big problem anymore. Of course, a good explanation for upgrading the system from the latest release would be of good help. And now: I hoping this comments are helpful to leave beta behind and give Mailtrain a good fresh version.

saschafoerster avatar Jan 05 '19 11:01 saschafoerster

@saschafoerster Thank for the detailed suggestions. Very appreciated. Replies below

  • I would like one option to change the main-color and maybe add my own logo for the overall look.

Makes sense. I assume it is enough when this is configured in the server config and the logo is just placed in some directory, right?

  • Account / General settings: When I tried to change my login from admin:test to something else, there was no field to see the actual username, only name and email. An option to change that username would be nice additionally.

I'll check it. The option to change the username should be feasible. I don't think we need immutable usernames anywhere in the code.

  • Dashboard: I would like to see the last sent campaigns and some results: no. of mails sent, opened, clicked, and a link to see the preview of the campaign. Maybe a list of prepared but not sent campaigns as well.

Makes sense. Thanks for ideas. Could you open a separate issue on the dashboard and paste these ideas there. Let's see if anyone else has also anything to say.

  • RSS-campaigns: I tried to delete an RSS-campaign, but instead of deleting I get: "content is not defined", the campaign is still there.

I couldn't reproduce this. Could you open a separate issue and describe exactly how to reproduce the issue?

  • RSS-campaigns: I would really love the possibility to sent a weekly or daily collection of a feed in one mail, where all new articles in the feed are used to create the mailing.

Makes sense. How would you imagine it? The way I imagine it is that the RSS campaign allows you to check that it should be a "Digest RSS campaign" and then it allows you to specify the periodicity (every n-th hour, n-th day, every n-th month and starting day/time). Then there will be an merge tag the corresponds to the list of RSS items. This will require that we introduce HBS+MJML templates, so that one could create the content of the template dynamically. Anyway, having HBS+MJML templates is already in my TODO list. It's also needed in single-item RSS campaigns. If you have any more ideas, best if we move this discussion to a separate thread.

  • Namespaces/Create: I would be interested to get an explanation, what a namespace is. Maybe in general it would be good to have some place, where users get more informations about the features they see, like a questionmark in the corner?

Namespaces are about organizing entities (i.e. lists, campagins, etc.) and giving access to all entities (of a particular type) in the namespace and below. This allows you to for instance create a namespace per customer for a customer and configure the permissions in such a way that the customer cannot access entities of other customers. Or it allows you to organize entities and permissions within a larger organization where you have different groups of people/departments.

  • Global settings: Instead of tracking with Google Analytics, an option to use Matomo (Piwik) would be great, especially when you are in love with self-hosting like I am.

Nice. I didn't know about this service. I would be definitely eager to have it there. Only, it doesn't have a very high priority on my side. I could possibly implement it as the time goes, or I would be happy to accept any pull request on this.

  • I couldn't test the API, also MJML seems not to be integrated yet, but at least I get a message on the new subdomain, when I try to create a template.

Could you be more specific what you mean by "MJML seems not to be integrated yet". If there is some bug connected with MJML in templates, please create a separate issue. As far as I believe, all MJML-related stuff should be implemented in templates. The only MJML related part which is not implemented is MJML Mosaico Templates (i.e. the ability to define Mosaico Template - i.e. a template for template - in MJML). Here I have to check with @witzig , who did some work on generating Mosaico Templates with MJML.

The overall impression is really good. First I was a bit afraid, that the new 3-domain-system would be a problem for my and upgrading my existing installation, but now I don't see it as a big problem anymore. Of course, a good explanation for upgrading the system from the latest release would be of good help. And now: I hoping this comments are helpful to leave beta behind and give Mailtrain a good fresh version.

Thanks a lot. With guides and explanation how to setup things and what features it contains and how to use them, I would really appreciate some help from the community. I'm not sure I have the capacity to code it and document it at the same time. I'll be of course happy to explain certain features which might not be clear. I also like the idea with the question mark icon. I would be happy to integrate it if I receive the texts to provide there.

Thanks.

bures avatar Jan 05 '19 15:01 bures

Had a brief look on the setup directory as I'd like to update https://github.com/vaizard/mage-mailtrain/ an ansible playbook automating mailtrain deployment to support v2 as well. I notice that the development branch

  • drops the setup/sql directory. is this by intention or by mistake? when/where/how does the database scheme get installed and updated?
  • adds a mongodb dependency. again, is this intentional? both mysql and maria have a mature support for json documents stored inside sql tables, all with querying, indexing and stuff.

thanks for the clarification.

killua-eu avatar Jan 13 '19 21:01 killua-eu

@killua-eu - I move the ansible role discussion to a separate issue #518

bures avatar Jan 13 '19 22:01 bures

I would like to test this (with SparkPost) but I have some questions:

  • How do I migrate from an old installation?
  • Is there a way to enable/disable triggered emails? (I want to disable "Subscription Confirmed"-email, as it is a bit redundant to the web page that says the same thing.
  • On the topic of transactional mails: How do I change the subject line(s) of them?

julianwachholz avatar Jan 18 '19 10:01 julianwachholz

@julianwachholz

  1. The database migration should work automatically when you first run Mailtrain v2, but please backup your database before. The migration is still a bit shaky as I have only limited samples to test on. Generally, I would recommend to do pretty much a fresh install of Mailtrain v2 and run it on the old database.

  2. I'm afraid this a new feature that needs to be implemented. Generally, it means to extend the "Subscription" options in the "List edit". This should not be difficult, but it requires about half a day of work. Feel free to do it, I'll be happy to accept a PR. If doing so, I would recommend to change public_subscribe field to subscription_mode (similar to unsubscription_mode) that would offer more options. Alternatively, I'll be happy to implement it myself later. In that case, please create a separate ticket for it.

  3. The subjects for subscription/unsubscription emails are hardcoded in the code, but can be localized. How would you like to change them? Again, best to open a separate issue for it.

bures avatar Jan 20 '19 07:01 bures

Hi @bures, thank's for getting back to me.

I'd love to help out with No. 2, but it'll take some time for me to read into the code. :)

Re: Translations: I don't want the UI to be translated but I have two newsletter lists, one for English subscribers and one for e.g. German ones, so they'd want German E-Mail notifications and forms (which I could all successfully customize with the Custom Forms feature). So I think best solution for this would be to add an extra field to all forms like this?

julianwachholz avatar Jan 21 '19 15:01 julianwachholz

@julianwachholz I understand. Since the content of the email is anyway coming from custom form, it would make only sense to add something like "Title" to each custom form. If it is a web form, the title is the title of the window, if it is an email form, the title is the subject, right?

bures avatar Jan 21 '19 15:01 bures

Note however that there are several features which I didn't have a chance and possibility to test. In particular:

  • LDAP

I've been testing the LDAP and can confirm that the login itself works fine with passport-ldapauth. However, I had to create the users internally in the user management page before they could login. I suspect this is not the desired use case and users should be created on first login, as Mailtrain accepts the ldap properties newUserRole and newNamespaceId, right?

priethor avatar Feb 18 '19 10:02 priethor