User Tools

Site Tools


mailman

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
mailman [2022/07/19 21:13] – external edit 127.0.0.1mailman [2022/07/24 16:56] (current) admin
Line 5: Line 5:
  
 ===== 1. Install Mailman & required Apps ===== ===== 1. Install Mailman & required Apps =====
 +<code>
  apt-get install mailman  apt-get install mailman
- apt-get install postfix  <nowiki>//</nowiki>exim is default in debian. + apt-get install postfix  #exim is default in debian. 
- apt-get install apache2 <nowiki>//</nowiki>if its not already installed.+ apt-get install apache2  #if its not already installed. 
 +</code>
  
 Accept the languages you require, and complete the install. The install will instruct you to run "newlist mailman" to setup the main mailman account/list for moderating emails etc. etc. Before running "newlist mailman" configure mailman to use your URL/address. Accept the languages you require, and complete the install. The install will instruct you to run "newlist mailman" to setup the main mailman account/list for moderating emails etc. etc. Before running "newlist mailman" configure mailman to use your URL/address.
  
 ===== 2. Configure Mailman ===== ===== 2. Configure Mailman =====
 +<code>
  vi /etc/mailman/mm_cfg.py  vi /etc/mailman/mm_cfg.py
  DEFAULT_EMAIL_HOST = 'lists.server.com'  DEFAULT_EMAIL_HOST = 'lists.server.com'
  DEFAULT_URL_HOST   = 'lists.server.com'  DEFAULT_URL_HOST   = 'lists.server.com'
 +</code>
  
 ===== 3. Setup initial Mailman list ===== ===== 3. Setup initial Mailman list =====
 +<code>
  newlist mailman  newlist mailman
 +</code>
  
-After specifying an email, full name and password, it will instruct you to insert the following lines into /etc/alias+After specifying an email, full name and password, it will instruct you to insert the following lines into  
 +<code>/etc/alias
  ## mailman mailing list  ## mailman mailing list
  mailman:              "|/var/lib/mailman/mail/mailman post mailman"  mailman:              "|/var/lib/mailman/mail/mailman post mailman"
Line 25: Line 32:
  etc. etc. etc. etc. The full list will be outputted by the newlist mailman script run previously.  etc. etc. etc. etc. The full list will be outputted by the newlist mailman script run previously.
  
- newaliases <nowiki>//</nowiki>regenerate aliases+ newaliases        #regenerate aliases
  /etc/init.d/mailman start  /etc/init.d/mailman start
  
- ps -eaf <nowiki>//</nowiki>to view all the mailman processes.+ ps -eaf           #to view all the mailman processes. 
 +</code>
  
 ===== 4. Configure Apache2 for Mailman ===== ===== 4. Configure Apache2 for Mailman =====
 Mailman did not automatically configure apache2 for me. It did however place the relevant apache2.conf in /etc/mailman/apache2.conf. I took this file, edited it and placed it in /etc/apache2/sites-available/lists The main lines were: Mailman did not automatically configure apache2 for me. It did however place the relevant apache2.conf in /etc/mailman/apache2.conf. I took this file, edited it and placed it in /etc/apache2/sites-available/lists The main lines were:
 +<code>
  ScriptAlias /cgi-bin/mailman/ /usr/lib/cgi-bin/mailman/  ScriptAlias /cgi-bin/mailman/ /usr/lib/cgi-bin/mailman/
  Alias /pipermail/ /var/lib/mailman/archives/public/  Alias /pipermail/ /var/lib/mailman/archives/public/
Line 64: Line 73:
  #All other lines are commented out.  #All other lines are commented out.
  </VirtualHost>  </VirtualHost>
 +</code>
  
 Heading to the URL http://lists.server.com now worked fine, and I could browse and see the previously created mailman list -) Heading to the URL http://lists.server.com now worked fine, and I could browse and see the previously created mailman list -)
Line 69: Line 79:
 ===== 5. DNS Config for Mailman Server ===== ===== 5. DNS Config for Mailman Server =====
 There are two DNS entries for lists.server.com. 1 is the mx (mail record) and the second is a A record. On the server running bind, the following additions were made: There are two DNS entries for lists.server.com. 1 is the mx (mail record) and the second is a A record. On the server running bind, the following additions were made:
 +<code>
  
  ;Main Domains  ;Main Domains
Line 75: Line 86:
  ;Main Sub Mail Domains  ;Main Sub Mail Domains
  lists           MX      5       lists  lists           MX      5       lists
 +</code>
 Note: My initial zone file was incorrect! The Sub Main Domain will only work if all is configured correctly. Take a look at [[DNS_-_Bind9]] to find out more on DNS and bind configuration. Make sure to restart bind. Note: My initial zone file was incorrect! The Sub Main Domain will only work if all is configured correctly. Take a look at [[DNS_-_Bind9]] to find out more on DNS and bind configuration. Make sure to restart bind.
 The tools used to check that the mx for lists.server.com was correct were: The tools used to check that the mx for lists.server.com was correct were:
 +<code>
  dig -t mx lists.server.com  dig -t mx lists.server.com
    
