Giter VIP home page Giter VIP logo

alternc-mailman's Introduction

AlternC: Web and Email Hosting Software Suite

AlternC is a software helping system administrators to handle Web and Email services management. It should be easy to install, based only on free software.

This software consist of an automatic install and configuration system, a web control panel to manage hosted users and their web services such as domains, email accounts, ftp accounts, web statistics...

Technically, AlternC is based on Debian GNU/Linux distribution and it depends on other software such as Apache, Postfix, Dovecot, Mailman (...). It also contains an API documentation so that users can easily customize their web desktop.

This project native language is French, and the code is commented in English. The packages are available at least in French and English, German and Spanish interfaces are usually available too.

Installation

To install AlternC, please follow our install documentation

Pour installer AlternC, merci de suivre la documentation d'installation

Upgrading from AlternC 3.[1,2,3].11 or earlier

The recommended process for upgrading is to upgrade to 3.3.12 before upgrading to 3.5. If you choose to upgrade directly to 3.5 from an earlier version, please read this information as there is a risk of a loss of data.

AlternC >= 3.5 removes integrates alternc-ssl and alternc-admintools in the the core AlternC package.

As a result, both alternc-ssl and alternc-admintools will be removed during installation. When alternc-ssl is removed, it will mark many of the sub domain types suffixed with '-ssl' and '-mixssl' for deletion.

