Greetings,

  The qmail toaster project at http://www.qmailtoaster.com/ provides a 
click-to-install pop toaster solution for Linux distributions using RPM package 
management.  It provides qmail/vpopmail/courier-imap/pop3/IMP and web-based 
configuration tools, compiled by the installer from source packages.
  I sent this message to that project's list regarding implementation of TMDA within a 
qmail toaster setup, and I thought it might be of interest to those on this list or 
searching the archives.

Begin forwarded message:

From: Data Vortex <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Re: [qmailtoaster-stable] TMDA and Toaster


On Mon, 29 Sep 2003 16:47:55 -0600
Nate Davis <[EMAIL PROTECTED]> wrote:
> Would those who have gotten TMDA and The Toaster working properly, 
> please outline some steps to help me get it going on my server?

I am using Red Hat 8.0.  All values here should at least work on Red Hat 8 and 9, as I 
have done this on both.  I think they will be pretty portable for all RPM systems 
though.  You'll want to have a couple hours for this at bare minimum.

- Become root and save the attached tarball and tar xzf it in /root
  (this message included inside as INSTALL)

- Download the most recent TMDA tarball from http://tmda.net/releases/

- Build RPMs from the tarball using instructions at:
  http://tmda.net/install.html

- Install the RPMs generated for tmda and tmda-ofmipd.

- Edit /etc/tmdarc to suit your setup.  I have attached the one I am
  using with my up-to-date version of the stable toaster as
  "etc-tmdarc".  Review this file, it is a starting point.

- Edit /etc/sysconfig/tofmipd.  You should probably just go ahead and
  use my attached "etc-sysconfig-tofmipd" as-is.  There's not much in
  there.

- We need tmda-ofmipd to run as the vpopmail user.  Edit
  /etc/init.d/tofmipd on line 39 to change "daemon $program $OPTIONS" to
  instead read:      daemon "su -l vpopmail -c '$program $OPTIONS'"

- Open appropriate holes in your firewall for tmda-ofmipd.  For
  iptables, add something like the following to /etc/sysconfig/iptables:
  -A INPUT -i eth0 -p tcp --dport 8025 -j allow-new

-cp /usr/share/doc/tmda-x.xx/contrib/vpopmail-vdir.sh /home/vpopmail/bin

- Open /usr/share/doc/tmda-x.xx/contrib/vadduser-tmda and follow the
  instructions there for "Installation and Usage" if you wish to use
  this handy script to add tmda-ready accounts.

- Download the recent tmda-cgi from http://tmda.net/tmda-cgi/releases/
  This is necessary for vpopmail installations.  You need it.

- cd /usr/local
  tar xzvf tmda-cgi-x.xx.tgz
  ln -s tmda-cgi-x.xx tmda-cgi
  cd tmda-cgi

= I have my own horde/IMP installation and I don't know where
  qmailtoaster installs it, but go to the DocumentRoot, and make a
  directory.  I use a virtual server for my installation, so you get
  your webmail login at http://mail.domain.com/ and Horde is installed
  at: /www/mail/horde, with tmda-cgi installed as:
  /www/mail/tmda/index.cgi and accessed from:
  http://mail.domain.com/tmda
     I use these values in my example, adapt them as necessary.  

- ./configure   This is interactive.  Here are the answers to give:

        Where is the Python interpreter? (version 2.1+)
        > /usr/bin/python
        When I compile the binary executable, where should I save it?
        > /www/mail/tmda/index.cgi
        Where did you install TMDA?
        > /usr/lib/python2.2/site-packages
        Where did you install tmda-cgi?
        > /usr/local/tmda-cgi/
        Would you like to override the default config file location?
        > None
        How should I authentication user logins?
        > program
        What is the authentication command? (full path and args)
        > /home/vpopmail/bin/vchkpw
        What is the relative or absolute web path from CGI to display
        directory?
        > display/
        What mode should the CGI run in?
        > single-user
        Which virtual user stub and parameters should I use for locating
        virtual users?
        > vpopmail1 /home/vpopmail/bin/vuserinfo ~
        Where should I save temporary session files?
        > /tmp/TMDASession.
        How long (in seconds) may a temporary session file be allowed to        sit 
