Skip to Content.
Sympa Menu

en - RE: [en@sympa] automating list creation & adding subscribers

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: "Shweta Patil (Staff)" <address@concealed>
  • To: "address@concealed" <address@concealed>
  • Subject: RE: [en@sympa] automating list creation & adding subscribers
  • Date: Mon, 23 Mar 2026 11:27:17 +0000

Hi All,

 

 

The test using ldapsearch and referring the members from this search as text file for list creation works ie. Members are added to the list at the time of list creation.

 

But I would like to use ‘member_include’ to pull members to each of the lists when created automatically. That way the load on LDAP server with every ldapsearch can be avoided. <https://www.sympa.community/manual/customize/data-sources.html#defining-the-data-sources>

 

We have moved away from using Sympa’s family feature

 

The xml template I use for creating lists using a script with definition of member_inlcude is as below.  

 

 

cat > "$XML" <<EOF

<?xml version="1.0" ?>

<list>

<listname>$LIST</listname>        à(where LIST is the listname with AD_GROUP converted to lowercase)

<subject>$AD_GROUP mailing list</subject>

<type>test-class-list</type>

<visibility>conceal</visibility>

<subscribe>closed</subscribe>

<topic>Test</topic>

<member_include multiple="1">

<source>ad-members</source>

<source_parameters>$AD_GROUP</source_parameters>

</member_include>

<owner multiple="1">

<email>address@concealed</email>

<profile>privileged</profile>

<reception>mail</reception>

<visibility>noconceal</visibility>

<gecos>testmgr</gecos>

</owner>

<owner_include multiple="1">

<profile>normal</profile>

<reception>mail</reception>

<source>test-mods</source>

<visibility>noconceal</visibility>

</owner_include>

</list>

EOF

 

Data source for member_inlude is as below -

 

include_ldap_query

name ad-members

host ldap://example.ac.uk

bind_dn CN=sympa_user,OU=Service Accounts,OU=Sympa Team,DC=test,DC=example,DC=ac,DC=uk

bind_password xxx

suffix DC=test,DC=example,DC=ac,DC=uk

suffix OU=Users,OU=EXAMPLE, DC=test,DC=example,DC=ac,DC=uk

timeout 30

scope sub

ca_verify required

use_tls none

select all

filter (&(memberOf=CN=[% param.0 %],OU=MailingLists,OU=Groups-TEST,OU=Groups,OU=EXAMPLE,DC=test,DC=example,DC=ac,DC=uk)(mail=*))

attrs mail

   

List gets created with XML file as input but only owners included from data_sources and not the members-

    sympa.pl --create_list --robot "$ROBOT" --input_file "$XML"

The ldap_query values are as confirmed by AD team and works for ldapsearch base without issues

 

Can anyone help point out any error/issue with this or any pointers to get it working would be appreciated.

Else due to limitations, we will have to go down the route of using ldapsearch with batch creation to avoid load on servers

 

Thank you

 

Regards,

Shweta

 

From: Shweta Patil (Staff)
Sent: 18 February 2026 10:35
To: 'address@concealed' <address@concealed>
Subject: RE: automating list creation & adding subscribers

 

Hi All,

 

Further to this, I have  progressed as far as having the list populated using ‘families’ feature of Sympa.

 

I intend to generate these lists in batches rather than bulk run at once to have better control and visibility as well as to avoid mess or load on the server

 

As a proactive measure, I am also looking at increasing the disk space for /var to have enough room to accommodate list data for 2000 lists.

 

When tested list creation using families, I can see the list is populated fine and the members are picked up from AD group as expected too.

 

But having the LDAP query details defined under “include_ldap_2level_query”, each list generated gets hard coded details of the host name, user & password used thus.

 

Is there any way we can avoid these details being hard coded int each list config or this is expected and Sympa can confirm this is safe to have such config?

 

Another query is, if I want to use customised template for these lists from the family, e.g. “for-ad-list” under “create_list_templates” how can they be referenced in the family?

 

Thank you

 

 

Regards,

Shweta

 

From: Shweta Patil (Staff)
Sent: 07 October 2025 09:49
To:
address@concealed
Subject: automating list creation & adding subscribers

 

Hi All,

 

I am looking at automating the creation of Sympa mailing lists as well as adding the subscribers to the lists automatically from the AD group

 

Has anyone implemented this before? If so, any pointers would be appreciated as I have been tasked to create around 2000 mailing lists ASAP

 

We are using Exim as the MTA and have  mail relay host with rules defined for Exim configuration

 

Thank you

 

 

Kind Regards

 

Shweta Patil


Service Engineer Cloud(Linux) | Infrastructure & Operations | Digital Services
Brunel University of London

E: address@concealed

 

University of London, Uxbridge, UB8 3PH, United Kingdom

brunel.ac.uk | T +44(0)1895 274000 

Image Image Image Image Image

 

 

Regards,

Shweta

 



  • RE: [en@sympa] automating list creation & adding subscribers, Shweta Patil (Staff), 03/23/2026

Archive powered by MHonArc 2.6.19+.

Top of Page