To safely upgrade between these versions:

  • Backup your AlternC database
  • Stop the cron service: /etc/init.d/cron stop
  • Install alternc (>= 3.5)
  • Run the following queries against the alternc database (here, it's called "alternc"):
mysql alternc -e 'update sub_domaines set web_action = "OK" where type like "%-mixssl";'
mysql alternc -e 'update sub_domaines set web_action = "OK" where type like "%-ssl";'
  • Run alternc.install
  • Start the cron service again: /etc/init.d/cron start

Developper information

  • This software is built around a Debian package for Stretch whose packaging instructions are located in debian/ folder (this package can be installed on Jessie safely too)

  • To build the packages, clone this repository in a Debian machine and use debuild or dpkg-buildpackage from source code root.

  • The web control panel pages written in PHP are located in bureau/admin and the associated PHP classes doing the stuff are in bureau/class.

Nightly build

We have 1 nightly build repositories:

and 3 nightly from former Debian releases (now unmaintained)

To use one of them, create a file named /etc/apt/sources.list.d/alternc-nightly-stable-3.5.list (for debian Jessie or Stretch) as follow :

 deb http://stable-3-5.nightly.alternc.org/ latest/

The repository and the packages are signed by the pgp key of AlternC nightly build user :

wget http://stable-3-5.nightly.alternc.org/nightly.key -O - | apt-key add -

License

AlternC code and translation are distributed under the GPL v2 or later license. See COPYING.

Note : AlternC's translations (po files) until 31 January 2024 was distributed under the Creative Commons CC0 license.

Don't participate to the code or translation if you don't agree to publish any contribution under that license.

alternc-mailman's People

Contributors

albancrommer avatar camlafit avatar fufroma avatar grinours avatar guillaumefromage avatar innoticfr avatar kienanstewart avatar sebas891 avatar squidly avatar vincib avatar

Stargazers

 avatar  avatar

Watchers

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

alternc-mailman's Issues

Error Duplicate entry quand on met à jour alternc-mailman

Je suis vais vers la version 3.5 et ça donne lors de la mise à jour avec apt.

ERROR 1062 (23000) at line 1: Duplicate entry 'mailman-default' for key 'PRIMARY'

# Create default quota "mailman" with value 0

debian/alternc-mailman.postinst: mysql --defaults-file=/etc/alternc/my.cnf -Bse "INSERT INTO defquotas VALUES ('mailman', 0, 'default')" || true
On veut avoir un ignore dans la requête.
Je prépare un PR pour faciliter l'intégration.

Sébastien

Properly filter user input

The input sanitizing is not sufficient:

  • In list names, I have encountered an issue with a mailing list containing an amperstamp &.
  • Also, list names could be used to inject arbitrary commands on creation.
  • The same holds for list passwords.

Add a way to deactivate mailman lists through the AlternC interface

It would be nice to be able to deactivate/reactivate lists e-mails, in a manner similar to the other e-mails in AlternC. There are some possibilities to do it behind the scenes in mysql (eg. change the delivery), or by preventing mailman from reading the list information on disk; however, it would be quite convient to be able to have an operation available in the user interface to facilitate this.

erreur "user unknow" après l'installation de alternc-mailman avec virtualmailman

Allo,
Après une installation fraiche sous wheezy de Alternc 3.2.10 et de Alternc-mailman 3.2 (avec la patch virtualmailman) j'obtiens un bounce de postfix avec le message suivant:

<[email protected]>: user unknown

Sur le serveur, j'ai le message suivant:

Mar 25 20:19:55 marvin postfix/pipe[1733]: 5154560025: to=<[email protected]>, relay=mailman, delay=0.41, delays=0.25/0.02/0/0.15, dsn=5.1.1, status=bounced (user unknown)

Je note le même bug sur une nouvelle installation en Debian Jessie avec les mêmes versions de logiciel d'alternc et de alternc-mailman.

Le code en cause semble ici:
https://github.com/AlternC/alternc-mailman/blob/3.2/bureau/class/m_mailman.php#L196

sinon, c'est un truc manquant dans la conf de postfix:
https://github.com/AlternC/AlternC/tree/master/etc/alternc/templates/postfix

Toutes les pistes de solution pour trouver la source ou des patchs seront appréciées!

Merci

After installation, the mailman list creation interface is available

Eg. lists.example.com/cgi-bin/mailman/create

I would not expect these lists to be fully functional (since the mail addresses wouldn't be configured in the AlternC database). As a result, I think it would be useful to restrict access to this interface. I'm not sure if there's a way to do this in the mailman configuration, but we could add an exception in the vhost / proxy.

Thoughts?

Utilser une configuration de proxy d'apache2 pour éviter de patcher et distribuer mailman

Le mode itk (apache roule sous le uid de l'utilisateur et le panneau sous le uid 1999) dans la configuration par défaut d'AlternC. Ceci ne permet pas l'exécution des cgi de mailman par l'interface web d'apache. C'est une patch dans Debian qui limite l'éxécution à un certain uid d'utilisateur du système.

voici la patch chez debian
https://sources.debian.org/src/mailman/1:2.1.23-1+deb9u2/debian/patches/10_wrapper_uid.patch/

Il y a 2 options:

  1. Recompiler mailman et retirer la patch de debian. C'est pas génial de faire la maintenance de ça pour plusieurs raisons, ça demande un suivi des fix de sécurité chez Debian et faire des backports de celles-ci...

  2. Faire une configuration dans Apache2 pour l'accès aux cgi par proxy. De plus, 2 autres configurations doivent être fait dans le mm_cfg.py de Mailman.

On prèfère de loin la deuxième option.

Un PR va arrive pour implanter la deuxième option.

Ce problème a été discuté longuement ici : AlternC/AlternC#15

De plus, un détail a été ajouté ici #6

la taille des listes n'est pas affichée dans la page quota des utilisateurs

function hook_quota_get() {

Il manque la ligne pour récupérer la taille des listes.

Voici la fonction corrigée:

  function hook_quota_get() {
    global $msg,$cuid,$db,$quota;
    $msg->log("mailman","getquota");
    $q=Array("name"=>"mailman", "description"=>_("Mailing lists"), "used"=>0);
    $db->query("SELECT COUNT(*) AS cnt FROM mailman WHERE uid='$cuid'");
    if ($db->next_record()) {
         $q['used']=$db->f("cnt");
         $q['sizeondisk'] = $quota->get_size_mailman_sum_user($cuid);
    }
    return $q;
  }

(rajouter la global $quota + nouvelle ligne "sizeondisk")

no migration

After upgrading alternc from 1.0 to 3.2 with mailman module, the aliases for every list is missing in the postfix mysql view.
mail_alias table tag them as unmigrated.
May be one migration is needed?

pouvoir choisir d'avoir les accès aux interfaces web de mailman en https

A la page des listes, pour avoir les liens en https vers l'admin & les messages en attente:

  • Ajouter la variable alternc
INSERT INTO `variable` (`name`, `value`, `comment`, `type`) VALUES ( 'mailman_https_access', 0, '0 to have a Http link to mailman admin pages, 1 to have a https link in the mailman section', NULL);
  • admin/mman_list.php
    reset($r);
    $col=1;

    $protocol="http";
    if(isset($conf['mailman_https_access']) && $conf['mailman_https_access'] == 1)
        $protocol="https";

    while (list($key,$val)=each($r)) {
        $col=3-$col;

....

            <td><div class="ina"><a target=_blank href="<?php echo $protocol; ?>://<?php echo $val["url"]; ?>/cgi-bin/mailman/admin/<?php echo $val["name"] ?>"><?php __("List admin"); ?></a></div></td>
            <td><div class="ina"><a target=_blank href="<?php echo $protocol; ?>://<?php echo $val["url"]; ?>/cgi-bin/mailman/admindb/<?php echo $val["name"] ?>"><?php __("Pending messages"); ?></a></div></td>

Y a l'initialisation de la variable $protocol et son utilisation

Virtual mailman patch not checked when the package mailman is on hold

When mailman is on, even if the virtual patch is selected during reconfiguration, nothing is applied or checked:

`

dpkg-reconfigure alternc-mailman

fixing private archive rights for mailman
Installing mysql table
detected mailman version
no patchfile for mailman
installing required apache modules
Module rewrite already enabled
Module proxy already enabled
[Thu Jul 12 22:32:23.296907 2018] [alias:warn] [pid 21202] AH00671: The ScriptAlias directive in /etc/apache2/conf-enabled/serve-cgi-bin.conf at line 11 will probably never match because it overlaps an earlier ScriptAlias.
Module cgi already enabled


  •                                        *
    
  • ALTERNC-MAILMAN ACTION REQUESTED *
  •                                        *
    
  • Please run alternc.install to fully deploy *
  • Then change your quota to activate Mailman *
  •                                        *
    

`

Réintégrer l'option de fonctionnalité de virtual-mailman dans le package alternc-mailman

La fonctionnalité de virtual-mailman a été retiré selon les commentaires cf0f488 dans les commits par manque de maintenance du code et des patchs sur les version de mailman pour la version de stretch (2.1.23).

Ça devient impossible de faire la mise à jour d'alternc pour les serveurs qui ont alternc-mailman avec le patch pour les listes virtuels.

Je prépare un PR pour réintégrer la fonctionalité et permettre la compatibilité avec alternc-3.3.11 (la branche stable-3.1)

En espérant une réponse positive de la communauté :)

Permettre l'utilisation d'un URL autre que FQDN du panneau pour les listes mailman

C'est très restrictif de ne pas avoir d'options lors de l'installation de alternc-mailman pour utiliser un autre URL que le FQDN.

Les alternc sont parfois installé sous https://bureau.... ou encore https://admin.... etc... et on trouve plus intéressant d'avoir https://listes.... ou encore https://list pour l'hébergement des listes.

Il y a déjà une variable mailman_url à quelques endroit dans le code.
https://github.com/AlternC/alternc-mailman/search?q=mailman_url&unscoped_q=mailman_url

Même après avoir configuré manuellement la variable dans le panneau de contrôle, les listes ont toujours le URL du FQDN. C'est un autre bug ça, le PR est ici pour régler ça #21

Je verrais lors de l'installation une question dans l'installeur qui demande le URL souhaité pour les listes. On peut mettre par défaut le FQDN, mais ça serait aussi possible de modifier l'URL à l'installation.

Ça va bien sur répercuter à quelques endroits. On peut préparer un PR pour la fonctionnalité si ça vous va.

Sébastien

proxy and reverse proxy both used

this makes a proxy chain that'll spawn new connections until the worker limit is reached completely exhausting the webserver's resources in a couple of seconds.

a new list with a ` in the password will result in a crashing cronjob every minute

The password field is either too permissive with its contents or the way the password is being set is problematic. in any case, when a new mailing list is created and a backtick is present in the password, the update_mailman.sh cronjob will crash on every run.

this is caused by the way "newlist" is called here:

su - list -c "/usr/lib/mailman/bin/newlist -q \"$list@$domain\" \"$owner\" \"$password\""

the backtick gets interpreted and sh complains about a syntax error.

I don't know yet if that might have security implications too: I haven't tested whether shell injection is possible through the password, but I surmise it probably is.

my suggestion would be to make alternc reject passwords that contain a backtick.

note: this might be applicable to double quotes too

Add hooks on list creation and deletion

Having hooks on creation and deletion would be useful to site administrators who need to adjust lists or other related data as those events occur without hacking into the the update_mailman.sh script shipped in this package.

One example is setting defaults for lists where no mailman default configuration is possible (eg. header_filter_rules).

SQL Injection creating a mailing list

There is no user escape in the current API.
For instance, the password provided to create a mailing list can be used to inject arbitrary data.

Poc:

  1. Create a mailing-list
  2. Set the following password ','2890','blip','CREATE') ; -- #
  3. Enjoy the beauty of your creation:
mysql> select * from mailman where id = 6585;
+------+------+---------+----------------+---------+----------+-------+------+----------------+----------------+
| id   | uid  | list    | domain         | name    | password | owner | url  | mailman_action | mailman_result |
+------+------+---------+----------------+---------+----------+-------+------+----------------+----------------+
| 6585 | 2890 | foo1234 | code-libre.org | foo1234 |          | 2890  | blip | CREATE         |                |
+------+------+---------+----------------+---------+----------+-------+------+----------------+----------------+
1 row in set (0.01 sec)

Close note: there are probably other vulnerabilites. The new SQL class which uses PDO should be used.

pull request for implement mailman3

I have make a fork with all my modification for implement mailman3.
I think that all is done. I make a little documentation, how work mailman3 + dump db.
mailman3 is in testing Debian package version.
I know is an big thing in one time but I think there wasn't other way.

I don't know way I can't pull request.
If you have some questions let me know.

Lors de la suppression d'une liste, les alias ne sont pas supprimés dans la db d'alternc

Je roule la version master de alternc-mailman en stretch avec la patch pour la virtualisation de mailman, et la version 3.3.11 de alternc.

Voici l'erreur à la suppression d'une liste.

L'adresse mailman poissons6-exemple.org n'existe pas
L'adresse mailman poissons6-exemple.org-request n'existe pas
L'adresse mailman poissons6-exemple.org-owner n'existe pas
L'adresse mailman poissons6-exemple.org-admin n'existe pas
L'adresse mailman poissons6-exemple.org-bounces n'existe pas
L'adresse mailman poissons6-exemple.org-confirm n'existe pas
L'adresse mailman poissons6-exemple.org-join n'existe pas
L'adresse mailman poissons6-exemple.org-leave n'existe pas
L'adresse mailman poissons6-exemple.org-subscribe n'existe pas
L'adresse mailman poissons6-exemple.org-unsubscribe n'existe pas
La liste [email protected] a été effacée avec succès.

Les alias se retrouvent dans la table "address" ainsi que dans la table "mailbox".

Question about mailman_action

I see in mailman table a column mailman_action how can have the value
'REGENERATE','REGENERATE-2'
It's yet used and what kind of action is ?

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.