A 12-step process (sort of).
Assumptions:
Your MTA is sendmail 8 or compatible.
Sendmail utilizes /etc/mail/trusted-users
You have retrieved and extracted the gzipped tarball from
http://www.greatcircle.com/majordomo/1.94.5/majordomo-1.94.5.tar.gz
You did NOT extract into /usr/local/majordomo
You have root permissions on the server you are installing on.
You have read the README, NEWS, and FAQ files.
Your OS configuration has perl in /usr/bin
cc is linked to /usr/bin/gcc.
As the root user in bash or sh, follow the next 10 steps
1. create a majordom user and group in /etc/passwd and /etc/group
(The rpm uses majordomo:91:91, FreeBSD uses majordom:54:54)
note1: many unix-like OSes still only allow 8 characters usernames
Examples:
groupadd -g 54 majordom
useradd -d /usr/local/majordomo -g 54 -u 54 majordom
2. make note of the uid:gid of this user, and the $HOME directory
note2: duh, if you used the examples above to create them
sendmail needs to trust the majordomo user.
add "majordom" on a line by itself to /etc/mail/trusted-users
smmsp needs to trust the majordomo user too. Make sure submit.cf
contains this line;
Ft/etc/mail/trusted-users
3. locate your perl and gcc tools, you need this in the next step
note3: using the assumptions from the first paragraph
4. edit Makefile
4a. PERL = /usr/bin/perl
4b. CC = /usr/bin/gcc
4c. W_HOME = /usr/local/majordomo # <$HOME from above in step 2>
4d. MAN = /usr/local/man # /usr/man or /usr/local/man both work
4e. W_USER = 54 # what I used, use your info from step 2
4f. W_GROUP = 54 # what I used, use your info from step 2
4g. The following defaults are fine;
FILE_MODE = 644
EXEC_MODE = 755
HOME_MODE = 751
4h. Linux is POSIX so these are fine too;
WRAPPER_OWNER = root
WRAPPER_GROUP = $(W_GROUP)
WRAPPER_MODE = 4755
POSIX = -DPOSIX_UID=$(W_USER) -DPOSIX_GID=$(W_GROUP)
TMPDIR = /var/tmp
5. copy sample.cf to /etc/majordomo.cf
5a. edit /etc/majordomo.cf. # Lines needing changes
$whereami = "example.com"; # change to your domain
$homedir = "/usr/local/majordomo"; # same as 4c.
$digest_work_dir = "$homedir/digests"; # note plural
$sendmail_command = "/usr/sbin/sendmail"; # make sure
$max_which_hits = 1; # for security purposes
$TMPDIR = $ENV{'TMPDIR'} || "/var/tmp"; # same as 4h.
note5a: You may want to set $log to $homedir/Log
note6: You are root in a bash or sh shell, right?
6. make wrapper
7. make install
8. make install-wrapper
9. edit /etc/aliases to add/modify;
majordom: majordomo
majordomo: "|/usr/local/majordomo/wrapper majordomo"
owner-majordomo: realuser,
majordomo-owner: owner-majordomo
10. If your sendmail uses smrsh, you must create a link
to /usr/local/majordomo/wrapper in the smrsh directory, or disable
smrsh in sendmail.
This directory location varies from OS to OS, but can be found by
grep P=.*smrsh /etc/sendmail.cf /etc/mail/sendmail.cf
10a. Depending on the output from above, refine the next command.
strings /usr/sbin/smrsh /usr/lib/smrsh | grep /
10b. You should be able to determine the expected link location.
ln -s /usr/local/majordomo/wrapper /etc/smrsh/wrapper
or
ln -s /usr/local/majordomo/wrapper /var/adm/sm.bin
11. It is also possible you have a recent version of sendmail which
does not allow group or world writable permissions to exist in the
path to your lists. This is solved by;
chmod go-w / /usr /usr/local /usr/local/majordomo
12. If you got past steps 6, 7, and 8 (#no perl problems#)
cd <majordomo $HOME directory>; ./wrapper config-test
Once this comes back successful, it is majordomo admin
as usual. :)
Dan Liston
References:
|
|