Line 86: Line 99:
  http://www.dnsreport.com/  <nowiki>//</nowiki>very good.  http://www.dnsreport.com/  <nowiki>//</nowiki>very good.
  
 +</code>
 If dns is correct, then apache should serve out http://lists.server.ie Also try sending emails to the following addresses: If dns is correct, then apache should serve out http://lists.server.ie Also try sending emails to the following addresses:
 +<code>
  mailman at lists.server.com  mailman at lists.server.com
  root at lists.server.com  root at lists.server.com
 and see if they get through. Fingers crossed and they should. and see if they get through. Fingers crossed and they should.
 +</code>
  
 ===== 6. Login into Mailman Admin via Web ===== ===== 6. Login into Mailman Admin via Web =====
  http://lists.server.com/cgi-bin/mailman/admin/mailman  http://lists.server.com/cgi-bin/mailman/admin/mailman
 +
 Login with the password initially used to run newlist mailman. It also should have been emailed to you. Approve the emails if they made it through, and then view the Archives to see if the email comes through. Login with the password initially used to run newlist mailman. It also should have been emailed to you. Approve the emails if they made it through, and then view the Archives to see if the email comes through.
  
 ===== 7. Configure postfix on server.com ===== ===== 7. Configure postfix on server.com =====
 This problem only affected postfix when sending emails from server.com to lists.server.com When sending emails via postfix and smtpd, it picked up the mx/mail server as been server.com instead of going off to lists.server.com. So somehow postfix was not looking up subdomains or wouldnt send emails to subdomains. The line required to fix this in /etc/postfix/main.cf was: This problem only affected postfix when sending emails from server.com to lists.server.com When sending emails via postfix and smtpd, it picked up the mx/mail server as been server.com instead of going off to lists.server.com. So somehow postfix was not looking up subdomains or wouldnt send emails to subdomains. The line required to fix this in /etc/postfix/main.cf was:
 +<code>
  parent_domain_matches_subdomains =  parent_domain_matches_subdomains =
 +</code>
  
 This solved the problem, with the help of http://www.irbs.net/internet/postfix/0401/0705.html -) This solved the problem, with the help of http://www.irbs.net/internet/postfix/0401/0705.html -)
Line 103: Line 122:
 ===== 8. Delete Posts from Mailman Archive ===== ===== 8. Delete Posts from Mailman Archive =====
 The location of mailman archives may change, but the method is the exact same. The location of mailman archives may change, but the method is the exact same.
 +<code>
  cd /var/lib/mailman/archives  cd /var/lib/mailman/archives
  cd private  cd private
 +</code>
  
 Private should be the source, and public is a folder with symbolic links coming out of private. Therefore if private is edited/changed, public will be too. Private should be the source, and public is a folder with symbolic links coming out of private. Therefore if private is edited/changed, public will be too.
 +<code>
  cd listname.mbox  cd listname.mbox
  vi listname.mbox  vi listname.mbox
- <nowiki>//</nowiki>delete the entry manually. Each message/entry begins with: From:.....  and ends with a blank line!+ #delete the entry manually. Each message/entry begins with: From:.....  and ends with a blank line!
  cd /var/lib/mailman/archives/private  cd /var/lib/mailman/archives/private
- mv listname listnameold  <nowiki>//</nowiki>move the old archives to an old directory, or delete them etc.+ mv listname listnameold  #move the old archives to an old directory, or delete them etc.
  cd /var/lib/mailman/  cd /var/lib/mailman/
- ./bin/arch listname    <nowiki>//</nowiki>rebuild and rearchive messages from the listname.mbox file edited earlier.+ ./bin/arch listname      #rebuild and rearchive messages from the listname.mbox file edited earlier. 
 +</code>
  
 Go back into the archives via the web and all should be ok. More info on deleteing entries at: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq03.003.htp Go back into the archives via the web and all should be ok. More info on deleteing entries at: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq03.003.htp
Line 119: Line 142:
 More Information at (not really needed): More Information at (not really needed):
  
-http://www.debianhelp.co.uk/mailman.htm +  * http://www.debianhelp.co.uk/mailman.htm 
- +  http://www.debian-administration.org/articles/108
-http://www.debian-administration.org/articles/108+
  
 ===== Admin Mailman via the command line ===== ===== Admin Mailman via the command line =====
 So I didn't know the mailman admin password for the front end, and I didn't want to change it to lock out the other admin. I wanted to add an Admin to a list. So I didn't know the mailman admin password for the front end, and I didn't want to change it to lock out the other admin. I wanted to add an Admin to a list.
 +<code>
  
  vi mman  vi mman
Line 131: Line 154:
  config_list -i mman name-of-list  config_list -i mman name-of-list
 Done. Done.
 +</code>
 There are a lot of other options available. See: There are a lot of other options available. See:
  
-http://mail.python.org/pipermail/mailman-users/2005-December/047993.html  <br> +  * http://mail.python.org/pipermail/mailman-users/2005-December/047993.html  <br> 
-http://www.gnu.org/software/mailman/site.html <br> +  http://www.gnu.org/software/mailman/site.html <br> 
-http://www.ugcs.caltech.edu/Utility_mailman.xhtml+  http://www.ugcs.caltech.edu/Utility_mailman.xhtml
mailman.txt · Last modified: 2022/07/24 16:56 by admin