Majordomo kurulumu ve ayarları
Önceki Majordomo Liste Yöneticisi Kurulumu NASIL Sonraki
Majordomo kurulumu ve ayarları
Majordomo kurmak için nelere ihtiyacınız var?
  1. Perl 4.036 sürümü ya da 5.002 (İsterseniz daha yüksek bir sürüm kullanın. Seçim sizin).
  2. Bir C derleyici. gcc sizin için yeterli olacaktır :)
Majordomo programını nereden alacaksınız?
Kuruluma Hazırlık
İlk önce sistemimize majordomo kullanıcısını ekleyelim. Kullanıcıyı sisteme eklerken ev dizinini /usr/local/majordomo olarak ayarlayınız. Program bu dizin altına kurulacak.
# adduser majordomo
Majordomo sizin belirlemiş oldugunuz bir UID ve GID ile çalışmak durumundadır. Örneğin benim kullanmış olduğum sistem Slackware 7.1 ve majordomo kullanıcısını UID: 1042, GID: 12 olacak şekilde oluşturuyorum.
Burada 12 no'lu grup kimliği mail grubuna ait, siz isterseniz majordomo kullanıcısını başka bir gruba dahil edebilirsiniz.
Majordomo'nun resend programının düzgün şekilde çalışabilmesi için, majordomo kullanıcısı sendmail'in yapılandırma dosyasında Trusted User olarak tanımlanmalıdır. Bunun için /etc/mail/sendmail.cf dosyası içinde
Troot
Tdaemon
Tuucp
satırlarının altına Tmajordomo yazalım. Daha sonra sendmail sürecine HUP sinyalini gönderelim.
# kill -HUP `head -n 1 /var/run/sendmail.pid`
İndirmiş olduğumuz paketi aşağıdaki komut ile /usr/local dizini altına açıyoruz ve /usr/local/majordomo-1.94.5 dizini oluşuyor. Şimdi aşağıdaki işlemleri sırasıyla yapalım.
# tar -zxvf majordomo-1.94.5.tar.gz -C /usr/local
# mv /usr/local/majordomo-1.94.5 /usr/local/majordomo
dizinimizin adını majordomo olarak değiştirdik.
# chown -R majordomo:mail /usr/local/majordomo
Kullanıcı ve grup ayarlarını yaptık.(Ben grup olarak mail tanımladım, siz majordomo'yu hangi gruba atadıydanız burada o grubu yazıyorsunuz.
#su - majordomo
majordomo kullanıcısı olduk. Şimdi ev dizinimize bakıyoruz.
$ pwd
komutunun çıktısı /usr/local/majordomo olması gerekir.
Makefile Dosyasının Yapılandırılması
/usr/local/majordomo/Makefile dosyasını aşağıdaki gibi düzenleyelim.
Dikkat
Perl programının dosya yolunu düzeltmek durumunda kalabilirsiniz. Öntanımlı olarak /bin/perl yazıyor, fakat ben de /usr/bin/perl yolundaydı.Diğer kısımları da aşağıdaki dosyaya bakarak değiştirebilirsiniz.
# This is the Makefile for Majordomo.
#
#------------- Configure these items ----------------#
#

# Put the location of your Perl binary here:
 PERL = /usr/bin/perl/usr/bin/perl

# What do you call your C compiler?
 CC = cc

# Where do you want Majordomo to be installed? This CANNOT be the
# current directory (where you unpacked the distribution)
 W_HOME = /usr/local/majordomo
 W_HOME = /usr/local/majordomo


# Where do you want man pages to be installed?
 MAN = $(W_HOME)/man

# You need to have or create a user and group which majordomo will run as.
# Enter the numeric UID and GID (not their names!) here:
 W_USER = 1042
 W_GROUP = 12

# These set the permissions for all installed files and executables (except
# the wrapper), respectively. Some sites may wish to make these more
# lenient, or more restrictive.
 FILE_MODE = 644
 EXEC_MODE = 755
 HOME_MODE = 751

# If your system is POSIX (e.g. Sun Solaris, SGI Irix 5 and 6, Dec Ultrix MIPS,
# BSDI or other 4.4-based BSD, Linux) use the following four lines. Do not
# change these values!
 WRAPPER_OWNER = root
 WRAPPER_GROUP = $(W_GROUP)
 WRAPPER_MODE = 4755
 POSIX = -DPOSIX_UID=$(W_USER) -DPOSIX_GID=$(W_GROUP)
# Otherwise, if your system is NOT POSIX (e.g. SunOS 4.x, SGI Irix 4,
# HP DomainOS) then comment out the above four lines and uncomment
# the following four lines.
# WRAPPER_OWNER = $(W_USER)
# WRAPPER_GROUP = $(W_GROUP)
# WRAPPER_MODE = 6755
# POSIX =

# Define this if the majordomo programs should *also* be run in the same
# group as your MTA, usually sendmail. This is rarely needed, but some
# MTAs require certain group memberships before allowing the message sender
# to be set arbitrarily.
# MAIL_GID = numeric_gid_of_MTA


# This is the environment that (along with LOGNAME and USER inherited from the
# parent process, and without the leading "W_" in the variable names) gets
# passed to processes run by "wrapper"
 W_SHELL = /bin/sh
 W_PATH = /bin:/usr/bin:/usr/ucb
 W_MAJORDOMO_CF = $(W_HOME)/majordomo.cf

# A directory for temp files..
 TMPDIR = /usr/tmp

#--------YOU SHOULDN'T HAVE TO CHANGE ANYTHING BELOW THIS LINE.-------------
majordomo.cf Dosyasının Yapılandırılması
Yine aynı dizindeki /usr/local/majordomo/sample.cf dosyasını majordomo.cf dosyasına kopyalayalım (majordomo.cf dosyası var olmak zorunda değildir).
$ cp sample.cf majordomo.cf
Ve majordomo.cf dosyasını aşağıdaki şekilde sizin sisteminize uyarlayarak düzenleyeniz. (sendmail programının yoluna dikkat!)
Uyarı
smtp makina adresi olarak aşağıda yazılmış olan olympos.gen.tr sizin smtp makina adresine çeviriniz.
# A sample configuration file for majordomo. You must read through this and
# edit it accordingly!
#


# $whereami -- What machine am I running on?
#
 $whereami = "olympos.gen.tr";

# $whoami -- Who do users send requests to me as?
#
 $whoami = "Majordomo\@$whereami";

# $whoami_owner -- Who is the owner of the above, in case of problems?
#
 $whoami_owner = "Majordomo-Owner\@$whereami";

# $homedir -- Where can I find my extra .pl files, like majordomo.pl?
# the environment variable HOME is set by the wrapper
#
 if ( defined $ENV{"HOME"}) {
 $homedir = $ENV{"HOME"};
 } else {
 $homedir = "/usr/local/majordomo";
 }

# $listdir -- Where are the mailing lists?
#
 $listdir = "$homedir/lists";

# $digest_work_dir -- the parent directory for digest's queue area
# Each list must have a subdirectory under this directory in order for
# digest to work. E.G. The bblisa list would use:
# /usr/local/mail/digest/bblisa
# as its directory.
#
 $digest_work_dir = "/usr/local/mail/digest";

# $log -- Where do I write my log?
#
 $log = "$homedir/Log";

# $sendmail_command -- Pathname to the sendmail program
# usually /usr/lib/sendmail, but some newer BSD systems
# seem to prefer /usr/sbin/sendmail
#
#$sendmail_command = "/usr/lib/sendmail";
 $sendmail_command = "/usr/bin/sendmail";
Kurulum
$ make wrapper
komutunu vererek wrapper programının uygun şekilde derlenebildiğini sınıyoruz.
$ make install
Sıra wrapper'ı yüklemeye geldi.İlk önce root olalım.
$ su root
# make install-wrapper
Komutunu root olarak çalıştıralım. Çünkü wrapper programı setuid olarak yüklenmek zorundadır.
/etc/mail/aliases dosyasının içine şu satırları yazalım:
majordomo: "|/usr/local/majordomo/wrapper majordomo"
majordomo-owner : [email protected],
owner-majordomo : [email protected],
Uyarı
[email protected] adresini kendi adresiniz şeklinde değiştiriniz.
Değişikliklerin etkin olması için newaliases komutunu çalıştırıyoruz.
# newaliases
Kurulumun Sınanması
Programların ve izinlerin düzgün şekilde çalışıp çalışmadığını sınamak için sistemdeki herhangi bir kullanıcı ile (majordomo ve root dışında normal bir kullanıcı) majordomo ev dizinine geçelim.
$ cd /usr/local/majordomo
sonra aşağıdaki komutu çalıştıralım.
Dikkat
/usr/local/majordomo dizininde dizin listelemesi yapamazsınız.
Bu nedenle ls komutunu vermeden aşağıdaki komutu çalıştıralım.
$ ./wrapper config-test
Bu komutun çıktısı hemen hemen aşağıdaki şekilde olacaktır.
------------------------------------------------------------
---------------- Config-test for Majordomo -----------------
------------------------------------------------------------


--------------------- Obvious things: ---------------------
------------------ environment variables ------------------
HOME=/usr/local/majordomo-1.94.5
LOGNAME=majordomo
MAJORDOMO_CF=/usr/local/majordomo-1.94.5/majordomo.cf
PATH=/bin:/usr/bin:/usr/ucb
SHELL=/bin/sh
USER=majordomo
--------------------- euid/egid checks ---------------------
effective user = majordomo (uid 1111)
effective group = users users (gid 100 100 )
---------------------- uid/gid checks ----------------------
real user = majordomo (uid 1111)
real group = users users (gid 100 100 )
------------------------------------------------------------

Non obvious things that cause headaches:

------------------------------------------------------------
Good: 'require'd /usr/local/majordomo-1.94.5/majordomo.cf okay.
Good: found ctime.pl okay.
Good: found majordomo_version.pl okay.
Good: found majordomo.pl okay.
Good: found shlock.pl okay.
Good: found config_parse.pl okay.

You're running Majordomo Version 1.94.5.

--==> Majordomo home directory is /usr/local/majordomo-1.94.5.

------------------- Include directories -------------------
/usr/local/majordomo-1.94.5
/usr/lib/perl5/i386-linux
/usr/lib/perl5
/usr/lib/perl5/site_perl/i386-linux
/usr/lib/perl5/site_perl
/usr/lib/perl5/site_perl
.
--------------------------- Home ---------------------------
Good: changedir to /usr/local/majordomo-1.94.5 succeeded.
Good: Created a mock lock file.
---------------------- temp directory ----------------------
Good: Created a temp file in $TMPDIR (/usr/tmp).
---------------------- list directory ----------------------
Hmmm, list directory /usr/local/majordomo-1.94.5/lists doesn't exist
or isn't a directory.
Let me try to make it for you...
Good: list directory /usr/local/majordomo-1.94.5/lists created.

--------------------------- log ---------------------------
Logfile /usr/local/majordomo-1.94.5/Log didn't exist, trying to create...
okay, now chmod'ing..
Good: logfile /usr/local/majordomo-1.94.5/Log exists and is writeable.
------------------------- Mailers -------------------------
You have defined a mailer for delivery.
Attempting to verify that this is a valid mailer...looks okay.
You have defined a mailer for delivering administrative messages.
Attempting to verify that this is a valid mailer...looks okay.
------------------ Checking majordomo.cf ------------------
Checking to see if there are new variables that should be in
your majordomo.cf file...Nope, none that I see.

Have you configured where Majordomo is?
$whereami is olympos.gen.tr
Good: yup!
----------------------- end of tests -----------------------


Nothing bad found! Majordomo _should_ work correctly.

If it doesn't, check your configuration file
(/usr/local/majordomo-1.94.5/majordomo.cf)
closely, and if it still looks okay, consider asking the majordomo-users
mailing list at "[email protected]" for assistance. Be sure
and fully specify what your problems are, and what type of machine (and
operating system) you are using.

Enjoy!

I see you haven't registered this version of Majordomo.
By registering, you will be notified of patches and further releases
of Majordomo. Shall I send email to [email protected]
to register this version? (I'll cc [email protected])
[yes]
Majordomo programınızı kayıt ettirmek istiyorsanız <enter>'a basabilirsiniz.
Son adımlara geldik. majordomo adresine ileti gövdesinde sadece lists yazan bir komut gonderelim. Komuta karşılık majordomo'dan aşağıdaki cevabı alıyorsak işimiz hemen hemen tamamdır.
>>>> lists
 [email protected] serves the following lists:


Use the 'info <list>' command to get more information
about a specific list.
>>>>
Önceki Üst Ana Başlık Sonraki
Majordomo Nedir? Başlangıç Yaşanabilecek Olası Sorunlar
Bir Linux Kitaplığı Sayfası