[Mailman-Users] Please review this procedure for sendmail integra tion

Pantejo, Barbara FTL BPantejo at citco.com
Thu Jan 27 18:15:56 CET 2005


Ed,

This works great! Thank you very much!!! I tried David Champion's mm-handler
method and it was too complicated (for a non-experienced sendmail person,
like me) so I couldn't get it to work. Your procedure is simple and easy to
implement! Thanks again for sharing your method! I recommend it to anyone
wanting to integrate sendmail to mailman. 

Regards,
Barbara

----------------------------------------------------------------------------
----

I've worked this up. I'd appreciate some constructive comments, yea or  
nay, on this procedure.

Using the postfix MTA functionality to do automatic sendmail alias handling
------------------------------------------------------------------------
----

In order to add a list to mailman on a sendmail based system, you need  
To add a bunch of aliases for that list to the alias file. In this  
customization, we implement a second alias file and teach sendmail about it.

We use a mailman feature that was designed for the postfix mail  
program - a replacement for sendmail.  This feature creates  
/home/mailman/data/aliases

1. We have a script that will copy the alias file and then process it.  
We need to do this since sendmail doesn't like alias files to be in
directories that don't meet very specific permission requirements.
/home/mailman/data doesn't meet this requirement. Our script will copy the
alias file from /home/mailman/data to /etc. It uses a different name in
order not to clash with the existing /etc/aliases

Create /usr/local/sbin/mailman.aliases with these commands:

/bin/cp /home/mailman/data/aliases /etc/mailman.aliases
/usr/bin/newaliases

2. We have to tell mailman that it is using postfix. We lie.

Add these to mm_cfg.py:

MTA='Postfix'
POSTFIX_ALIAS_CMD = '/usr/bin/sudo /usr/local/sbin/mailman.aliases'
POSTFIX_STYLE_VIRTUAL_DOMAINS = []

3. We have to tell sendmail about the new alias file.

in /etc/mail/sendmail.mc find this line:
define(`ALIAS_FILE', `/etc/aliases')dnl
and change it to:
define(`ALIAS_FILE', `/etc/aliases,/etc/mailman.aliases')dnl
Run a make (or otherwise refresh sendmail.cf and then restart sendmail

Now when we run newaliases, it will rebuild both alias files.

4. We need permission for apache and mailman to run our script from  
step 1.

In the /etc/sudoers file (use the command /usr/sbin/visudo) we need  
two lines:
apache ALL= NOPASSWD: /usr/local/sbin/mailman.aliases
mailman ALL= NOPASSWD: /usr/local/sbin/mailman.aliases

Note that your web server may not run as 'apache' It may run as 'www'  
or 'nobody'.
Whatever it runs as is what you need where it says apache.


5. As mailman, run /home/mailman/bin/genaliases
Check for a file /home/mailman/data/aliases and
also TWO files /etc/mailman.aliases and /etc/mailman.aliases.db

6. Test creating a list using /home/mailman/bin/newlist
Check for the appearance of aliases for that list in  
/etc/mailman.aliases
Add some users and test the list

7. Test for creating a list using http://domain.com/mailman/create
Check for the appearance of aliases for that list in  
/etc/mailman.aliases
Add some users and test the list

Ed Greenberg
edg at greenberg.org
6/19/2004

------------------------------------------------------
Mailman-Users mailing list
Mailman-Users at python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives:  
http://www.mail-archive.com/mailman-users%40python.org/





More information about the Mailman-Users mailing list