ISPC + Mailman + Multi-domain = working ! (draft micro tuto??)

Discussion in 'Tips/Tricks/Mods' started by jbonlinea, Apr 7, 2019.

  1. jbonlinea

    jbonlinea Member

    Hi guys,

    I've been looking for a mailing list solution and looked at mailman, as it is natively installed and integrated with Stretch perfect server with ISPC.

    I did quite a bit of research here and have seen that quite many issue or bug report, but I think I've found my way so I'm pleased to share it !

    Let's start fresh
    Ready ? Go

    Set up DNS zone
    vpsXXXXXX.ovh.net point toward my server IP and there is nothing I can do about that but I'm fine with it

    I also have a domain, mydomain.net
    I created a record type A, named list.mydomain.net, that point toward my server's IP

    Server install
    install the stretch perfect server with ISPC (it migh work with other distribution but I can only speak for what I have tested)
    in this post we'll assume that the hostname of the server is vpsXXXXXX.ovh.net

    At this stage you should be able to visit the Mailman web ui here http://vpsXXXXXX.ovh.net/cgi-bin/mailman/admin

    Set up ISPC
    • ISPC > Client > New client : client1
    • IPSC > Site > New site :
      • name : list.mysite.net
      • client : client1
      • suexec : no
      • auto-subdomain : no
      • ssl + let's encrtpt : yes
    Note that I unabled suexec.
    Why ? http://list.mysite.net/cgi-bin/mail/admin/ returns an error 500 with suexec enable while it works when suexec is disabled.
    Why so ? I've read some bits here and there but it is yet beyond my understanding ; one might help here !

    ISPC mail and mailing-list set up
    • ISPC > Mail > New domain : list.mysite.net
    • ISPC > Mail > Mailinglist > New record :
      • client : client1
      • domain : list.mysite.net
      • listname : test-list
      • listowner : [email protected] ; but you don't have to use the same domain or subdomain, thus it could be [email protected]_to_you.xx
    At this stage, you shoud receive an email on [email protected] confirming the creation of the list test-list.
    this email should contains the links toward the admin and info page of the list :
    http://list.mydomain.net/cgi-bin/mailman/admin/test-list
    http://list.mydomain.net/cgi-bin/mailman/listinfo/test-list

    Add a user to the list test-list
    go to http://list.mydomain.net/cgi-bin/mailman/listinfo/test-list and subscribe a user
    in our exemaple the user email address is [email protected]
    You, user1, should receive an email inviting you to confirm your subscription.
    Let's look at this email more closely :
    Now, you can confirm your subscription, and send email, for testing purpose.

    Well, cool, we have a working mailing-list system, but who want to use the domain vpsXXXXXX.ovh.net ? no one right.
    The smart ass will say, well you should have named your perfect server diferently in the first place. If you had named it awesome.mydomain.net, mailman would use this domain !
    The smart ass is right, and one may even say why bother set up IPSC user, site, mail domain and mailing-list while we could create a list using this domain by simply loging in the server via ssh, runing a single comand (#newlist list-name) and answer the few question as you did step 13 of the perfect server tutorial ?

    Well, in an environent with a single domain and a single user, the smart ass may be perfectly right, but let's go multi-domain !!! Isn't it one of the key purpose of ISPC

    Going multi-domain : customizing test-list option
    Go to vps.XXXXXX.ovh.net/cgi-bin/mailman/admin/ and log in test-list admin area using your credidentials.
    now change the domain used by mailman for this list to list.mydomain.net ; initially it's empty and use its default value, namely vpsXXXXXX.ovh.net
    you have to do it here : mailman web ui > test-list > general options > Host name this list prefers for email : list.mydomain.net

    Magic, you're done !
    Have a try, subscribe a second user on your list. you'll receive an email but this times the domain used is list.mydomain.net
    have a look :
    Try, it all works !
    Using the same process as above, you can create as many list using as many domain as you want !!!

    Kwon issues - Do we have yet to be carefull ?
    Well...I have very very little hindsight as I just set this up.

    At this stage, list with custom domain works, you may send email to the list, send email comand (check mailman documentation), administer the list or change your subscription details using your custom domain.

    However it apears that
    will indeed display the list available while
    won't !
    Nevertheless
    will work flawlessly !

    Why ? I have no clues !
    The only thing I know for sure is that the issue we may have using http://list.mydomain.net/cgi-bin/ailman/admin/ , remember, error 500, is avoided because we did un-activate suexec IPSC > sites > list.mysite.net.
    But I have no clue what it truely means, how it impact the server behaviour, and if it is a dirty walkaround or a proper fix. (one may help on that point too)

    Limitation ?
    1) You can't have two list having the same name, even if they don't use the same domain !
    Bbut who care, you know it before hand, so it's easy to deal with it. To me it is acceptable to name my lists domain-list-name instead of list-name

    2) You can't rename a list
    at least not from ISPC, and mailman do not provide a simple way to do it neither, I have no clues what happens if you manually change list name... just think before hand.

    3) You may not want to use the same domain (vhost) for a site and a mailing list
    Remember, when we created the site list.mydomain.net, we disabled suexec.
    Honestly, I barely understand what that means. If I'm right I it means that now the only user that can run a script is the web user (webX in ISPC).
    Monkey, I can't even say if a basic wordpress site needs suexec, I assume it do not, but with the variety of plug-in used there must be few that do ? An what happens with integration between sites or apps ? Well I don't know.
    With my actual level of knowledge, if I need a site/app and a list for the same "entity", i would use two vhost in ISPC, mydomain.net set up as usuall and list.mydomain.net set up as above.

    Technical consideration ?
    Well this is the hard part !
    mailman config file /etc/mailman/mm_cfg.py contains :
    When in ISPC > Mail > we add a mail domain, and in ISPC > Mail > Mailinglist > we add a mailing list
    ISPC update mailman configuration
    and when in Mailman web ui > test-list option > general option > Host name this list prefers for email > we change the domain Mailman uses for test-list
    ==> both enable mailman to use postfix virtual host to send/receive email...



    That's all folks
    ok I'm done
    hope this is meaningfull or usefull
    and if needed, i may turn it into a tuto ? (what moderators says ?)
    Cheers
     
    Last edited: Apr 8, 2019
    MaxT and till like this.
  2. MaxT

    MaxT Member HowtoForge Supporter

    thanks, it works well. :)
     

Share This Page