Table of Contents

Middleman

This is middleman, a Sun Java System Messaging Server channel master daemon that feeds messages to Mailman system. It’s tested on Solaris operating system and Sun C compiler only but there shouldn’t be any reason for not compiling on any supported unix-like OS.

Requirements

Sun Java System Messaging Server 6 because of the required enqueueremoveroute channel keyword. Unix or Linux OS and a working compiler.

Getting the software

You can download the source distribution: middleman-0.3.1.tar.gz.

Installation

1. Compile the binary and install it in $IMTA_BIN.

2. Configure mailman channel in $IMTA_TABLE/imta.cnf. I configured it like this:

  !
  ! mailman
  mailman maxjobs 1 enqueueremoveroute defragment subdirs 20 master_debug
  middleman-daemon

Make sure you include at least enqueueremoveroute and defragment.

3. Create file $IMTA_TABLE/job_controller.site:

  [CHANNEL=mailman]
  master_command=IMTA_BIN:middleman

4. Now that you have set up the basic system you have to decide how to route the messages to the brand new channel. There are plenty of options, I went with adding an imta delivery option. I added these lines to option.dat:

  DELIVERY_OPTIONS=*mailbox=$M%$\\$2I$_+$2S@ims-ms-daemon,     \
          &members=*,                                          \
          &mailman=@middleman-daemon:$\$A,                     \
          *native=$M@native-daemon,                            \
          /hold=@hold-daemon:$A,                               \
          *unix=$M@native-daemon,                              \
          &file=+$F@native-daemon,                             \
          &@members_offline=*,                                 \
          program=$M%$P@pipe-daemon,                           \
          #forward=**,                                         \
          *^!autoreply=$M+$D@bitbucket

Everything else is default settings but &mailman=@middleman-daemon:$\$A. That says: “if delivering to a group (&) with mailDeliveryOption=mailman, route messages to middleman-daemon-channel.” $\ is necessary as it forces the address in lowercase.

See Delivery Options Processing in chapter 9 MTA Address Translation and routing in the Administation Guide.

You could achieve the same result with mapping tables and ldap-lookups, if changing DELIVERY_OPTIONS feels too scary...

5. Configure the channel options. Currently only two options are implemented with these defaults:

  WRAPPER=/usr/local/bin/mailman/mail/mailman
  MAX_THREADS=5

If your mailman installation resides on a different location set appropriate option in file $IMTA_TABLE/mailman_option. MAX_THREADS sets maximum amount of concurrent worker threads in any middleman process.

6. compile and install the new configuration:

  $ imsimta cnbuild
  $ imsimta restart job_controller

7. Create an ldap entry for a mailman list:

  dn: cn=test,dc=lists,dc=utu,dc=fi
  mailHost: mailman.utu.fi
  mail: test@lists.utu.fi
  cn: test
  mailDeliveryOption: mailman
  objectClass: top
  objectClass: groupOfUniqueNames
  objectClass: inetMailGroup
  objectClass: inetLocalMailRecipient
  mailEquivalentAddress: test-request@lists.utu.fi
  mailEquivalentAddress: test-admin@lists.utu.fi
  mailEquivalentAddress: test-bounces@lists.utu.fi
  mailEquivalentAddress: test-confirm@lists.utu.fi
  mailEquivalentAddress: test-join@lists.utu.fi
  mailEquivalentAddress: test-leave@lists.utu.fi
  mailEquivalentAddress: test-owner@lists.utu.fi
  mailEquivalentAddress: test-subscribe@lists.utu.fi
  mailEquivalentAddress: test-unsubscribe@lists.utu.fi

8. Test your configuration:

  $ sbin/imsimta test -rewrite test@lists.utu.fi
  ...
  Address list expansion:
    @middleman-daemon:test@lists.utu.fi
  1 expansion total.
  Expanded address:
    test@lists.utu.fi
  Submitted address list:
    mailman
      @middleman-daemon:test@lists.utu.fi (orig test@lists.utu.fi, inter test@lists.utu.fi, host middleman-daemon) *NOTIFY-FAILURES* *NOTIFY-DELAYS*

9. Try sending some mail through middleman.

 
middleman.txt · Last modified: 2007/05/08 09:00
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki