http://wiki.qmailtoaster.org:80/index.php?title=MailingList_Archiving&action=history&feed=atomMailingList Archiving - Revision history2024-03-28T12:51:18ZRevision history for this page on the wikiMediaWiki 1.41.0http://wiki.qmailtoaster.org:80/index.php?title=MailingList_Archiving&diff=152&oldid=prevEbroch: Created page with "If you want to setup Mailinglist Archiving system like Mail-Archive.com, you may want to install [http://www.mhonarc.org/ MHonArc] and [http://www.mhonarc.org/mharc/ mharc]. But for simplity I have create a scripts to install them which can be directly run at QMailToaster or QMT-ISO box Install how to: # vi install-mailarchive.sh #!/bin/sh # This script installs MHonArc (www.mhonarc.org), # Namazu (www.namazu.org), Procmail (www.procmail.org) # then install (www...."2024-03-16T16:48:36Z<p>Created page with "If you want to setup Mailinglist Archiving system like Mail-Archive.com, you may want to install [http://www.mhonarc.org/ MHonArc] and [http://www.mhonarc.org/mharc/ mharc]. But for simplity I have create a scripts to install them which can be directly run at QMailToaster or QMT-ISO box Install how to: # vi install-mailarchive.sh #!/bin/sh # This script installs MHonArc (www.mhonarc.org), # Namazu (www.namazu.org), Procmail (www.procmail.org) # then install (www...."</p>
<p><b>New page</b></p><div>If you want to setup Mailinglist Archiving system like Mail-Archive.com, you may want to install [http://www.mhonarc.org/ MHonArc] and [http://www.mhonarc.org/mharc/ mharc]. <br />
But for simplity I have create a scripts to install them which can be directly run at QMailToaster or QMT-ISO box<br />
<br />
Install how to:<br />
# vi install-mailarchive.sh<br />
#!/bin/sh<br />
# This script installs MHonArc (www.mhonarc.org),<br />
# Namazu (www.namazu.org), Procmail (www.procmail.org) <br />
# then install (www.mhonarc.org/mharc)<br />
# for web-based mailinglist archiving<br />
# on QMT-ISO or QMailToaster box<br />
#<br />
# Mailinglist Archiving using MHonArc/mharc for QMT-ISO<br />
# ver 1.0 beta<br />
# pakogah@pala.bo-tak.info<br />
# http://am3n.profusehost.net<br />
# 20-Oct-2007<br />
#<br />
#<br />
#---------- Main Configuration ------------<br />
# You should edit them to make sure you download the latest version<br />
# all variables are in here<br />
# please make sure they are valid before running this install script<br />
<br />
MHONARC_SITE=http://www.mhonarc.org/release/MHonArc/tar/<br />
MHONARC_FILE=MHonArc-2.6.16-1.noarch.rpm # Please check the above site for latest version<br />
NAMAZU_SITE=http://www.namazu.org/stable/<br />
NAMAZU_VER=namazu-2.0.17 # Please check the above site for latest version<br />
NAMAZU_FILE=$NAMAZU_VER.tar.gz<br />
MHARC_SITE=http://www.mhonarc.org/release/mharc/tar/<br />
MHARC_VER=mharc-0.7.3 # Please check the above site for latest version<br />
MHARC_FILE=$MHARC_VER.tar.gz<br />
QMTISO="1" # this script should run properly on QMT-ISO<br />
# if you are not using QMT-ISO but using QMailToaster<br />
# change it to 0<br />
TMPFOLDER="mailarchivefiles"<br />
<br />
#---------- Begin Process installation ------------<br />
# Below this line should be edited<br />
# but if you found some bugs or add some feature<br />
# please notify me.<br />
<br />
echo "This script installs MHonArc (www.mhonarc.org),"<br />
echo "Namazu (www.namazu.org), Procmail (www.procmail.org)" <br />
echo "then install (www.mhonarc.org/mharc)"<br />
echo "for web-based mailinglist archiving"<br />
echo "on QMT-ISO or QMailToaster box"<br />
echo ""<br />
echo "This is not automatic installation script but rather interactive"<br />
echo "So I need you to answer some question"<br />
echo "To make sure you use the latest version of packages,"<br />
echo "you need to edit the variables on this script."<br />
echo ""<br />
echo "mharc requires Perl and Make,"<br />
echo "this install script assume that only be running at qmt-iso box"<br />
echo "which already has them by default."<br />
echo "if not, so make sure perl and make available manually."<br />
echo ""<br />
echo "Press [enter] to continue"<br />
echo "or press [ctrl]-[c] to cancel installation"<br />
read i<br />
<br />
#--- check user<br />
VALID_USER="root"<br />
CURRENT_USER=`whoami`<br />
<br />
if [ ! "$VALID_USER" == "$CURRENT_USER" ]<br />
then<br />
echo "You have to root to run this script"<br />
exit<br />
else<br />
echo "Installation begin..."<br />
fi<br />
#--- check user<br />
<br />
#--- check QMT-ISO<br />
CWD=`pwd`<br />
#echo $CWD<br />
if [ "$QMTISO" == "1" ]<br />
then<br />
LOAD_LOC=/var/qmt # Where the package is located<br />
cd $LOAD_LOC<br />
fi<br />
#--- check QMT-ISO<br />
<br />
# create own folder to dump all necessary packages<br />
mkdir $TMPFOLDER<br />
cd $TMPFOLDER<br />
<br />
<br />
# install MhonArc - A mail-to-HTML converter<br />
echo "install MhonArc - A mail-to-HTML converter"<br />
wget $MHONARC_SITE$MHONARC_FILE<br />
rpm -Uvh $MHONARC_FILE<br />
<br />
# install namazu - a Full-Text Search Engine<br />
echo "install namazu - a Full-Text Search Engine"<br />
wget $NAMAZU_SITE$NAMAZU_FILE<br />
tar xzvf $NAMAZU_FILE<br />
cd $NAMAZU_VER<br />
<br />
# install perl's File-MMagic<br />
cd File-MMagic<br />
perl Makefile.PL<br />
make<br />
make install<br />
cd ..<br />
<br />
./configure<br />
make<br />
make check<br />
make install<br />
cd ..<br />
<br />
# install procmail<br />
echo "install procmail"<br />
yum -y install procmail<br />
<br />
# mharc requires Perl and Make,<br />
# this install script assume that only be running at qmt-iso box<br />
# which already has them by default.<br />
# if not, so make sure perl and make available manually<br />
<br />
# install Mharc - web-based searchable mail archives<br />
echo "install Mharc - web-based searchable mail archives"<br />
wget $MHARC_SITE$MHARC_FILE<br />
tar xzvf $MHARC_FILE<br />
<br />
# download mharc-maildir.patch to enable maildir support for mharc<br />
echo "download mharc-maildir.patch to enable maildir support for mharc"<br />
wget http://am3n.profusehost.net/files/mharc-maildir.patch<br />
patch -p0 < mharc-maildir.patch<br />
<br />
cd $MHARC_VER<br />
<br />
echo ""<br />
echo "Preferred answer"<br />
echo " Pathname to install mharc: /var/www/html/mailarchive"<br />
echo " Root URL for archives: /mailarchive"<br />
echo ""<br />
echo "While editing lib/config.sh file, below is preferred parameter:"<br />
echo " SW_ROOT=/var/www/html/mailarchive"<br />
#echo " MHONARC_LIB=/usr/lib/MHonArc/"<br />
echo " #ORGMAIL=/var/spool/mail/$LOGNAME"<br />
echo " ORGMAIL=/home/vpopmail/domains/yourcompany.com/archive/Maildir/new"<br />
echo " after this you should create email account archive@yourcompany.com"<br />
echo " and subscribe it to milist you want yo archive"<br />
echo " IS_MAIL_SPOOL=1"<br />
echo " ADMIN_ADDRESS=youraddress@yourcompany.com" <br />
echo " ROOT_URL=/mailarchive"<br />
#echo " blank no need to fill anything there is you are using suggested parameter"<br />
echo ""<br />
#echo "dont forget to create that email account"<br />
echo ""<br />
echo "File lib/lists.def no need to edit now, you can always edit them later"<br />
echo "visit http://www.mhonarc.org/mharc/doc/bin/mk-procmailrc.html#list_definition_file"<br />
echo "to find out what options available"<br />
echo ""<br />
echo "simple example option on lib/lists.def if you want to archive milis top1@yourcompany.com"<br />
echo " Name: TOP1 #w/o space"<br />
echo " Description: Milist TOP1"<br />
echo " Address: top1@yourcompany.com"<br />
echo ""<br />
echo "After that type 'make' on <mharc-root> folder [/var/www/html/mailarchive]"<br />
echo ""<br />
<br />
# lets install mharc<br />
env PERL5LIB=/usr/lib/MHonArc perl install.pl<br />
<br />
# go to mharc install folder<br />
echo "type in your SW_ROOT again here "<br />
echo "only if it different from default [/var/www/html/mailarchive] "<br />
echo "otherwise just press [enter] : "<br />
read SW_ROOT<br />
if [ -n "$SW_ROOT" ]<br />
then echo ""<br />
else SW_ROOT="/var/www/html/mailarchive"<br />
fi<br />
<br />
cd $SW_ROOT<br />
touch info<br />
<br />
# install mharc's crontab for maintenance purpose<br />
# get what are in crontab list<br />
crontab -l >> etc/yourcrontab.save<br />
cat etc/crontab >> etc/yourcrontab.save<br />
# create crontab again from that file<br />
crontab etc/yourcrontab.save<br />
echo ""<br />
echo "Please enable these lines"<br />
echo " #57 * * * 1-6 /var/www/html/mailarchive/bin/logcmd -log /var/www/html/mailarchive/log/cron.log -- /var/www/html/mailarchive/bin/read-maildir"<br />
echo " #57 0,4-23 * * 0 /var/www/html/mailarchive/bin/logcmd -log /var/www/html/mailarchive/log/cron.log -- /var/www/html/mailarchive/bin/read-maildir"<br />
echo " #57 2 * * 0 /usr/sbin/logrotate -s /var/www/html/mailarchive/etc/logrotate.status /var/www/html/mailarchive/etc/logrotate.conf"<br />
echo ""<br />
echo "Sorry you have to edit them manually, press [enter] to begin"<br />
read i<br />
crontab -e<br />
<br />
# install mharc's apache configuration<br />
cp etc/apache.conf /etc/httpd/conf.d/mharc.conf<br />
echo ""<br />
#echo "Please disable this line"<br />
#echo " ScriptAlias /cgi-bin/ /var/www/html/mailarchive/cgi-bin/"<br />
echo "If you install mharc other than /var/www/html/mailarchive"<br />
echo "You may want to enable this line"<br />
echo " #Alias <ROOT_URL> \"<mharc-install-root>\""<br />
echo ""<br />
echo "Sorry you have to edit them manually, press [enter] to begin"<br />
read i<br />
vi /etc/httpd/conf.d/mharc.conf<br />
# restart apache to enable mharc website<br />
service httpd restart<br />
<br />
echo ""<br />
echo "In my mharc installation there is bug in <mharc-root>/html/<list>/index.html"<br />
echo "which not loading css file"<br />
echo "Please add this line"<br />
echo " <link rel=\"stylesheet\" type=\"text/css\" href=\"/mailarchive/html/stylesheet.css\">"<br />
echo "after this line"<br />
echo " <title>$LIST-TITLE$ Archives</title>"<br />
echo ""<br />
echo "Sorry you have to edit them manually, press [enter] to begin"<br />
read i<br />
vi html/.PNM.head<br />
<br />
# make a softlink for index.html<br />
ln -s html/lists.html index.html<br />
cd html<br />
ln -s lists.html index.html<br />
<br />
echo "now you can access your mailinglist archive at:"<br />
echo "http://www.yourcompany.com/<mharc-ROOT_URL>"<br />
echo ""<br />
echo "for customization you can visit these websites:"<br />
echo "MHonARc http://www.mhonarc.org"<br />
echo "mharc http://www.mhonarc.org/mharc"<br />
<br />
cd $CWD<br />
# script end here<br />
<br />
<br />
# chmod +x install-mailarchive.sh<br />
# ./install-mailarchive.sh<br />
<br />
More info about the script you visit [http://am3n.profusehost.net/post/index/82/Install-MailArchiving-system-on-QMailToaster my blog about it] and read the script description<br />
<br />
For customizing your Mailinglist Archiving system visit [http://www.mhonarc.org/ MHonArc] and [http://www.mhonarc.org/mharc/ mharc] website</div>Ebroch