before it risks being cleaned up?
        > 300
        What are the odds of cleanup I should use? (0.01 = 1%)
        > 0.01

-  make install

-  Edit defaults.ini.  I have included my defaults.ini as
   "usr-local-tmda-cgi-defaults.ini" file for your use as a template.
   Pay special attention to InstallInstruct and UninstallInstruct.
   It's a good idea to make a spamcop address to put into this file for
   your users.  Visit http://www.spamcop.net/ to make one.

-  cd to the directory where you installed the cgi, in my example it's
   /www/mail/tmda, and then ln -s /usr/local/tmda-cgi/display display

-  Do an ls and make sure index.cgi is there.  If not you probably have
   a permissions problem and you need to fix it and run configure again,
   but it should remember your input.  Run:
   chown vpopmail:vchkpw index.cgi  ; chmod 6715 index.cgi

-  Edit your apache configuration for tmda-cgi.  I use a file included
   from my virtual server config files for my lengthy mail setup.  This
   lets me easily share my qmail-admin/vqadmin/horde/IMP/tmda-cgi stuff
   between multiple virtual hosts and SSL/non-SSL hosts.  You can also
   put it in the file with the in /etc/httpd/conf where toaster puts its
   various directives, or if this is all your web server is doing, you
   can just use /etc/httpd/conf/httpd.conf

   Here's what you need to add:
        Alias /tmda/ /www/mail/tmda/
        Alias /tmda /www/mail/tmda/
        Alias /display/ /www/mail/tmda/display/
        Alias /display /www/mail/tmda/display/
        <Directory "/www/mail/tmda">
                AddHandler cgi-script .cgi
                Options +ExecCGI
        </Directory>

-  Edit the skeleton files that users get when they install TMDA support
   on their accounts.  I have attached "install.tgz".  This is my
   /usr/local/tmda-cgi/skel/install/ tree.  It works with the included
   /etc/tmdarc and qmail-toaster.  Use it as a guide.  You should also
   edit the uninstall part of the tree to match.  I haven't done this
   yet because I'm too lazy.

-  Edit your horde conifg to use tmda-ofmipd for its outgoing mail.  For
   my example this is in /www/mail/horde/config/horde.php.  Comment out
   $conf['mailer']* and add instead:

$conf['mailer']['params'] = array('host' => 'your.external.hostname');
$conf['mailer']['params']['port'] = '8025';
$conf['mailer']['params']['auth'] = true;


-  Edit your Horde/IMP toolbar to have a link to your tmda-cgi
   installation.  For me this is /www/mail/horde/imp/config/menu.php
   I made a cute little icon for it called tmda.png.  Here's what to
   add here and to menu.php for each horde app you want linked: 

        $_menu[] = array(   
                'url' =>        '/tmda/',
                'text' =>       'SPAM',
                'icon' =>       'tmda.png',
                'icon_path' =>  '/horde/graphics/',
                'target' =>     '_blank',
                'onclick' =>    ''
        );

- Restart httpd, start your new service tofmipd.  If you need to debug
  tofmipd, you will find adding this to root's bash aliases useful:
  Remember make sure tmda-ofmipd is stopped before you do this:
alias tmda-debug='su -l vpopmail -c "/usr/bin/tmda-ofmipd -d -f -R imap -S 
/home/vpopmail/bin/vpopmail-vdir.sh"'

- You can test the install by going to
  http://your.qmailtoaster.install/tmda.  Login with your IMAP login.
  You should (if you don't already use tmda prior) get a screen
  welcoming you and offering to add TMDA functionality to your mailbox.
  Say yes, edit the options, templates, and everything.  Send yourself
  some mail

- Visit http://www.tmda.net/donations.html

    Best luck!  Hopefully these same steps can be built into a spec file
    for tmda-toaster.

       Regards,
        -- DV

Attachment: tmda-qmailtoaster.tgz
Description: GNU Zip compressed data

_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to