Majordomo + Exim

Why this Page??

Quite simply, its because the simplicity of setting up Exim with Majordomo eludes many of us. It is NOT hard to do, however, little "steps" can be missed which give the administator headaches trying to diagnose for hours. Hopefully through this page, you can essentially have it running in no time at all. These pages in no way replace the Exim documentations, and the vast knowledge of those in the Exim community. However, it has been designed with input by many of us on the Exim list. If you have any questions past this, please look at subscribing to the exim-users mailing list. Check out the Exim Homepage(http://www.exim.org) for information on how to do this, as well as get a wealth of information online.

Version Information

The content within this page are based on using Majordomo 1.94.4 with Exim 1.62 and above. We currently do not know if the following will work with Majordomo 2.0 since there are a lot of changes to the core code components. If you have success with the below configurations with Majordomo 2.0, please let me know.

Setting up Majordomo with Exim

  1. Install Majordomo like you would any other way.
  2. rm /usr/lib/sendmail; ln -s /path/to-exim/binary /usr/lib/sendmail
    Some package maintainers like Debian do this for you by default.
  3. In your exim.conf file, usually located in /etc/exim.conf, ensure you give user "majordom" trusted access to exim. This is accomplished by adding it to the trusted_user line.
    Example: trusted_users = mail:majordom
  4. Set up a Director for your majordomo aliases. Below is one example, placed just after system_aliases.

    
    			majordomo_aliases:
      				driver = aliasfile;
      				file = /usr/local/majordomo/lists/lists.aliases,
      				search_type = lsearch,
      				user = majordom
      				group = majordom
    	
    	
    Notice that we point the file to something called lists.aliases. This is a file you will maintain for each one of your lists. The next step shows an example.
  5. Set up a list. For those moving from a sendmail/smail background, you will note that we have REMOVED the aliases from /etc/aliases and placed them in lists.aliases for majordomo. Here is how a typical file may look.
    
    majordom: majordomo
    majordomo:      "|/usr/local/majordomo/wrapper majordomo"
    
    owner-majordomo: postmaster
    
    ############################# Test Mailing List ##############################
    test: "|/usr/local/majordomo/wrapper resend -l test -h yourdomain.com test-out"
    test-out: :include:/usr/local/majordomo/lists/test
    owner-test: your_username
    test-owner: owner-test
    owner-test-out: owner-test
    test-request: "|/usr/local/majordomo/wrapper request-answer test"
    request-test: test-request
    test-approval: owner-test
    ############################# End Test Mailing List #########################
    
    
    For information on how this list was set up, you should consult the majordomo documentation.

  6. Send a subscribe test to majordomo@your_domain.com and see what happens. Of course, you will need to set up the majordomo specific information such as test.config and test.info, but from this point on, you should be good to go, since Exim and Majordomo should now be working together.

Q&A

The above example reveals the outgoing aliases. Is there a better way?

You're pretty sharp to catch that. Here is an example designed by Manar Hussain and modified by Ben Smithurst.


 majordomo_private:
   driver = aliasfile
   file = /usr/local/majordomo/lists/private.aliases
   search_type = lsearch
   user = majordom
   group = mail
   condition = "${if eq {$received_protocol}{local} \
               {${if eq {$sender_ident}{majordom} \
               {true}{false}}}{false}}"

When you set that up, then set all private aliases in there, such as -outgoing, and -digestify if you decide you wish to digest lists. In the normal list alias, you will have most things that normal people can mail to such as list, list-request, list-owner, etc. The *only* aliases you should have in the private aliases is the -outgoing ones.

If you are wondering exactly what that condition does, it just ensures that only locally received mail from the user majordom will be directed by this one; if anyone else tries to send mail to list-outgoing, they'll just get a normal 'User Unkown' error.

That above example is SCAREY. Is their an eaiser way?

You could change the original example to read like this:


test: "|/usr/local/majordomo/wrapper resend -l test -h yourdomain.com test-out,nobody"

This will send it to both test-out and nobody, thus hiding test-out from the received: headers. This is more an issue of preference. Ben prefers the more secure solution above, but I kinda like the simplicity of this when first setting up your list.

Moving from smail to Exim, my Majordomo broke. Whats different?

Well, the biggest thing to make sure is that your $sendmail_command in the majordomo.cf points to exim. That is best accomplished by setting it to /usr/lib/sendmail, and having THAT a link to your exim bin. You should also check to ensure that you do not have flags exim doesn't understand. Chances are, if using smail, you have the -oee flag, which is not properly understood by exim( THis has since been corrected in version 1.7 and above). To check to see about problems like this, look for something like /var/tmp/majordomo.debug. It may show this problem.

How can I speed up delivery of the mailing list messages?

Ben Smithurst suggests to "set remote_max_parallel to something > 1, I use 20 and mail goes out pretty fast...". If you are unsure what is meant by "parallel" delivery, just think of it as each list message being sent to x different hosts at the same time. Although it uses alittle more resources in all the open connections, it is much more efficient. See the Exim documentation for more on this.

What does error "Neither the system_aliases director nor the address_pipe transport set a uid for local delivery of |/usr/lib/majordomo/wrapper majordomo" mean?

You probably haven't mapped the right driver to the list. If you followed the original steps, you may still have the majordomo aliases stuff in /etc/aliases rather than in the list.aliases file. If you move it, chances are it will fix it. A better method would be to read the first Q&A about a better method of setting up your aliases.

Mail being sent to Majordomo is being rejected. It bounces as an unknown user. What is going on?

John Horne dropped me this line. Seem that if you have forbid_pipe command set in your system_aliases director, you can not pipe the majordomo wrapper. A solution? Ensure you have a director SPECIFIC to majordomo like what was shown above. If you have to use the system_aliase director, then remove the forbid_pipe command. If anyone knows a better way, drop me a line.

Tips and Tricks

Questions, Concerns or Suggestions...

If you have any questions, concerns or suggestions, please feel free to email me at eppdm@netmaster.ca or subscribe to the Exim mailing list if you have yet to do so. I'd like to credit Ben Smithurst for a lot of input into this page, as well as some of the examples and corrections herein. More credits go to those on the Exim list who mailed me both publically and privately about this page, with both support and suggestions about its content.

- Dana M. Epp



Please note the following...

NNS or it's employees are not liable if you stick your tounge on frozen monkey bars, go postal on the Redmond campus, or get hit by a Mac truck. Therefore, NNS and their employees are also not liable for any use, misuse, idiocy, or otherwise damaging results from this information. Oh ya... we are not responsible for BSOD when starting notepad. Use at your own risk.