<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.fsci.in/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Abbyck</id>
	<title>FSCI Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.fsci.in/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Abbyck"/>
	<link rel="alternate" type="text/html" href="https://wiki.fsci.in/Special:Contributions/Abbyck"/>
	<updated>2026-05-31T22:28:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.fsci.in/index.php?title=Mailing_list&amp;diff=10991</id>
		<title>Mailing list</title>
		<link rel="alternate" type="text/html" href="https://wiki.fsci.in/index.php?title=Mailing_list&amp;diff=10991"/>
		<updated>2021-03-30T09:06:51Z</updated>

		<summary type="html">&lt;p&gt;Abbyck: /* Admin Documentation */  add rspamd setup docs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Mailing lists are very useful communication and coordination tool. FSCI provides mailing lists to Free Libre Open Source (FLOSS) groups and non profit organizations. If you want to open a new public list, please drop a mail at [mailto:postmaster@lists.fsci.org.in postmaster(at)lists.fsci.org.in].&lt;br /&gt;
&lt;br /&gt;
= Environment =&lt;br /&gt;
== Machine Summary ==&lt;br /&gt;
We are on [https://www.scaleway.com/virtual-cloud-servers scaleway] virtual cloud server.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| * Cores||: 2 x86 cores &lt;br /&gt;
|-&lt;br /&gt;
| * Memory||: 2GB&lt;br /&gt;
|-&lt;br /&gt;
|* Disk||: 50GB&lt;br /&gt;
|-&lt;br /&gt;
|* OS||: Debian GNU/Linux&lt;br /&gt;
|-&lt;br /&gt;
|* Web Server||: Nginx&lt;br /&gt;
|-&lt;br /&gt;
|* List manager||: Mailman3&lt;br /&gt;
|-&lt;br /&gt;
|* Spam Filter||: Rspamd&lt;br /&gt;
|-&lt;br /&gt;
|* Host name||: [https://lists.fsci.org.in lists.fsci.org.in]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Coordination =&lt;br /&gt;
&lt;br /&gt;
* Hangout with us in our Matrix room [https://matrix.to/#/#mailman:poddery.com #mailman:poddery.com]&lt;br /&gt;
* [https://git.fosscommunity.in/community/lists.fsci.org.in/issues issue tracker] - we use this to track progress of tasks&lt;br /&gt;
&lt;br /&gt;
== Admins ==&lt;br /&gt;
&lt;br /&gt;
Abhijith PA, Prinz Piuz, Balasankar C &lt;br /&gt;
&lt;br /&gt;
= Admin Documentation =&lt;br /&gt;
&lt;br /&gt;
== Generate DKIM for new domains ==&lt;br /&gt;
&lt;br /&gt;
We use &#039;opendkim&#039;[http://opendkim.org/] to implement DKIM.&lt;br /&gt;
To generate DKIM keys, use &amp;lt;code&amp;gt;opendkim-genkey -b 4096 -h rsa-sha256 -r -s &amp;lt;selector_name&amp;gt; -d &amp;lt;domain_name_of_this_list&amp;gt; -v`&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt; &lt;br /&gt;
We don&#039;t have any format on selector naming. Pick something related to this list(for eg: the selector for the domain lists.fsci.org.in  is &amp;lt;code&amp;gt;lists&amp;lt;/code&amp;gt; what we used).&lt;br /&gt;
After generating the DKIM keys, we will get two files.&lt;br /&gt;
* &amp;lt;selector_name&amp;gt;.private - which contains the private signing key.&lt;br /&gt;
* &amp;lt;selector_name&amp;gt;.txt - which contains the DKIM TXT DNS record for that domain.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Now, create a folder under &amp;lt;code&amp;gt;/etc/opendkim/keys/&amp;lt;domain_name_for_this_list&amp;gt;/&amp;lt;/code&amp;gt; and move the above file to that location.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Create an entry for the newly created domain in /etc/opendkim/KeyTable as well as /etc/opendkim/SigningTable&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
On /etc/opendkim/KeyTable&lt;br /&gt;
 &amp;lt;selector_name._domainkey.&amp;lt;domain_name_of_this_list&amp;gt; &amp;lt;domain_name_of_this_list&amp;gt;:&amp;lt;selector_name&amp;gt;:/etc/opendkim/keys/&amp;lt;domain_name_of_this_list&amp;gt;/&amp;lt;selector_name&amp;gt;.private&lt;br /&gt;
 eg: lists._domainkey.lists.fsci.org.in lists.fsci.org.in:lists:/etc/opendkim/lists.private&lt;br /&gt;
On /etc/opendkim/SigningTable&lt;br /&gt;
 &amp;lt;domain_name_of_this_list&amp;gt; &amp;lt;selector_name&amp;gt;._domainkey.&amp;lt;domain_name_of_this_list&amp;gt;&lt;br /&gt;
 eg: lists.fsci.org.in lists._domainkey.lists.fsci.org.in&lt;br /&gt;
More on DKIM keys, formating etc: [[https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail DomainKeys Identified Mail]], &lt;br /&gt;
Setup DKIM with OpenDKIM on Debian: [[https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-dkim-with-postfix-on-debian-wheezy How To Install and Configure DKIM with Postfix on Debian]]&lt;br /&gt;
&lt;br /&gt;
== Verify DKIM and other settings for new domains ==&lt;br /&gt;
&lt;br /&gt;
Create a text file, dkim-test.txt (replace To address with random address generated by https://dkimvalidator.com or https://www.mail-tester.com/)&lt;br /&gt;
&lt;br /&gt;
 From: &amp;quot;Test&amp;quot; &amp;lt;test-dkim@mm.gnu.org.in&amp;gt;&lt;br /&gt;
 To: &amp;lt;random-address&amp;gt;@dkimvalidator.com&lt;br /&gt;
 Subject: Testing DKIM and other settings for this domain&lt;br /&gt;
 Content-Type: text/plain; charset=utf-8&lt;br /&gt;
 Content-Transfer-Encoding: 8bit&lt;br /&gt;
 &lt;br /&gt;
 This email is to test email settings for a domain is correct&lt;br /&gt;
&lt;br /&gt;
and use sendmail command to send it&lt;br /&gt;
&lt;br /&gt;
/usr/sbin/sendmail -t &amp;lt; dkim-test.txt&lt;br /&gt;
&lt;br /&gt;
== Setup Rspamd ==&lt;br /&gt;
See [[https://rspamd.com/doc/quickstart.html Rspamd quick start]] for the latest installation and setup instructions.&lt;br /&gt;
Install Rspamd. Redis will be installed automatically(check).&lt;br /&gt;
 $ sudo apt install rspamd&lt;br /&gt;
Check service is running.&lt;br /&gt;
 $ systemctl status rspamd.service&lt;br /&gt;
   ● rspamd.service - rapid spam filtering system&lt;br /&gt;
   Loaded: loaded (/lib/systemd/system/rspamd.service; enabled; vendor preset: enabled)&lt;br /&gt;
   Active: active (running) since Sat 2020-11-07 14:54:03 UTC; 1min 58s ago&lt;br /&gt;
     Docs: https://rspamd.com/doc/&lt;br /&gt;
     Main PID: 19339 (rspamd)&lt;br /&gt;
     Tasks: 5 (limit: 2336)&lt;br /&gt;
     Memory: 276.2M&lt;br /&gt;
     CGroup: /system.slice/rspamd.service&lt;br /&gt;
           ├─19339 rspamd: main process&lt;br /&gt;
           ├─19517 rspamd: rspamd_proxy process (localhost:11332)&lt;br /&gt;
           ├─19518 rspamd: controller process (localhost:11334)&lt;br /&gt;
           ├─19519 rspamd: normal process (localhost:11333)&lt;br /&gt;
           └─19520 rspamd: hs_helper process&lt;br /&gt;
     Nov 07 14:54:03 lists.fsci.org.in systemd[1]: Started rapid spam filtering system.&lt;br /&gt;
&lt;br /&gt;
Check if redis is working properly using redis-cli&lt;br /&gt;
 $ redis-cli&lt;br /&gt;
  127.0.0.1:6379&amp;gt; ping&lt;br /&gt;
   PONG&lt;br /&gt;
  127.0.0.1:6379&amp;gt; ping Hello[qwe]&lt;br /&gt;
   &amp;quot;Hello[qwe]&amp;quot;&lt;br /&gt;
  127.0.0.1:6379&amp;gt; exit&lt;br /&gt;
&lt;br /&gt;
Change some redis config to use it as a LRU cache[https://redis.io/topics/lru-cache].&lt;br /&gt;
On /etc/redis/redis.conf&lt;br /&gt;
~line 850&lt;br /&gt;
 maxmemory 500mb&lt;br /&gt;
 maxmemory-policy volatile-ttl&lt;br /&gt;
 bind 127.0.0.1 ::1 //already exists&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Configure rspamd&#039;&#039;&#039;&lt;br /&gt;
 $ sudo rspamadm configwizard&lt;br /&gt;
  ____                                     _&lt;br /&gt;
 |  _ \  ___  _ __    __ _  _ __ ___    __| |&lt;br /&gt;
 | |_) |/ __|| &#039;_ \  / _` || &#039;_ ` _ \  / _` |&lt;br /&gt;
 |  _ &amp;lt; \__ \| |_) || (_| || | | | | || (_| |&lt;br /&gt;
 |_| \_\|___/| .__/  \__,_||_| |_| |_| \__,_|&lt;br /&gt;
             |_|&lt;br /&gt;
 Welcome to the configuration tool&lt;br /&gt;
 We use /etc/rspamd/rspamd.conf configuration file, writing results to /etc/rspamd&lt;br /&gt;
 Modules enabled: hfilter, phishing, emails, asn, settings, chartable, arc, bayes_expiry, once_received, rbl, fuzzy_check, metadata_exporter, elastic, mid, multimap, spf, dkim_signing, dkim, mime_types, regexp, maillist, dmarc,   forged_recipients, milter_headers, whitelist, force_actions, trie&lt;br /&gt;
 Modules disabled (explicitly): p0f, spamtrap, rspamd_update, mx_check, dcc&lt;br /&gt;
 Modules disabled (unconfigured): spamassassin, maps_stats, metric_exporter, dynamic_conf, clustering, reputation, antivirus, fuzzy_collect, external_services, ip_score, clickhouse&lt;br /&gt;
 Modules disabled (no Redis): greylist, url_redirector, replies, neural, ratelimit, history_redis&lt;br /&gt;
 Modules disabled (experimental): &lt;br /&gt;
 Modules disabled (failed): &lt;br /&gt;
 Do you wish to continue?[Y/n]: &lt;br /&gt;
 Setup WebUI and controller worker:&lt;br /&gt;
 Controller password is not set, do you want to set one?[Y/n]: Y&lt;br /&gt;
 Enter passphrase: &lt;br /&gt;
 Set encrypted password to: &amp;lt;password_hash&amp;gt;&lt;br /&gt;
 Redis servers are not set:&lt;br /&gt;
 The following modules will be enabled if you add Redis servers:&lt;br /&gt;
    * greylist&lt;br /&gt;
    * url_redirector&lt;br /&gt;
    * replies&lt;br /&gt;
    * neural&lt;br /&gt;
    * ratelimit&lt;br /&gt;
    * history_redis&lt;br /&gt;
 Do you wish to set Redis servers?[Y/n]: &lt;br /&gt;
 Input read only servers separated by `,` [default: localhost]: &lt;br /&gt;
 Input write only servers separated by `,` [default: localhost]: &lt;br /&gt;
 Do you have any password set for your Redis?[y/N]: &lt;br /&gt;
 Do you have any specific database for your Redis?[y/N]: &lt;br /&gt;
 Do you want to setup dkim signing feature?[y/N]: N&lt;br /&gt;
 File: /etc/rspamd/local.d/redis.conf, changes list:&lt;br /&gt;
 write_servers =&amp;gt; localhost&lt;br /&gt;
 read_servers =&amp;gt; localhost&lt;br /&gt;
&lt;br /&gt;
 File: /etc/rspamd/local.d/worker-controller.inc, changes list:&lt;br /&gt;
 password =&amp;gt; &amp;lt;password_hash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Apply changes?[Y/n]: Y&lt;br /&gt;
 Create file /etc/rspamd/local.d/redis.conf&lt;br /&gt;
 Create file /etc/rspamd/local.d/worker-controller.inc&lt;br /&gt;
 2 changes applied, the wizard is finished now&lt;br /&gt;
 *** Please reload the Rspamd configuration ***&lt;br /&gt;
&lt;br /&gt;
Now, restart the rspamd service and check status&lt;br /&gt;
 $ sudo systemctl restart rspamd&lt;br /&gt;
 $ sudo systemctl status rspamd&lt;br /&gt;
   ● rspamd.service - rapid spam filtering system&lt;br /&gt;
     Loaded: loaded (/lib/systemd/system/rspamd.service; enabled; vendor preset: enabled)&lt;br /&gt;
     Active: active (running) since Sat 2020-11-07 15:28:14 UTC; 4s ago&lt;br /&gt;
       Docs: https://rspamd.com/doc/&lt;br /&gt;
     Main PID: 21899 (rspamd)&lt;br /&gt;
     Tasks: 5 (limit: 2336)&lt;br /&gt;
     Memory: 116.5M&lt;br /&gt;
     CGroup: /system.slice/rspamd.service&lt;br /&gt;
           ├─21899 rspamd: main process&lt;br /&gt;
           ├─21915 rspamd: rspamd_proxy process (localhost:11332)&lt;br /&gt;
           ├─21916 rspamd: controller process (localhost:11334)&lt;br /&gt;
           ├─21917 rspamd: normal process (localhost:11333)&lt;br /&gt;
           └─21918 rspamd: hs_helper process&lt;br /&gt;
     Nov 07 15:28:14 lists.fsci.org.in systemd[1]: Started rapid spam filtering system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Worker Proxy setup&#039;&#039;&#039;&lt;br /&gt;
in /etc/rspamd/local.d/worker-proxy.inc    &lt;br /&gt;
 # local.d/worker-proxy.inc&lt;br /&gt;
 milter = yes; # Enable milter mode&lt;br /&gt;
 timeout = 120s; # Needed for Milter usually&lt;br /&gt;
 upstream &amp;quot;local&amp;quot; {&lt;br /&gt;
   default = yes; # Self-scan upstreams are always default&lt;br /&gt;
   self_scan = yes; # Enable self-scan&lt;br /&gt;
 }&lt;br /&gt;
 count = 4; # Spawn more processes in self-scan mode&lt;br /&gt;
 max_retries = 5; # How many times master is queried in case of failure&lt;br /&gt;
 discard_on_reject = false; # Discard message instead of rejection&lt;br /&gt;
 quarantine_on_reject = false; # Tell MTA to quarantine rejected messages&lt;br /&gt;
 spam_header = &amp;quot;X-Spam&amp;quot;; # Use the specific spam header&lt;br /&gt;
 reject_message = &amp;quot;Spam message rejected&amp;quot;; # Use custom rejection message&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Disable DKIM Signing on rspamd&#039;&#039;&#039;&lt;br /&gt;
 To disable DKIM signing (i.e. you use OpenDKIM, or signing is done elsewhere- ie, that&#039;s our case)&lt;br /&gt;
 # local.d/dkim_signing.conf&lt;br /&gt;
 enabled = false;&lt;br /&gt;
&lt;br /&gt;
and restart rspamd service after that.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Setting up the WebUI&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br /&amp;gt;For using the location, &amp;lt;webroot&amp;gt;/rspamd,&lt;br /&gt;
&amp;lt;br /&amp;gt;Add the following on /etc/mailman3/nginx.conf&lt;br /&gt;
&lt;br /&gt;
 location /rspamd/ {&lt;br /&gt;
     proxy_pass       http://localhost:11334/;&lt;br /&gt;
     proxy_set_header Host      $host;&lt;br /&gt;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now, check nginx syntax, restart the nginx service and check the status. &lt;br /&gt;
&amp;lt;br/&amp;gt; After restart, you can visit &amp;lt;webroot&amp;gt;/rspamd and login with the previously created password.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Setting up rspamd Worker proxy config on postfix&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br /&amp;gt;Rspamd Worker proxy config&lt;br /&gt;
&amp;lt;br /&amp;gt;On /etc/postfix/main.cf&lt;br /&gt;
 Don&#039;t forget to disable existing  configs for the same below&lt;br /&gt;
 ##&lt;br /&gt;
 ## Spam filter and DKIM signatures via Rspamd&lt;br /&gt;
 ##&lt;br /&gt;
 smtpd_milters = inet:localhost:11332, local:/opendkim/opendkim.sock&lt;br /&gt;
 non_smtpd_milters = inet:localhost:11332, local:/opendkim/opendkim.sock&lt;br /&gt;
 milter_protocol = 6&lt;br /&gt;
 milter_mail_macros =  i {mail_addr} {client_addr} {client_name} {auth_authen}&lt;br /&gt;
 milter_default_action = accept&lt;br /&gt;
&lt;br /&gt;
and then restart postfix.&lt;br /&gt;
&lt;br /&gt;
Finally, enable rspamd service if everything seems to work properly&lt;br /&gt;
&amp;lt;code&amp;gt;$ sudo systemctl enable rspamd&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Remove spam confirmation requests ==&lt;br /&gt;
&lt;br /&gt;
Too many pending subscription requests can slow down[https://gitlab.com/mailman/postorius/-/issues/417] list index. Updating postorius is how to fix this. But in case there&#039;s no other way, and removing those requests through frontend [https://gitlab.com/mailman/mailman/-/issues/779#note_423132958] is impossible, this can be done (GNU Mailman 3.2.2 (La Villa Strangiato)):&lt;br /&gt;
&lt;br /&gt;
 $ sudo mailman shell -l listname.lists.fsci.org.in&lt;br /&gt;
 Welcome to the GNU Mailman shell&lt;br /&gt;
 The variable &#039;m&#039; is the listname@lists.fsci.org.in mailing list&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from zope.component import getUtility&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.interfaces.pending import IPendings&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; pendings = getUtility(IPendings)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; plist = []&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for p in pendings.find(m):&lt;br /&gt;
 ...   plist.append(p)&lt;br /&gt;
 ... &lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; len(plist)&lt;br /&gt;
 2047&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Let us save the spammer email and when they signed up for analysis&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; import csv&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; with open(&#039;spam.csv&#039;, &#039;w&#039;, newline=&#039;&#039;) as csvfile:&lt;br /&gt;
 ...     spamwriter = csv.writer(csvfile, delimiter=&#039;,&#039;)&lt;br /&gt;
 ...     for p in plist:&lt;br /&gt;
 ...         spammer = p[1]&lt;br /&gt;
 ...         spamwriter.writerow([spammer.get(&#039;email&#039;), spammer.get(&#039;when&#039;), spammer.get(&#039;display_name&#039;)])&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Now on to actually removing spam&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.interfaces.workflow import IWorkflowStateManager&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; workflow = getUtility(IWorkflowStateManager)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for p in plist:&lt;br /&gt;
 ...     token = p[0]&lt;br /&gt;
 ...     pendings.confirm(token)&lt;br /&gt;
 ...     workflow.discard(token)&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Now, we have to commit this transaction to database&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.config import config&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; config.db.commit()&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category: Services]]&lt;/div&gt;</summary>
		<author><name>Abbyck</name></author>
	</entry>
	<entry>
		<id>https://wiki.fsci.in/index.php?title=Mailing_list&amp;diff=10990</id>
		<title>Mailing list</title>
		<link rel="alternate" type="text/html" href="https://wiki.fsci.in/index.php?title=Mailing_list&amp;diff=10990"/>
		<updated>2021-03-30T08:21:15Z</updated>

		<summary type="html">&lt;p&gt;Abbyck: /* Machine Summary */  add spam filter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Mailing lists are very useful communication and coordination tool. FSCI provides mailing lists to Free Libre Open Source (FLOSS) groups and non profit organizations. If you want to open a new public list, please drop a mail at [mailto:postmaster@lists.fsci.org.in postmaster(at)lists.fsci.org.in].&lt;br /&gt;
&lt;br /&gt;
= Environment =&lt;br /&gt;
== Machine Summary ==&lt;br /&gt;
We are on [https://www.scaleway.com/virtual-cloud-servers scaleway] virtual cloud server.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| * Cores||: 2 x86 cores &lt;br /&gt;
|-&lt;br /&gt;
| * Memory||: 2GB&lt;br /&gt;
|-&lt;br /&gt;
|* Disk||: 50GB&lt;br /&gt;
|-&lt;br /&gt;
|* OS||: Debian GNU/Linux&lt;br /&gt;
|-&lt;br /&gt;
|* Web Server||: Nginx&lt;br /&gt;
|-&lt;br /&gt;
|* List manager||: Mailman3&lt;br /&gt;
|-&lt;br /&gt;
|* Spam Filter||: Rspamd&lt;br /&gt;
|-&lt;br /&gt;
|* Host name||: [https://lists.fsci.org.in lists.fsci.org.in]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Coordination =&lt;br /&gt;
&lt;br /&gt;
* Hangout with us in our Matrix room [https://matrix.to/#/#mailman:poddery.com #mailman:poddery.com]&lt;br /&gt;
* [https://git.fosscommunity.in/community/lists.fsci.org.in/issues issue tracker] - we use this to track progress of tasks&lt;br /&gt;
&lt;br /&gt;
== Admins ==&lt;br /&gt;
&lt;br /&gt;
Abhijith PA, Prinz Piuz, Balasankar C &lt;br /&gt;
&lt;br /&gt;
= Admin Documentation =&lt;br /&gt;
&lt;br /&gt;
== Generate DKIM for new domains ==&lt;br /&gt;
&lt;br /&gt;
We use &#039;opendkim&#039;[http://opendkim.org/] to implement DKIM.&lt;br /&gt;
To generate DKIM keys, use &amp;lt;code&amp;gt;opendkim-genkey -b 4096 -h rsa-sha256 -r -s &amp;lt;selector_name&amp;gt; -d &amp;lt;domain_name_of_this_list&amp;gt; -v`&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt; &lt;br /&gt;
We don&#039;t have any format on selector naming. Pick something related to this list(for eg: the selector for the domain lists.fsci.org.in  is &amp;lt;code&amp;gt;lists&amp;lt;/code&amp;gt; what we used).&lt;br /&gt;
After generating the DKIM keys, we will get two files.&lt;br /&gt;
* &amp;lt;selector_name&amp;gt;.private - which contains the private signing key.&lt;br /&gt;
* &amp;lt;selector_name&amp;gt;.txt - which contains the DKIM TXT DNS record for that domain.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Now, create a folder under &amp;lt;code&amp;gt;/etc/opendkim/keys/&amp;lt;domain_name_for_this_list&amp;gt;/&amp;lt;/code&amp;gt; and move the above file to that location.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Create an entry for the newly created domain in /etc/opendkim/KeyTable as well as /etc/opendkim/SigningTable&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
On /etc/opendkim/KeyTable&lt;br /&gt;
 &amp;lt;selector_name._domainkey.&amp;lt;domain_name_of_this_list&amp;gt; &amp;lt;domain_name_of_this_list&amp;gt;:&amp;lt;selector_name&amp;gt;:/etc/opendkim/keys/&amp;lt;domain_name_of_this_list&amp;gt;/&amp;lt;selector_name&amp;gt;.private&lt;br /&gt;
 eg: lists._domainkey.lists.fsci.org.in lists.fsci.org.in:lists:/etc/opendkim/lists.private&lt;br /&gt;
On /etc/opendkim/SigningTable&lt;br /&gt;
 &amp;lt;domain_name_of_this_list&amp;gt; &amp;lt;selector_name&amp;gt;._domainkey.&amp;lt;domain_name_of_this_list&amp;gt;&lt;br /&gt;
 eg: lists.fsci.org.in lists._domainkey.lists.fsci.org.in&lt;br /&gt;
More on DKIM keys, formating etc: [[https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail DomainKeys Identified Mail]], &lt;br /&gt;
Setup DKIM with OpenDKIM on Debian: [[https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-dkim-with-postfix-on-debian-wheezy How To Install and Configure DKIM with Postfix on Debian]]&lt;br /&gt;
&lt;br /&gt;
== Verify DKIM and other settings for new domains ==&lt;br /&gt;
&lt;br /&gt;
Create a text file, dkim-test.txt (replace To address with random address generated by https://dkimvalidator.com or https://www.mail-tester.com/)&lt;br /&gt;
&lt;br /&gt;
 From: &amp;quot;Test&amp;quot; &amp;lt;test-dkim@mm.gnu.org.in&amp;gt;&lt;br /&gt;
 To: &amp;lt;random-address&amp;gt;@dkimvalidator.com&lt;br /&gt;
 Subject: Testing DKIM and other settings for this domain&lt;br /&gt;
 Content-Type: text/plain; charset=utf-8&lt;br /&gt;
 Content-Transfer-Encoding: 8bit&lt;br /&gt;
 &lt;br /&gt;
 This email is to test email settings for a domain is correct&lt;br /&gt;
&lt;br /&gt;
and use sendmail command to send it&lt;br /&gt;
&lt;br /&gt;
/usr/sbin/sendmail -t &amp;lt; dkim-test.txt&lt;br /&gt;
&lt;br /&gt;
== Remove spam confirmation requests ==&lt;br /&gt;
&lt;br /&gt;
Too many pending subscription requests can slow down[https://gitlab.com/mailman/postorius/-/issues/417] list index. Updating postorius is how to fix this. But in case there&#039;s no other way, and removing those requests through frontend [https://gitlab.com/mailman/mailman/-/issues/779#note_423132958] is impossible, this can be done (GNU Mailman 3.2.2 (La Villa Strangiato)):&lt;br /&gt;
&lt;br /&gt;
 $ sudo mailman shell -l listname.lists.fsci.org.in&lt;br /&gt;
 Welcome to the GNU Mailman shell&lt;br /&gt;
 The variable &#039;m&#039; is the listname@lists.fsci.org.in mailing list&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from zope.component import getUtility&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.interfaces.pending import IPendings&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; pendings = getUtility(IPendings)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; plist = []&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for p in pendings.find(m):&lt;br /&gt;
 ...   plist.append(p)&lt;br /&gt;
 ... &lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; len(plist)&lt;br /&gt;
 2047&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Let us save the spammer email and when they signed up for analysis&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; import csv&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; with open(&#039;spam.csv&#039;, &#039;w&#039;, newline=&#039;&#039;) as csvfile:&lt;br /&gt;
 ...     spamwriter = csv.writer(csvfile, delimiter=&#039;,&#039;)&lt;br /&gt;
 ...     for p in plist:&lt;br /&gt;
 ...         spammer = p[1]&lt;br /&gt;
 ...         spamwriter.writerow([spammer.get(&#039;email&#039;), spammer.get(&#039;when&#039;), spammer.get(&#039;display_name&#039;)])&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Now on to actually removing spam&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.interfaces.workflow import IWorkflowStateManager&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; workflow = getUtility(IWorkflowStateManager)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for p in plist:&lt;br /&gt;
 ...     token = p[0]&lt;br /&gt;
 ...     pendings.confirm(token)&lt;br /&gt;
 ...     workflow.discard(token)&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Now, we have to commit this transaction to database&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.config import config&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; config.db.commit()&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category: Services]]&lt;/div&gt;</summary>
		<author><name>Abbyck</name></author>
	</entry>
	<entry>
		<id>https://wiki.fsci.in/index.php?title=Mailing_list&amp;diff=10989</id>
		<title>Mailing list</title>
		<link rel="alternate" type="text/html" href="https://wiki.fsci.in/index.php?title=Mailing_list&amp;diff=10989"/>
		<updated>2021-03-30T08:18:51Z</updated>

		<summary type="html">&lt;p&gt;Abbyck: /* Generate DKIM for new domains */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Mailing lists are very useful communication and coordination tool. FSCI provides mailing lists to Free Libre Open Source (FLOSS) groups and non profit organizations. If you want to open a new public list, please drop a mail at [mailto:postmaster@lists.fsci.org.in postmaster(at)lists.fsci.org.in].&lt;br /&gt;
&lt;br /&gt;
= Environment =&lt;br /&gt;
== Machine Summary ==&lt;br /&gt;
We are on [https://www.scaleway.com/virtual-cloud-servers scaleway] virtual cloud server.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| * Cores||: 2 x86 cores &lt;br /&gt;
|-&lt;br /&gt;
| * Memory||: 2GB&lt;br /&gt;
|-&lt;br /&gt;
|* Disk||: 50GB&lt;br /&gt;
|-&lt;br /&gt;
|* OS||: Debian GNU/Linux&lt;br /&gt;
|-&lt;br /&gt;
|* Web Server||: Nginx&lt;br /&gt;
|-&lt;br /&gt;
|* List manager||: Mailman3&lt;br /&gt;
|-&lt;br /&gt;
|* Host name||: [https://lists.fsci.org.in lists.fsci.org.in]&lt;br /&gt;
|}&lt;br /&gt;
= Coordination =&lt;br /&gt;
&lt;br /&gt;
* Hangout with us in our Matrix room [https://matrix.to/#/#mailman:poddery.com #mailman:poddery.com]&lt;br /&gt;
* [https://git.fosscommunity.in/community/lists.fsci.org.in/issues issue tracker] - we use this to track progress of tasks&lt;br /&gt;
&lt;br /&gt;
== Admins ==&lt;br /&gt;
&lt;br /&gt;
Abhijith PA, Prinz Piuz, Balasankar C &lt;br /&gt;
&lt;br /&gt;
= Admin Documentation =&lt;br /&gt;
&lt;br /&gt;
== Generate DKIM for new domains ==&lt;br /&gt;
&lt;br /&gt;
We use &#039;opendkim&#039;[http://opendkim.org/] to implement DKIM.&lt;br /&gt;
To generate DKIM keys, use &amp;lt;code&amp;gt;opendkim-genkey -b 4096 -h rsa-sha256 -r -s &amp;lt;selector_name&amp;gt; -d &amp;lt;domain_name_of_this_list&amp;gt; -v`&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt; &lt;br /&gt;
We don&#039;t have any format on selector naming. Pick something related to this list(for eg: the selector for the domain lists.fsci.org.in  is &amp;lt;code&amp;gt;lists&amp;lt;/code&amp;gt; what we used).&lt;br /&gt;
After generating the DKIM keys, we will get two files.&lt;br /&gt;
* &amp;lt;selector_name&amp;gt;.private - which contains the private signing key.&lt;br /&gt;
* &amp;lt;selector_name&amp;gt;.txt - which contains the DKIM TXT DNS record for that domain.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Now, create a folder under &amp;lt;code&amp;gt;/etc/opendkim/keys/&amp;lt;domain_name_for_this_list&amp;gt;/&amp;lt;/code&amp;gt; and move the above file to that location.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Create an entry for the newly created domain in /etc/opendkim/KeyTable as well as /etc/opendkim/SigningTable&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
On /etc/opendkim/KeyTable&lt;br /&gt;
 &amp;lt;selector_name._domainkey.&amp;lt;domain_name_of_this_list&amp;gt; &amp;lt;domain_name_of_this_list&amp;gt;:&amp;lt;selector_name&amp;gt;:/etc/opendkim/keys/&amp;lt;domain_name_of_this_list&amp;gt;/&amp;lt;selector_name&amp;gt;.private&lt;br /&gt;
 eg: lists._domainkey.lists.fsci.org.in lists.fsci.org.in:lists:/etc/opendkim/lists.private&lt;br /&gt;
On /etc/opendkim/SigningTable&lt;br /&gt;
 &amp;lt;domain_name_of_this_list&amp;gt; &amp;lt;selector_name&amp;gt;._domainkey.&amp;lt;domain_name_of_this_list&amp;gt;&lt;br /&gt;
 eg: lists.fsci.org.in lists._domainkey.lists.fsci.org.in&lt;br /&gt;
More on DKIM keys, formating etc: [[https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail DomainKeys Identified Mail]], &lt;br /&gt;
Setup DKIM with OpenDKIM on Debian: [[https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-dkim-with-postfix-on-debian-wheezy How To Install and Configure DKIM with Postfix on Debian]]&lt;br /&gt;
&lt;br /&gt;
== Verify DKIM and other settings for new domains ==&lt;br /&gt;
&lt;br /&gt;
Create a text file, dkim-test.txt (replace To address with random address generated by https://dkimvalidator.com or https://www.mail-tester.com/)&lt;br /&gt;
&lt;br /&gt;
 From: &amp;quot;Test&amp;quot; &amp;lt;test-dkim@mm.gnu.org.in&amp;gt;&lt;br /&gt;
 To: &amp;lt;random-address&amp;gt;@dkimvalidator.com&lt;br /&gt;
 Subject: Testing DKIM and other settings for this domain&lt;br /&gt;
 Content-Type: text/plain; charset=utf-8&lt;br /&gt;
 Content-Transfer-Encoding: 8bit&lt;br /&gt;
 &lt;br /&gt;
 This email is to test email settings for a domain is correct&lt;br /&gt;
&lt;br /&gt;
and use sendmail command to send it&lt;br /&gt;
&lt;br /&gt;
/usr/sbin/sendmail -t &amp;lt; dkim-test.txt&lt;br /&gt;
&lt;br /&gt;
== Remove spam confirmation requests ==&lt;br /&gt;
&lt;br /&gt;
Too many pending subscription requests can slow down[https://gitlab.com/mailman/postorius/-/issues/417] list index. Updating postorius is how to fix this. But in case there&#039;s no other way, and removing those requests through frontend [https://gitlab.com/mailman/mailman/-/issues/779#note_423132958] is impossible, this can be done (GNU Mailman 3.2.2 (La Villa Strangiato)):&lt;br /&gt;
&lt;br /&gt;
 $ sudo mailman shell -l listname.lists.fsci.org.in&lt;br /&gt;
 Welcome to the GNU Mailman shell&lt;br /&gt;
 The variable &#039;m&#039; is the listname@lists.fsci.org.in mailing list&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from zope.component import getUtility&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.interfaces.pending import IPendings&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; pendings = getUtility(IPendings)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; plist = []&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for p in pendings.find(m):&lt;br /&gt;
 ...   plist.append(p)&lt;br /&gt;
 ... &lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; len(plist)&lt;br /&gt;
 2047&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Let us save the spammer email and when they signed up for analysis&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; import csv&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; with open(&#039;spam.csv&#039;, &#039;w&#039;, newline=&#039;&#039;) as csvfile:&lt;br /&gt;
 ...     spamwriter = csv.writer(csvfile, delimiter=&#039;,&#039;)&lt;br /&gt;
 ...     for p in plist:&lt;br /&gt;
 ...         spammer = p[1]&lt;br /&gt;
 ...         spamwriter.writerow([spammer.get(&#039;email&#039;), spammer.get(&#039;when&#039;), spammer.get(&#039;display_name&#039;)])&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Now on to actually removing spam&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.interfaces.workflow import IWorkflowStateManager&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; workflow = getUtility(IWorkflowStateManager)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for p in plist:&lt;br /&gt;
 ...     token = p[0]&lt;br /&gt;
 ...     pendings.confirm(token)&lt;br /&gt;
 ...     workflow.discard(token)&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Now, we have to commit this transaction to database&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.config import config&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; config.db.commit()&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category: Services]]&lt;/div&gt;</summary>
		<author><name>Abbyck</name></author>
	</entry>
	<entry>
		<id>https://wiki.fsci.in/index.php?title=Mailing_list&amp;diff=10988</id>
		<title>Mailing list</title>
		<link rel="alternate" type="text/html" href="https://wiki.fsci.in/index.php?title=Mailing_list&amp;diff=10988"/>
		<updated>2021-03-30T08:17:22Z</updated>

		<summary type="html">&lt;p&gt;Abbyck: /* Generate DKIM for new domains */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Mailing lists are very useful communication and coordination tool. FSCI provides mailing lists to Free Libre Open Source (FLOSS) groups and non profit organizations. If you want to open a new public list, please drop a mail at [mailto:postmaster@lists.fsci.org.in postmaster(at)lists.fsci.org.in].&lt;br /&gt;
&lt;br /&gt;
= Environment =&lt;br /&gt;
== Machine Summary ==&lt;br /&gt;
We are on [https://www.scaleway.com/virtual-cloud-servers scaleway] virtual cloud server.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| * Cores||: 2 x86 cores &lt;br /&gt;
|-&lt;br /&gt;
| * Memory||: 2GB&lt;br /&gt;
|-&lt;br /&gt;
|* Disk||: 50GB&lt;br /&gt;
|-&lt;br /&gt;
|* OS||: Debian GNU/Linux&lt;br /&gt;
|-&lt;br /&gt;
|* Web Server||: Nginx&lt;br /&gt;
|-&lt;br /&gt;
|* List manager||: Mailman3&lt;br /&gt;
|-&lt;br /&gt;
|* Host name||: [https://lists.fsci.org.in lists.fsci.org.in]&lt;br /&gt;
|}&lt;br /&gt;
= Coordination =&lt;br /&gt;
&lt;br /&gt;
* Hangout with us in our Matrix room [https://matrix.to/#/#mailman:poddery.com #mailman:poddery.com]&lt;br /&gt;
* [https://git.fosscommunity.in/community/lists.fsci.org.in/issues issue tracker] - we use this to track progress of tasks&lt;br /&gt;
&lt;br /&gt;
== Admins ==&lt;br /&gt;
&lt;br /&gt;
Abhijith PA, Prinz Piuz, Balasankar C &lt;br /&gt;
&lt;br /&gt;
= Admin Documentation =&lt;br /&gt;
&lt;br /&gt;
== Generate DKIM for new domains ==&lt;br /&gt;
&lt;br /&gt;
We use &#039;opendkim&#039;[http://opendkim.org/] to implement DKIM.&lt;br /&gt;
To generate DKIM keys, use &amp;lt;code&amp;gt;opendkim-genkey -b 4096 -h rsa-sha256 -r -s &amp;lt;selector_name&amp;gt; -d &amp;lt;domain_name_of_this_list&amp;gt; -v`&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt; &lt;br /&gt;
We don&#039;t have any format on selector naming. Pick something related to this list(for eg: the selector for the domain lists.fsci.org.in  is &amp;lt;code&amp;gt;lists&amp;lt;/code&amp;gt; what we used).&lt;br /&gt;
After generating the DKIM keys, we will get two files.&lt;br /&gt;
* &amp;lt;selector_name&amp;gt;.private - which contains the private signing key.&lt;br /&gt;
* &amp;lt;selector_name&amp;gt;.txt - which contains the DKIM TXT DNS record for that domain.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Now, create a folder under /etc/opendkim/keys/&amp;lt;domain_name_for_this_list&amp;gt;/ and move the above file to that location.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Create an entry for the newly created domain in /etc/opendkim/KeyTable as well as /etc/opendkim/SigningTable&lt;br /&gt;
&amp;lt;be /&amp;gt;&lt;br /&gt;
On /etc/opendkim/KeyTable&lt;br /&gt;
 &amp;lt;selector_name._domainkey.&amp;lt;domain_name_of_this_list&amp;gt; &amp;lt;domain_name_of_this_list&amp;gt;:&amp;lt;selector_name&amp;gt;:/etc/opendkim/keys/&amp;lt;domain_name_of_this_list&amp;gt;/&amp;lt;selector_name&amp;gt;.private&lt;br /&gt;
 eg: lists._domainkey.lists.fsci.org.in lists.fsci.org.in:lists:/etc/opendkim/lists.private&lt;br /&gt;
On /etc/opendkim/SigningTable&lt;br /&gt;
 &amp;lt;domain_name_of_this_list&amp;gt; &amp;lt;selector_name&amp;gt;._domainkey.&amp;lt;domain_name_of_this_list&amp;gt;&lt;br /&gt;
 eg: lists.fsci.org.in lists._domainkey.lists.fsci.org.in&lt;br /&gt;
More on DKIM keys, formating etc: [[https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail DomainKeys Identified Mail]], &lt;br /&gt;
Setup DKIM with OpenDKIM on Debian: [[https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-dkim-with-postfix-on-debian-wheezy How To Install and Configure DKIM with Postfix on Debian]]&lt;br /&gt;
&lt;br /&gt;
== Verify DKIM and other settings for new domains ==&lt;br /&gt;
&lt;br /&gt;
Create a text file, dkim-test.txt (replace To address with random address generated by https://dkimvalidator.com or https://www.mail-tester.com/)&lt;br /&gt;
&lt;br /&gt;
 From: &amp;quot;Test&amp;quot; &amp;lt;test-dkim@mm.gnu.org.in&amp;gt;&lt;br /&gt;
 To: &amp;lt;random-address&amp;gt;@dkimvalidator.com&lt;br /&gt;
 Subject: Testing DKIM and other settings for this domain&lt;br /&gt;
 Content-Type: text/plain; charset=utf-8&lt;br /&gt;
 Content-Transfer-Encoding: 8bit&lt;br /&gt;
 &lt;br /&gt;
 This email is to test email settings for a domain is correct&lt;br /&gt;
&lt;br /&gt;
and use sendmail command to send it&lt;br /&gt;
&lt;br /&gt;
/usr/sbin/sendmail -t &amp;lt; dkim-test.txt&lt;br /&gt;
&lt;br /&gt;
== Remove spam confirmation requests ==&lt;br /&gt;
&lt;br /&gt;
Too many pending subscription requests can slow down[https://gitlab.com/mailman/postorius/-/issues/417] list index. Updating postorius is how to fix this. But in case there&#039;s no other way, and removing those requests through frontend [https://gitlab.com/mailman/mailman/-/issues/779#note_423132958] is impossible, this can be done (GNU Mailman 3.2.2 (La Villa Strangiato)):&lt;br /&gt;
&lt;br /&gt;
 $ sudo mailman shell -l listname.lists.fsci.org.in&lt;br /&gt;
 Welcome to the GNU Mailman shell&lt;br /&gt;
 The variable &#039;m&#039; is the listname@lists.fsci.org.in mailing list&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from zope.component import getUtility&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.interfaces.pending import IPendings&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; pendings = getUtility(IPendings)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; plist = []&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for p in pendings.find(m):&lt;br /&gt;
 ...   plist.append(p)&lt;br /&gt;
 ... &lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; len(plist)&lt;br /&gt;
 2047&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Let us save the spammer email and when they signed up for analysis&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; import csv&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; with open(&#039;spam.csv&#039;, &#039;w&#039;, newline=&#039;&#039;) as csvfile:&lt;br /&gt;
 ...     spamwriter = csv.writer(csvfile, delimiter=&#039;,&#039;)&lt;br /&gt;
 ...     for p in plist:&lt;br /&gt;
 ...         spammer = p[1]&lt;br /&gt;
 ...         spamwriter.writerow([spammer.get(&#039;email&#039;), spammer.get(&#039;when&#039;), spammer.get(&#039;display_name&#039;)])&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Now on to actually removing spam&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.interfaces.workflow import IWorkflowStateManager&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; workflow = getUtility(IWorkflowStateManager)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for p in plist:&lt;br /&gt;
 ...     token = p[0]&lt;br /&gt;
 ...     pendings.confirm(token)&lt;br /&gt;
 ...     workflow.discard(token)&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Now, we have to commit this transaction to database&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.config import config&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; config.db.commit()&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category: Services]]&lt;/div&gt;</summary>
		<author><name>Abbyck</name></author>
	</entry>
	<entry>
		<id>https://wiki.fsci.in/index.php?title=Mailing_list&amp;diff=10987</id>
		<title>Mailing list</title>
		<link rel="alternate" type="text/html" href="https://wiki.fsci.in/index.php?title=Mailing_list&amp;diff=10987"/>
		<updated>2021-03-30T08:16:39Z</updated>

		<summary type="html">&lt;p&gt;Abbyck: Add DKIM setup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Mailing lists are very useful communication and coordination tool. FSCI provides mailing lists to Free Libre Open Source (FLOSS) groups and non profit organizations. If you want to open a new public list, please drop a mail at [mailto:postmaster@lists.fsci.org.in postmaster(at)lists.fsci.org.in].&lt;br /&gt;
&lt;br /&gt;
= Environment =&lt;br /&gt;
== Machine Summary ==&lt;br /&gt;
We are on [https://www.scaleway.com/virtual-cloud-servers scaleway] virtual cloud server.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| * Cores||: 2 x86 cores &lt;br /&gt;
|-&lt;br /&gt;
| * Memory||: 2GB&lt;br /&gt;
|-&lt;br /&gt;
|* Disk||: 50GB&lt;br /&gt;
|-&lt;br /&gt;
|* OS||: Debian GNU/Linux&lt;br /&gt;
|-&lt;br /&gt;
|* Web Server||: Nginx&lt;br /&gt;
|-&lt;br /&gt;
|* List manager||: Mailman3&lt;br /&gt;
|-&lt;br /&gt;
|* Host name||: [https://lists.fsci.org.in lists.fsci.org.in]&lt;br /&gt;
|}&lt;br /&gt;
= Coordination =&lt;br /&gt;
&lt;br /&gt;
* Hangout with us in our Matrix room [https://matrix.to/#/#mailman:poddery.com #mailman:poddery.com]&lt;br /&gt;
* [https://git.fosscommunity.in/community/lists.fsci.org.in/issues issue tracker] - we use this to track progress of tasks&lt;br /&gt;
&lt;br /&gt;
== Admins ==&lt;br /&gt;
&lt;br /&gt;
Abhijith PA, Prinz Piuz, Balasankar C &lt;br /&gt;
&lt;br /&gt;
= Admin Documentation =&lt;br /&gt;
&lt;br /&gt;
== Generate DKIM for new domains ==&lt;br /&gt;
&lt;br /&gt;
We use &#039;opendkim&#039;[http://opendkim.org/] to implement DKIM.&lt;br /&gt;
To generate DKIM keys, use &amp;lt;code&amp;gt;opendkim-genkey -b 4096 -h rsa-sha256 -r -s &amp;lt;selector_name&amp;gt; -d &amp;lt;domain_name_of_this_list&amp;gt; -v`&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt; &lt;br /&gt;
We don&#039;t have any format on selector naming. Pick something related to this list(for eg: the selector for the domain lists.fsci.org.in  is &amp;lt;code&amp;gt;lists&amp;lt;/code&amp;gt; what we used).&lt;br /&gt;
After generating the DKIM keys, we will get two files.&lt;br /&gt;
* &amp;lt;selector_name&amp;gt;.private - which contains the private signing key.&lt;br /&gt;
* &amp;lt;selector_name&amp;gt;.txt - which contains the DKIM TXT DNS record for that domain.&lt;br /&gt;
&amp;lt;be /&amp;gt;&lt;br /&gt;
Now, create a folder under /etc/opendkim/keys/&amp;lt;domain_name_for_this_list&amp;gt;/ and move the above file to that location.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Create an entry for the newly created domain in /etc/opendkim/KeyTable as well as /etc/opendkim/SigningTable&lt;br /&gt;
&amp;lt;be /&amp;gt;&lt;br /&gt;
On /etc/opendkim/KeyTable&lt;br /&gt;
 &amp;lt;selector_name._domainkey.&amp;lt;domain_name_of_this_list&amp;gt; &amp;lt;domain_name_of_this_list&amp;gt;:&amp;lt;selector_name&amp;gt;:/etc/opendkim/keys/&amp;lt;domain_name_of_this_list&amp;gt;/&amp;lt;selector_name&amp;gt;.private&lt;br /&gt;
 eg: lists._domainkey.lists.fsci.org.in lists.fsci.org.in:lists:/etc/opendkim/lists.private&lt;br /&gt;
On /etc/opendkim/SigningTable&lt;br /&gt;
 &amp;lt;domain_name_of_this_list&amp;gt; &amp;lt;selector_name&amp;gt;._domainkey.&amp;lt;domain_name_of_this_list&amp;gt;&lt;br /&gt;
 eg: lists.fsci.org.in lists._domainkey.lists.fsci.org.in&lt;br /&gt;
More on DKIM keys, formating etc: [[https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail DomainKeys Identified Mail]], &lt;br /&gt;
Setup DKIM with OpenDKIM on Debian: [[https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-dkim-with-postfix-on-debian-wheezy How To Install and Configure DKIM with Postfix on Debian]]&lt;br /&gt;
&lt;br /&gt;
== Verify DKIM and other settings for new domains ==&lt;br /&gt;
&lt;br /&gt;
Create a text file, dkim-test.txt (replace To address with random address generated by https://dkimvalidator.com or https://www.mail-tester.com/)&lt;br /&gt;
&lt;br /&gt;
 From: &amp;quot;Test&amp;quot; &amp;lt;test-dkim@mm.gnu.org.in&amp;gt;&lt;br /&gt;
 To: &amp;lt;random-address&amp;gt;@dkimvalidator.com&lt;br /&gt;
 Subject: Testing DKIM and other settings for this domain&lt;br /&gt;
 Content-Type: text/plain; charset=utf-8&lt;br /&gt;
 Content-Transfer-Encoding: 8bit&lt;br /&gt;
 &lt;br /&gt;
 This email is to test email settings for a domain is correct&lt;br /&gt;
&lt;br /&gt;
and use sendmail command to send it&lt;br /&gt;
&lt;br /&gt;
/usr/sbin/sendmail -t &amp;lt; dkim-test.txt&lt;br /&gt;
&lt;br /&gt;
== Remove spam confirmation requests ==&lt;br /&gt;
&lt;br /&gt;
Too many pending subscription requests can slow down[https://gitlab.com/mailman/postorius/-/issues/417] list index. Updating postorius is how to fix this. But in case there&#039;s no other way, and removing those requests through frontend [https://gitlab.com/mailman/mailman/-/issues/779#note_423132958] is impossible, this can be done (GNU Mailman 3.2.2 (La Villa Strangiato)):&lt;br /&gt;
&lt;br /&gt;
 $ sudo mailman shell -l listname.lists.fsci.org.in&lt;br /&gt;
 Welcome to the GNU Mailman shell&lt;br /&gt;
 The variable &#039;m&#039; is the listname@lists.fsci.org.in mailing list&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from zope.component import getUtility&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.interfaces.pending import IPendings&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; pendings = getUtility(IPendings)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; plist = []&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for p in pendings.find(m):&lt;br /&gt;
 ...   plist.append(p)&lt;br /&gt;
 ... &lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; len(plist)&lt;br /&gt;
 2047&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Let us save the spammer email and when they signed up for analysis&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; import csv&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; with open(&#039;spam.csv&#039;, &#039;w&#039;, newline=&#039;&#039;) as csvfile:&lt;br /&gt;
 ...     spamwriter = csv.writer(csvfile, delimiter=&#039;,&#039;)&lt;br /&gt;
 ...     for p in plist:&lt;br /&gt;
 ...         spammer = p[1]&lt;br /&gt;
 ...         spamwriter.writerow([spammer.get(&#039;email&#039;), spammer.get(&#039;when&#039;), spammer.get(&#039;display_name&#039;)])&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Now on to actually removing spam&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.interfaces.workflow import IWorkflowStateManager&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; workflow = getUtility(IWorkflowStateManager)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for p in plist:&lt;br /&gt;
 ...     token = p[0]&lt;br /&gt;
 ...     pendings.confirm(token)&lt;br /&gt;
 ...     workflow.discard(token)&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; # Now, we have to commit this transaction to database&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; from mailman.config import config&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; config.db.commit()&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category: Services]]&lt;/div&gt;</summary>
		<author><name>Abbyck</name></author>
	</entry>
</feed>