{"id":16164009,"url":"https://github.com/iredmail/mlmmjadmin","last_synced_at":"2025-07-08T14:04:16.570Z","repository":{"id":52798318,"uuid":"117622431","full_name":"iredmail/mlmmjadmin","owner":"iredmail","description":"A simple RESTful API server used to manage mlmmj (http://mlmmj.org) mailing list manager.","archived":false,"fork":false,"pushed_at":"2025-02-06T04:04:14.000Z","size":416,"stargazers_count":55,"open_issues_count":1,"forks_count":23,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-02T08:48:17.943Z","etag":null,"topics":["iredmail","mail","mailing-list","python","python3"],"latest_commit_sha":null,"homepage":"https://www.iredmail.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iredmail.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-16T02:48:27.000Z","updated_at":"2025-03-22T20:09:22.000Z","dependencies_parsed_at":"2024-10-27T19:17:46.163Z","dependency_job_id":"ded39153-c5da-4c15-a4b1-311c6ef124f3","html_url":"https://github.com/iredmail/mlmmjadmin","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iredmail%2Fmlmmjadmin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iredmail%2Fmlmmjadmin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iredmail%2Fmlmmjadmin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iredmail%2Fmlmmjadmin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iredmail","download_url":"https://codeload.github.com/iredmail/mlmmjadmin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045230,"owners_count":21038553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iredmail","mail","mailing-list","python","python3"],"created_at":"2024-10-10T02:44:58.764Z","updated_at":"2025-04-09T13:05:21.885Z","avatar_url":"https://github.com/iredmail.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mlmmjadmin\n\n\u003e Don't forget to check out our lightweight email archiving software: https://spiderd.io/\n\nmlmmjadmin is RESTful API server used to manage mlmmj (mailing list manager).\nCheck `docs/` directory for more detailed documents.\n\nmlmmjadmin is a core component of iRedMail (since version 0.9.8), but it should\nwork with any mail server which runs mlmmj. You're free to develop your own\nbackend plugin to store basic info of mlmmj mailing lists in your\nSQL/LDAP database (or any other database, it's up to you) for better\nintegration with your mail server.\n\n## License\n\nMIT License.\n\n## Requirements\n\n* A working mail server with a working mlmmj instance.\n    * Mlmmj data is configured to be stored under `/var/spool/mlmmj` by\n      default, it must be owned by user/group `mlmmj:mlmmj` with permission\n      `0700`. if you use a different directory, please override default setting\n      by adding setting `MLMMJ_SPOOL_DIR = '\u003cdirectory\u003e'` in config file.\n* Python 3.5+. If you're running Python 2, please use mlmmjadmin-2.1 instead.\n* Extra Python modules:\n    * [web.py](http://webpy.org/)\n    * [requests](http://docs.python-requests.org/en/master/). Required by\n      command line tool `tools/maillist_admin.py`.\n\n## Setup mlmmj\n\nPlease follow iRedMail tutorials to integrate mlmmj with Postfix first, make\nsure it's working properly:\n\n* [For LDAP backends](https://docs.iredmail.org/integration.mlmmj.ldap.html)\n* [For MySQL/MariaDB backend](https://docs.iredmail.org/integration.mlmmj.mysql.html)\n* [For PostgreSQL backend](https://docs.iredmail.org/integration.mlmmj.pgsql.html)\n\n## Setup mlmmjadmin\n\nNOTE: We use version `3.0` for example below.\n\n* Download the latest mlmmjadmin: \u003chttps://github.com/iredmail/mlmmjadmin/releases\u003e\n* Uncompress downloaded mlmmjadmin package, copy it to `/opt/` directory.\n* Create symbol link:\n\n```\ncd /opt\nln -s mlmmjadmin-3.0 mlmmjadmin\n```\n\n* Generate config file by copying sample file, `settings.py.sample`:\n\n```\ncp settings.py.sample settings.py\nchown mlmmj:mlmmj settings.py\nchmod 0400 settings.py\n```\n\n* Open `settings.py`, make sure all settings are proper. The config file is\n  short, please spend few seconds to read all parameters and the comment lines.\n* Generate a long string as API auth token, it will be used by your API client.\n  For example:\n\n```\n$ echo $RANDOM | md5sum\n43a89b7aa34354089e629ed9f9be0b3b\n```\n\n* Add this string in config file `settings.py`, parameter `api_auth_tokens`,\n  like below:\n\n```\napi_auth_tokens = ['43a89b7aa34354089e629ed9f9be0b3b']\n```\n\nYou can add as many token as you want for different API clients. For example:\n\n```\napi_auth_tokens = ['43a89b7aa34354089e629ed9f9be0b3b', '703ed37b20243d7c51c56ce6cd90e94c']\n```\n\n* Copy rc/systemd scripts for service control:\n\n```\n#\n# For RHEL/CentOS\n#\ncp /opt/mlmmjadmin/rc_scripts/systemd/rhel.service /lib/systemd/system/mlmmjadmin.service\nchmod 0644 /lib/systemd/system/mlmmjadmin.service\nsystemctl daemon-reload\nsystemctl enable mlmmjadmin\n\n#\n# For Debian 9 and Ubuntu 16.04 which systemd\n#\ncp /opt/mlmmjadmin/rc_scripts/systemd/debian.service /lib/systemd/system/mlmmjadmin.service\nchmod 0644 /lib/systemd/system/mlmmjadmin.service\nsystemctl daemon-reload\nsystemctl enable mlmmjadmin\n\n#\n# For FreeBSD\n#\ncp /opt/mlmmjadmin/rc_scripts/mlmmjadmin.freebsd /usr/local/etc/rc.d/mlmmjadmin\necho 'mlmmjadmin_enable=YES' \u003e\u003e /etc/rc.conf.local\n\n#\n# For OpenBSD\n#\ncp /opt/mlmmjadmin/rc_scripts/mlmmjadmin.openbsd /etc/rc.d/mlmmjadmin\nchmod 0755 /etc/rc.d/mlmmjadmin\nrcctl enable mlmmjadmin\n```\n\n\n* Create directory used to store mlmmjadmin log file. mlmmjadmin is\n  configured to log to syslog directly.\n\n```\n#\n# For RHEL/CentOS\n#\nmkdir /var/log/mlmmjadmin\nchown root:root /var/log/mlmmjadmin\nchmod 0755 /var/log/mlmmjadmin\n\n#\n# For Debian/Ubuntu\n#\nmkdir /var/log/mlmmjadmin\nchown syslog:adm /var/log/mlmmjadmin\nchmod 0755 /var/log/mlmmjadmin\n\n#\n# For OpenBSD/FreeBSD\n#\nmkdir /var/log/mlmmjadmin\nchown root:wheel /var/log/mlmmjadmin\nchmod 0755 /var/log/mlmmjadmin\n```\n\n* Update syslog daemon config file to log mlmmjadmin to dedicated log file:\n\nFor Linux\n```\ncp /opt/mlmmjadmin/samples/rsyslog/mlmmjadmin.conf /etc/rsyslog.d/\nservice rsyslog restart\n```\n\nFor OpenBSD, please append below lines in `/etc/syslog.conf`:\n\n```\n!!mlmmjadmin\nlocal5.*            /var/log/mlmmjadmin/mlmmjadmin.log\n```\n\nFor FreeBSD, please append below lines in `/etc/\n\n```\n!mlmmjadmin\nlocal5.*            /var/log/mlmmjadmin/mlmmjadmin.log\n```\n\n* Now ok to start `mlmmjadmin` service:\n\n```\nservice mlmmjadmin restart\n```\n\n## Interactive with curl\n\n```\n# Create a new mailing list\ncurl \\\n    -X POST \\\n    --header 'X-MLMMJADMIN-API-AUTH-TOKEN: 43a89b7aa34354089e629ed9f9be0b3b' \\\n    -d \"owner=postmaster@a.io\u0026only_subscriber_can_post=yes\"\n    http://127.0.0.1:7790/list@domain.com\n\n# Update a mailing list\ncurl \\\n    -X PUT \\\n    --header 'X-MLMMJADMIN-API-AUTH-TOKEN: 43a89b7aa34354089e629ed9f9be0b3b' \\\n    -d \"only_subscriber_can_post=no\"\n    http://127.0.0.1:7790/list@domain.com\n\n# Delete a mailing list\ncurl \\\n    -X DELETE \\\n    --header 'X-MLMMJADMIN-API-AUTH-TOKEN: 43a89b7aa34354089e629ed9f9be0b3b' \\\n    http://127.0.0.1:7790/list@domain.com\n```\n\n## Manage mailing lists from command line\n\nScript `tools/maillist_admin.py` supports basic management from command line,\npleasae run it without any argument to get detailed help information.\n\n## Tips\n\nmlmmj will log its operaions in 2 files under mailing list directory:\n\n* `mlmmj.operation.log`: mlmmj logs mail sending, rejecting, subscription, etc\n  in this file.\n* `mlmmj-maintd.lastrun.log`: mlmmj logs maintenance related task info in this file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firedmail%2Fmlmmjadmin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firedmail%2Fmlmmjadmin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firedmail%2Fmlmmjadmin/lists"}