Next Previous Contents

8. Routing incoming messages by user

8.1 How do I set up a mailing list?

I'd like me-sos@my.host.name to be forwarded to a bunch of people.

Answer:

Put a list of addresses into ~me/.qmail-sos, one per line. Then incoming mail for me-sos will be forwarded to each of those addresses. You should also touch ~me/.qmail-sos-owner so that bounces come back to you rather than the original sender. If you want subscriptions to be handled automatically, put

| qlist2 sos my.host.name

into ~me/.qmail-sos-request. Anyone who wants to subscribe can simply send a message to me-sos-request@my.host.name.

Alternative: ezmlm ( http://pobox.com/~djb/ezmlm.html) is a modern mailing list manager, supporting automatic subscriptions, confirmations, archives, fully automatic bounce handling (including warnings to subscribers saying which messages they've missed), and more.

8.2 How do I create aliases with dots?

I tried setting up ~alias/.qmail-P.D.Q.Bach, but it doesn't do anything.

Answer:

Use .qmail-p:d:q:bach. Dots are converted to colons, and uppercase is converted to lowercase.

8.3 How do I use sendmail's .forward files with qmail?

Install the dot-forward package, http://pobox.com/~djb/dot-forward.html.

8.4 How do I use sendmail's /etc/aliases with qmail?

Install the fastforward package, http://pobox.com/~djb/fastforward.html.

To make majordomo 1.94.* work with qmail under fastforward, insert

system("newinclude","$listdir/$clean_list");

before the lclose(LIST) line in do_subscribe and do_unsubscribe in majordomo.

See ftp://ftp.eyrie.org/pub/software/majordomo/mjqmail and http://www.qmail.org for other methods of using majordomo with qmail. majordomo 2.0 is expected to support qmail directly.

8.5 How do I make qmail defer messages during NFS or NIS outages?

If ~joe suddenly disappears, I'd like mail for joe to be deferred.

Answer:

Build a qmail-users database, so that qmail no longer checks home directories and the password database. This takes three steps.

  1. Put your complete user list (including local and NIS passwords) into /var/qmail/users/passwd.
  2. Run
    qmail-pw2u -h < /var/qmail/users/passwd > /var/qmail/users/assign
    
    Here -h means that every user must have a home directory; if you happen to run qmail-pw2u during an NFS outage, it will print an error message and stop.
  3. Run
    qmail-newu
    

Make sure to rebuild the database whenever you change your user list.

8.6 How do I change which account controls an address?

I set up ~alias/.qmail-www, but qmail is looking at ~www/.qmail instead.

Answer:

If you run

chown root ~www

then qmail will no longer consider www to be a user; see /var/qmail/man/cat8/qmail-getpw.0. For more precise control over address assignments, see /var/qmail/man/cat5/qmail-users.0.

8.7 How do I use procmail with qmail?

Put

| preline procmail

into ~/.qmail. They will need to use a full path for procmail unless procmail is in the system's startup PATH.

If you are moving from sendmail, and users have procmail in their .forward files: procmail will continue to work from .forward files if you have installed dot-forward, see question How do I use sendmail's .forward files with qmail?.

If you are moving from sendmail, and sendmail was using procmail instead of binmail: Copy /var/qmail/boot/proc or /var/qmail/boot/proc+df to /var/qmail/rc.

8.8 How do I use elm's filter with qmail?

Put

| preline filter

into ~/.qmail.

They will need to use a full path for filter unless filter is in the system's startup PATH.

8.9 How do I forward unrecognized usernames to another host?

I'd like to set up a LUSER_RELAY pointing at bigbang.af.mil.

Answer:

Put

| forward "$LOCAL"@bigbang.af.mil

into ~alias/.qmail-default.


Next Previous Contents