A simple RESTful API server used to manage mlmmj (http://mlmmj.org) mailing list manager.
Don't forget to check out our lightweight email archiving software: https://spiderd.io/
mlmmjadmin is RESTful API server used to manage mlmmj (mailing list manager).
Check docs/
directory for more detailed documents.
mlmmjadmin is a core component of iRedMail (since version 0.9.8), but it should work with any mail server which runs mlmmj. You're free to develop your own backend plugin to store basic info of mlmmj mailing lists in your SQL/LDAP database (or any other database, it's up to you) for better integration with your mail server.
MIT License.
/var/spool/mlmmj
by
default, it must be owned by user/group mlmmj:mlmmj
with permission
0700
. if you use a different directory, please override default setting
by adding setting MLMMJ_SPOOL_DIR = '<directory>'
in config file.Please follow iRedMail tutorials to integrate mlmmj with Postfix first, make sure it's working properly:
NOTE: We use version 3.0
for example below.
/opt/
directory.cd /opt
ln -s mlmmjadmin-3.0 mlmmjadmin
settings.py.sample
:cp settings.py.sample settings.py
chown mlmmj:mlmmj settings.py
chmod 0400 settings.py
settings.py
, make sure all settings are proper. The config file is
short, please spend few seconds to read all parameters and the comment lines.$ echo $RANDOM | md5sum
43a89b7aa34354089e629ed9f9be0b3b
settings.py
, parameter api_auth_tokens
,
like below:api_auth_tokens = ['43a89b7aa34354089e629ed9f9be0b3b']
You can add as many token as you want for different API clients. For example:
api_auth_tokens = ['43a89b7aa34354089e629ed9f9be0b3b', '703ed37b20243d7c51c56ce6cd90e94c']
#
# For RHEL/CentOS
#
cp /opt/mlmmjadmin/rc_scripts/systemd/rhel.service /lib/systemd/system/mlmmjadmin.service
chmod 0644 /lib/systemd/system/mlmmjadmin.service
systemctl daemon-reload
systemctl enable mlmmjadmin
#
# For Debian 9 and Ubuntu 16.04 which systemd
#
cp /opt/mlmmjadmin/rc_scripts/systemd/debian.service /lib/systemd/system/mlmmjadmin.service
chmod 0644 /lib/systemd/system/mlmmjadmin.service
systemctl daemon-reload
systemctl enable mlmmjadmin
#
# For FreeBSD
#
cp /opt/mlmmjadmin/rc_scripts/mlmmjadmin.freebsd /usr/local/etc/rc.d/mlmmjadmin
echo 'mlmmjadmin_enable=YES' >> /etc/rc.conf.local
#
# For OpenBSD
#
cp /opt/mlmmjadmin/rc_scripts/mlmmjadmin.openbsd /etc/rc.d/mlmmjadmin
chmod 0755 /etc/rc.d/mlmmjadmin
rcctl enable mlmmjadmin
#
# For RHEL/CentOS
#
mkdir /var/log/mlmmjadmin
chown root:root /var/log/mlmmjadmin
chmod 0755 /var/log/mlmmjadmin
#
# For Debian/Ubuntu
#
mkdir /var/log/mlmmjadmin
chown syslog:adm /var/log/mlmmjadmin
chmod 0755 /var/log/mlmmjadmin
#
# For OpenBSD/FreeBSD
#
mkdir /var/log/mlmmjadmin
chown root:wheel /var/log/mlmmjadmin
chmod 0755 /var/log/mlmmjadmin
For Linux
cp /opt/mlmmjadmin/samples/rsyslog/mlmmjadmin.conf /etc/rsyslog.d/
service rsyslog restart
For OpenBSD, please append below lines in /etc/syslog.conf
:
!!mlmmjadmin
local5.* /var/log/mlmmjadmin/mlmmjadmin.log
For FreeBSD, please append below lines in `/etc/
!mlmmjadmin
local5.* /var/log/mlmmjadmin/mlmmjadmin.log
mlmmjadmin
service:service mlmmjadmin restart
# Create a new mailing list
curl \
-X POST \
--header 'X-MLMMJADMIN-API-AUTH-TOKEN: 43a89b7aa34354089e629ed9f9be0b3b' \
-d "[email protected]&only_subscriber_can_post=yes"
http://127.0.0.1:7790/[email protected]
# Update a mailing list
curl \
-X PUT \
--header 'X-MLMMJADMIN-API-AUTH-TOKEN: 43a89b7aa34354089e629ed9f9be0b3b' \
-d "only_subscriber_can_post=no"
http://127.0.0.1:7790/[email protected]
# Delete a mailing list
curl \
-X DELETE \
--header 'X-MLMMJADMIN-API-AUTH-TOKEN: 43a89b7aa34354089e629ed9f9be0b3b' \
http://127.0.0.1:7790/[email protected]
Script tools/maillist_admin.py
supports basic management from command line,
pleasae run it without any argument to get detailed help information.
mlmmj will log its operaions in 2 files under mailing list directory:
mlmmj.operation.log
: mlmmj logs mail sending, rejecting, subscription, etc
in this file.mlmmj-maintd.lastrun.log
: mlmmj logs maintenance related task info in this file.