Differences between revisions 5 and 8 (spanning 3 versions)
Revision 5 as of 2007-07-08 09:48:58
Size: 1709
Editor: atif@myveryown
Comment:
Revision 8 as of 2007-07-08 10:41:08
Size: 3275
Editor: atif@myveryown
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma page-filename DOC/versions/786608 #pragma page-filename DOC/versions/786614
Line 14: Line 14:
&nbsp;add the following in your /etc/mail/virtusertable<<BR>> &nbsp;add the following in your /etc/mail/virtusertable
<<BR>>
Line 20: Line 21:
<<BR>><<BR>><<BR>>
=== &nbsp;local.m4 ===
local mailer is used by sendmail to deliver mails; however since we are not using the server to host any emails we don't need it.&nbsp; We can change it to pass all the mails to mm-handler. Edit /usr/share/sendmail-cf/mailer/local.m4
Line 21: Line 25:
=== &nbsp;local.m4 ===
local mailer is used by sendmail to deliver mails; however since we are not using the server to host any emails we don't need it.&nbsp; We can change it to pass all the mails to mm-handler.<<BR>>
Line 40: Line 42:

{{{#!wiki warning
This Mlocal is modified so that sendmail passes the hostname using -j parameter.&nbsp; Also a -d parameter has been added before $u.
}}}


 1. This assumes that mm-handler is installed in /etc/mail/mm-handler.&nbsp; You change it to the location where mm-handler is installed/copied.
 1. U=mailman:mail shall run mm-handler as user:mailman, group:mail.&nbsp; Change it to one that your mailman installation expects.
Line 41: Line 51:
<<BR>>\\ Copy the file into /etc/mail/ directory (or where ever your installation of sendmail is).

{{{#!wiki caution
Make sure that the path in your local.m4 is the same as the one where you are copying the mm-handler file
}}}


{{{
chmod ug+x mm-handler
}}}

This shall make the script executable by user and group.&nbsp;

{{{
chown root:mail mm-handler&nbsp;This changes the group to mail.  However you should make it that specified in local.m4.
}}}

Now edit mm-hanlder and make sure that.

 * perl path is correct.
 * $MMWRAPPER is referring to right mailman configuration.
 * $MMLISTDIR is referring to the correct directory.
 * $SEND_MAIL is referring to correct program.

{{{#!wiki warning
$SEND_MAIL is specific to the mm-handler attached to this document
}}}

After configuring the variables in mm-handler run it on the console.&nbsp; This should generate log entries in your syslog.&nbsp; In this case look for /var/log/maillog or /var/log/messages or wherever your system is configured to log these subsystems (refer to syslog.conf).&nbsp;

Assumption

The following has been tested using the following configuration

  • Mailman 2.1.9
  • Sendmail 8.13.1
  • CentOS release 4.5 (Final)
  • Attached mm-handler (most noticeable change is writing logs to syslog)
  • You are going to be using the server only for mailing lists and not for delivery to local addresses

Method

For the purpose of this document the server domain shall be called mailman.foo.com and it is a 'A' name entry in the DNS. 

&nbsp;virtusertable

 add the following in your /etc/mail/virtusertable

this shall redirect any email to root on the server to be redirected to the email admin on the mail server.


&nbsp;local.m4

local mailer is used by sendmail to deliver mails; however since we are not using the server to host any emails we don't need it.  We can change it to pass all the mails to mm-handler. Edit /usr/share/sendmail-cf/mailer/local.m4

at the end of the file look for

Mlocal,    ...

and replace it with

Mlocal,    P=/etc/mail/mm-handler, F=rDFMhlqSu, S=EnvFromL, R=EnvToL/HdrToL,              T=DNS/RFC822/X-Unix, U=mailman:mail,              A=mm-handler $h -j $j -d $u

Make sure that there is a tab after Mlocal, and not spaces.  Otherwise it might not work

This Mlocal is modified so that sendmail passes the hostname using -j parameter.  Also a -d parameter has been added before $u.

  1. This assumes that mm-handler is installed in /etc/mail/mm-handler.  You change it to the location where mm-handler is installed/copied.

  2. U=mailman:mail shall run mm-handler as user:mailman, group:mail.  Change it to one that your mailman installation expects.

&nbsp;mm-handler

Copy the file into /etc/mail/ directory (or where ever your installation of sendmail is).

Make sure that the path in your local.m4 is the same as the one where you are copying the mm-handler file

chmod ug+x mm-handler

This shall make the script executable by user and group. 

chown root:mail mm-handler&nbsp;This changes the group to mail.  However you should make it that specified in local.m4.

Now edit mm-hanlder and make sure that.

  • perl path is correct.
  • $MMWRAPPER is referring to right mailman configuration.
  • $MMLISTDIR is referring to the correct directory.
  • $SEND_MAIL is referring to correct program.

$SEND_MAIL is specific to the mm-handler attached to this document

After configuring the variables in mm-handler run it on the console.  This should generate log entries in your syslog.  In this case look for /var/log/maillog or /var/log/messages or wherever your system is configured to log these subsystems (refer to syslog.conf). 


MailmanWiki: DOC/Integrating Mailman with Sendmail (last edited 2008-01-08 02:54:24 by tlembke)