1

Topic: mlmmjadmin mail list from command query

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):      0.9.8
- Linux/BSD distribution name and version: CentOS Linux release 7.5.1804 (Core)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? - Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I would like to create mail list from python maillist_admin.py which can create UNRESTRICTED mail list.

If I hit following command it creates list but default is ONLY SUBSCRIBER CAN SEND to LIST.

python maillist_admin.py create list@domain.com disable_archive=yes

I just want to create unrestricted mail list where any one can send mail to the list. as per official document only_subscriber_can_post=yes is default when you create new list.

if i hit below command it creates moderated list:

python maillist_admin.py create list@domain.com disable_archive=yes  close_list=yes only_subscriber_can_post=no only_moderator_can_post=no

or

python maillist_admin.py create list@domain.com disable_archive=yes  close_list=yes only_subscriber_can_post=no

I cannot create unrestricted mail list using command where everyone can send email. it always defaults to subscribers can post or moderated lists are being created.

I do have iRedAdmin-Pro but that will take lots of time when creating more than 300 mail list so just thinking to go with commands but not getting required results.

iRedAdmin-Pro do provide migrate option but that is also time consuming where we do not have select all and migrate option or any migration script where all existing mail list will be migrated with desired options.

Is there any work around?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: mlmmjadmin mail list from command query

ketan.aagja wrote:

python maillist_admin.py create list@domain.com disable_archive=yes  close_list=yes only_subscriber_can_post=no only_moderator_can_post=no

Could you show me file names under /var/vmail/mlmmj/<domain>/<list>/control/?

3

Re: mlmmjadmin mail list from command query

Here are the files on list@domain.com/control location:

customheaders
listaddress
moderators
noarchive
noget
owner
smtpport
subonlyget
tocc


Command used to create list:

python /opt/mlmmjadmin/tools/maillist_admin.py create list@domain.com disable_archive=yes only_subscriber_can_post=no only_moderator_can_post=no

Files contents:
customheaders - List-Unsubscribe: <mailto:list+unsubscribe@domain.com?subject=Unsubscribe>
X-Mailing-List: list@domain.com
List-Subscribe: <mailto:list+subscribe@domain.com?subject=Subscribe>
Precedence: list

listaddress - list@domain.com
moderators - postmaster@domain.com
owner - postmaster@domain.com
smtpport - 10027

rest all files are blank

4

Re: mlmmjadmin mail list from command query

Moreover I think directly adding of moderators via maillist_admin.py is not integrated as following commands does not work

python /opt/mlmmjadmin/tools/maillist_admin.py add_moderator list@domain.com user@domain1.com
python /opt/mlmmjadmin/tools/maillist_admin.py add_moderators list@domain.com user@domain1.com
python /opt/mlmmjadmin/tools/maillist_admin.py list@domain.com add_moderator=user@domain1.com
python /opt/mlmmjadmin/tools/maillist_admin.py list@domain.com add_moderators=user@domain1.com 

5

Re: mlmmjadmin mail list from command query

ketan.aagja wrote:

Here are the files on list@domain.com/control location:

The file names under this dir seems fine.
What's the error message in Postfix log file when you send email to this mailing list? I need relevant log for troubleshooting.

6 (edited by ketan.aagja 2018-10-12 00:25:52)

Re: mlmmjadmin mail list from command query

HI Zhang,

I haven't gone to emailing part yet as just creating mail lists from command prompt. Once I can create required mail lists using commands I can implement on domain. But I am stuck on mail list creation part through command. It is not allowing unrestricted mail list without only_subscriber_can_post=no and no moderator.

However when I test mail list it bounces back saying only subscriber can send email to list.

7

Re: mlmmjadmin mail list from command query

ketan.aagja wrote:

python /opt/mlmmjadmin/tools/maillist_admin.py create list@domain.com disable_archive=yes only_subscriber_can_post=no only_moderator_can_post=no

With options "only_subscriber_can_post=no" AND "only_moderator_can_post=no", this mailing list is public / unrestricted, everyone can send email to the list.

8

Re: mlmmjadmin mail list from command query

my bad... yes it creates unrestricted list where anyone can send email to list. I did not test it as admin panel does not show it unrestricted.

However iRedAdmin-Pro shows list as moderated, check attached screenshot. Pro panel does not show list as unrestricted if created using command:

python /opt/mlmmjadmin/tools/maillist_admin.py create list@domain.com disable_archive=yes only_subscriber_can_post=no only_moderator_can_post=no
Post's attachments

screenshot-10.0.0.40-2018.10.12-15-39-57.png 44.39 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

9

Re: mlmmjadmin mail list from command query

Hi Zhang,

Do we need to modify any files for Admin-Pro which can show unrestricted maillist instead of moderated when created with following command?

python /opt/mlmmjadmin/tools/maillist_admin.py create list@domain.com disable_archive=yes only_subscriber_can_post=no only_moderator_can_post=no

mail lists are created unrestricted but I think it's just check box selection that needs to be corrected on Admin-Pro panel.