Differences between revisions 1 and 7 (spanning 6 versions)
Revision 1 as of 2008-01-08 03:27:38
Size: 5268
Editor: tlembke
Comment:
Revision 7 as of 2016-06-21 16:34:47
Size: 5859
Editor: msapiro
Comment: Fixed some typos.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma page-filename DOC/versions/3047435 #pragma page-filename DOC/versions/3047431
Line 6: Line 6:
==  Introduction ==
To be read in conjunction with the mailman installation instructions at
<
http://www.list.org/mailman-install/index.html>
and the post by Ed Greenberg at
<[[http://mail.python.org/pipermail/mailman-users/2004-June/037518.html]]><<BR>>
==  Introduction ==

To be read in conjunction with the mailman installation instructions at<<BR>> <[[http://www.list.org/mailman-install/index.html|http://www.list.org/mailman-install/index.html]]><<BR>> and the post by Ed Greenberg at<<BR>> <[[http://mail.python.org/pipermail/mailman-users/2004-June/037518.html|http://mail.python.org/pipermail/mailman-users/2004-June/037518.html]]><<BR>>
Line 12: Line 11:
Line 15: Line 15:
<<BR>>
Line 17: Line 17:
\#adduser
{{{
#adduser
}}}
Line 21: Line 25:
Line 22: Line 27:
su#&nbsp; cd /usr/local/
su#&nbsp; mkdir mailman
su#&nbsp; chown mailman mailman

{{{
su# cd /usr/local/
su# mkdir mailman
su# chown mailman mailman
Line 29: Line 36:
}}}
Line 32: Line 40:
{{{
Line 33: Line 42:
}}}
Line 35: Line 45:

{{{
Line 36: Line 48:

You can ascertain the correct option for --with-mail-gid from /etc/
mail/sendmail.cf
}}}

You can ascertain the correct option for --with-mail-gid from /etc/<<BR>> mail/sendmail.cf

{{{
Line 43: Line 57:
su#&nbsp; su root
su#&nbsp;&nbsp; make clean
su#&nbsp; configure --with-mail-gid=mailnull
su# su root
su# make clean
su# configure \--with-mail-gid=mailnull
}}}
Line 47: Line 63:

{{{
Line 48: Line 66:
}}}
Line 50: Line 69:

{{{
Line 51: Line 72:
su# bin/check_perms -f su# bin/check_perms \-f
}}}
Line 54: Line 76:

{{{
Line 60: Line 85:
}}}
Line 62: Line 88:

{{{
Line 63: Line 91:
su# bin/check_perms -f su# bin/check_perms \-f
}}}
Line 66: Line 95:
Add this to your httpd-vhosts.conf, or httpd.conf depending on which&nbsp;
version of Apache you are using

<VirtualHost *:80>

Add this to your httpd-vhosts.conf, or httpd.conf depending on which <<BR>> version of Apache you are using

{{{
<VirtualHost \*:80>
Line 76: Line 106:
}}}
Line 80: Line 111:
Line 84: Line 116:
So I used Ed Greenberg's clever approach at
<[[http://mail.python.org/pipermail/mailman-users/2004-June/037518.html]]>
which seems better to me anyway.
So I used Ed Greenberg's clever approach at<<BR>> <[[http://mail.python.org/pipermail/mailman-users/2004-June/037518.html|http://mail.python.org/pipermail/mailman-users/2004-June/037518.html]]><<BR>> which seems better to me anyway.
Line 90: Line 120:
create the file /usr/sbin/mailman.aliases c create the file /usr/sbin/mailman.aliases

{{{
Line 92: Line 124:
}}}
Line 94: Line 128:
{{{
Line 96: Line 131:

Note: I spent a lot of time bug testing as I used 'cp' in the&nbsp;
mailman.aliases script rather than /usr/cp
(it worked from the command line but not the web interface)
}}}

Note: I spent a lot of time bug testing as I used 'cp' in the <<BR>> mailman.aliases script rather than /bin/cp<<BR>> (it worked from the command line but not the web interface)
Line 102: Line 136:

{{{
Line 103: Line 139:

Change your sendmail.cf file to include the new alias file
(for me, add this to medicine.net.au.mc)
define(`ALIAS_FILE', `/etc/mail/aliases,/etc/mail/mailman.aliases')
(and then as root)
}}}

Change your sendmail.cf file to include the new alias file<<BR>> (for me, add this to medicine.net.au.mc)<<BR>> define(`ALIAS_FILE', `/etc/mail/aliases,/etc/mail/mailman.aliases')<<BR>> (and then as root)

{{{
Line 109: Line 145:

Update your sudoers file ('nobody' is the user apache runs under -&nbsp;
check your httpd.conf)
}}}

Update your sudoers file ('nobody' is the user apache runs under - <<BR>> check your httpd.conf)

{{{
Line 116: Line 154:
}}}

Also, if you have

{{{
Defaults requiretty
}}}

in the sudoers file, you need to remove or comment it.
Line 118: Line 165:
Line 120: Line 168:
{{{
Line 128: Line 177:
POSTFIX_STYLE_VIRTUAL_DOMAINS = <<Verbatim([)>><<Verbatim(])>>

== Steps 8 - 15&nbsp; ==
POSTFIX_STYLE_VIRTUAL_DOMAINS = \[\]
}}}


== Steps 8 - 15  ==
Line 132: Line 183:
Follow the rest of the instructions from step 8 on at ->
<[[http://www.gnu.org/software/mailman/mailman-install/index.html]]>

Follow the rest of the instructions from step 8 on at -><<BR>> <[[http://www.gnu.org/software/mailman/mailman-install/index.html|http://www.gnu.org/software/mailman/mailman-install/index.html]]>
Line 136: Line 187:
When you create a list using /bin/newlist, you should find that the file /etc/mail/mailman.aliases has been created / updated.
(I had some permissions to sort out in a few directories before it all worked smoothly)
The error log is helpful at /usr/local/mailman/logs/error

When you create a list using /bin/newlist, you should find that the file /etc/mail/mailman.aliases has been created / updated.<<BR>> (I had some permissions to sort out in a few directories before it all worked smoothly)<<BR>> The error log is helpful at /usr/local/mailman/logs/error
Line 144: Line 194:
{{{
Line 147: Line 198:
Line 149: Line 201:
}}}
Line 152: Line 205:
{{{
Line 155: Line 209:
Line 156: Line 211:
" \| /bin/sendmail -tony@pi.com.au testlist@pi.com.au

Hope this helps someone and would welcome corrections or improvements.
&nbsp;
" \| /bin/sendmail \-tony@pi.com.au testlist@pi.com.au
}}}


Hope this helps someone and would welcome corrections or improvements.<<BR>>  

This method uses a 'Postfix' workaround.

See also Integrating Mailman with Sendmail - Method 1 which uses mm-handler.

Introduction

To be read in conjunction with the mailman installation instructions at
<http://www.list.org/mailman-install/index.html>
and the post by Ed Greenberg at
<http://mail.python.org/pipermail/mailman-users/2004-June/037518.html>

Step 1 - Installation requirements

I'm using Apache2, Mailman 2.19 and FreeBSD4 and Python 2.4

Step 2 - Set Up Your System

As root

#adduser

I used -> user: mailman, group:mailman, password: n

Step 3 - Build and Install Mailman

create Installation Directory (as root)

su# cd /usr/local/
su# mkdir mailman
su# chown mailman mailman
su# su mailman
su# cd mailman
su# chgrp mailnull .
su# chmod a+rx,g+ws .

Now, go to the directory where you have downloaded mailman

su# cd /usr/home/xxxxx/mailman-2.1.9

Change back to user root

su# su root

You can ascertain the correct option for --with-mail-gid from /etc/
mail/sendmail.cf

su# grep "DefaultUser" /etc/mail/sendmail.cf
=> #O DefaultUser=mailnull
So use mailnull

su# su root
su# make clean
su# configure \--with-mail-gid=mailnull

I'm on FreeBSD so use this command

su# make DIRSETGID=: install

Now check permissions

su# cd /usr/local/mailman
su# bin/check_perms \-f

My webserver runs as nobody (check httpd.conf on your system to confirm)

su# grep "User " /usr/local/apache2/conf/httpd.conf
=> User nobody

su# cd archives
su# chown nobody private
su# chmod o-x private

Step 4 - Check your installation

su# cd /usr/local/mailman
su# bin/check_perms \-f

Step 5 - Set up your webserver

Add this to your httpd-vhosts.conf, or httpd.conf depending on which 
version of Apache you are using

<VirtualHost \*:80>
ServerName lists.practiceimprovement.com.au
TransferLog /dev/null
DocumentRoot /usr/home/lists/htdocs/
ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
Alias&nbsp;&nbsp; /pipermail/ /usr/local/mailman/archives/public/
</VirtualHost>

and restart apache

Step 6 - Integrating sendmail and mailman

Integrating sendmail and mailman

mm-handler would not work for me (after considerable amount of time trying) - I think because by server was medicine.net.au and the address I wanted to use was practiceimprovement.org.au, even though practiceimprovement.org.au was correctly set up on dns to be delegated to the right server.

So I used Ed Greenberg's clever approach at
<http://mail.python.org/pipermail/mailman-users/2004-June/037518.html>
which seems better to me anyway.

Note: On Freebsd I first had to build sudo!

create the file /usr/sbin/mailman.aliases

su# pico /usr/bin/mailman.aliases

containing the lines below =>

/bin/cp /usr/local/mailman/data/aliases /etc/mail/mailman.aliases
/usr/bin/newaliases

Note: I spent a lot of time bug testing as I used 'cp' in the 
mailman.aliases script rather than /bin/cp
(it worked from the command line but not the web interface)

make it executable

su# chmod 755 /usr/sbin/mailman.aliases

Change your sendmail.cf file to include the new alias file
(for me, add this to medicine.net.au.mc)
define(ALIAS_FILE', /etc/mail/aliases,/etc/mail/mailman.aliases')
(and then as root)

su# /etc/mail/make install restart

Update your sudoers file ('nobody' is the user apache runs under - 
check your httpd.conf)

su# visudo
add=>
nobody ALL= NOPASSWD: /usr/local/sbin/mailman.aliases
mailman ALL= NOPASSWD: /usr/local/sbin/mailman.aliases

Also, if you have

Defaults requiretty

in the sudoers file, you need to remove or comment it.

Step 7 - Review your site defaults

my mm_cfg.py has these added

DEFAULT_EMAIL_HOST = 'practiceimprovement.com.au'
DEFAULT_URL_HOST = 'lists.practiceimprovement.com.au'
DEFAULT_URL_PATTERN = 'http://%s/mailman/'
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
IMAGE_LOGOS = '/images/'
MTA='Postfix'
POSTFIX_ALIAS_CMD = '/usr/local/bin/sudo /usr/local/sbin/
mailman.aliases'
POSTFIX_STYLE_VIRTUAL_DOMAINS = \[\]

Steps 8 - 15


Follow the rest of the instructions from step 8 on at ->
<http://www.gnu.org/software/mailman/mailman-install/index.html>

Testing

When you create a list using /bin/newlist, you should find that the file /etc/mail/mailman.aliases has been created / updated.
(I had some permissions to sort out in a few directories before it all worked smoothly)
The error log is helpful at /usr/local/mailman/logs/error

These commands can be helpful for troubleshooting, after you have successfully created a testlist and subscribed yourself to that list

To test mailman

su# echo "From: tony@pi.com.au
To: testlist@pi.com.au
Subject: Happy New Year

test mail body
" \| /usr/local/mailman/mail/mailman post testlist

If that works, use this to test your sendmail/mailman integration

su# echo "From: tony@pi.com.au
To: testlist@pi.com.au
Subject: Merry Xmas

test mail body
" \| /bin/sendmail \-tony@pi.com.au testlist@pi.com.au

Hope this helps someone and would welcome corrections or improvements.
 

MailmanWiki: DOC/Integrating Mailman with Sendmail - Method 2 (last edited 2016-06-21 16:34:47 by msapiro)