Index of /projects/tmda
Name Last modified Size Description
Parent Directory -
README.html 17-Oct-2007 19:00 4.8K
README.txt 17-Oct-2007 19:00 4.8K
psa-tmda-0.1.tgz 17-Oct-2007 19:00 12K
Anything offered here are free software and provided as it is
without any warranty. Feel free to use and distribute.
For any help or feedback feel free to contact me at rtwick@utkalika.net.
This page helps TMDA (http://www.tmda.net) and tmda-cgi to work with Plesk Server Administrator
(PSA) versions 6.0 and above. The scripts given here will not work with versions earlier to 6.0.
TMDA as it is will work with psa. However, changes required to get tmda-cgi
and tmda-ofmipd to work with psa setup.
There are three things need to be taken care of.
1. automatically add tmda-filter entry to .qmail file when a new mail a/c is created.
2. tmda-cgi
3. tmda-ofmipd
INSTALLATION
1. Change the first character for each line in /var/qmail/users/assign file
from '=' to '+' and run /var/qmail/bin/qmail-newu. Without this, qmail will
not understand extension addresses and so any confirmation will fail.
chown popuser:popuser /var/qmail/users/assign
This is needed because tmda-ofmipd need to be run under popuser.
When ever a new user is added via plesk interface, step 1 need to be run.
To automate this, run ./install.sh after extracting the tarball and follow the
prompts. It will setup an event handler under plesk for "Mail name created" so
that our program will be called whenever a new mail a/c is created.
This will place a skeleton .tmda.skel.tgz file in /var/qmail/mailnames which
contains a standard .tmda folder for the users and whenever a new a/c is created,
this tarball will be extracted to create the .tmda folder under
/var/qmail/mailnames/domain/user. Examine the contents of the tarball and make
any changes that you need to config or filters or lists (that you want to be
installed by default). Users can later change via tmda-cgi.
When you run ./install.sh, it will ask for a place to install the programs
(defaults to /usr/local/bin). You can specify any place (I suggest in a separate folder; however you need to create the folder before hand). It will place two files - tmda_setup.sh and psa.tmda in that folder.
2. Configure for tmda-cgi
copy psa.py to stubs directory of your tmda-cgi installation directory.
chmod 755 /path/to/tmda-cgi/stubs/psa.py
run ./configure in /path/to/tmda-cgi directory. answer as stated here
to the following questions.
Q. How should I authenticate user logins?
A. remote
Q. What is the authentication URI?
A. pop3://localhost
Q. What mode should the CGI run in?
A. system-wide
Q. Which virtual user stub and parameters should I use for
locating virtual users?
A. psa /bin/cat ~ /var/qmail/users/assign
Q. What real user name should I use when a virtual user logs in?
A. popuser
That's it. Now make , make install.
NOTE: You need to run tmda-cgi under a virtual host without any User/group
directive set in apache.
3.tmda-ofmipd configuration
copy psa-ofmipd.sh to contrib directory of your
tmda installation directory.
chmod 700 /path/to/tmda/dir/contrib/psa-ofmipd.sh
chown popuser:popuser /path/to/tmda/dir/contrib/psa-ofmipd.sh
If you have already compiled tmda then you are all set to start tofmipd
otherwise follow tmda installation guide to compile.
tmda-ofmipd must be started under user popuser. as root you can start it by
su -l popuser -c '/path/to/tmda/bin/tmda-ofmipd -R pop3://localhost -S /path/to/tmda/installation/dir/contrib/psa-ofmipd.sh'
NOTE: do not pass -u popuser to tmda-ofmipd or it will not work with psa.
ofmipd must be started under user popuser. If you are using redhat Linux,
then you can put the above line in /etc/rc.local to start it automatically
during system startup. I don't know how to do this using an init script.
For other distributions, consult your system manual.
That's it. You are now all set.
In your mail client (outlook/mozilla etc), enable smtp auth and specify
user@domain as the login id and your pop password and set smtp port to 8025.
If you are not using tmda-ofmipd then you can skip step 3.
If you are not using tmda-cgi then you can skip step 2.
If you want to manually change /var/qmail/users/assign everything a user is
added then you can skip step 1 also.
tmda will work as long as the users/assign file is modified.
NOTE: To use tmda-ofmipd, you need to setup HOSTNAME in the config file for each user.
When a mail a/c is deleted, plesk doesn't removethat entry from
/var/qmail/users/assign file. As a result, if the same a/c is added again,
there will be two entries in the file for the same name and domain.
This will break tmda-ofmipd. So, be sure to cleanup assign file if an a/c
is deleted and then recreated.
Author: R'twick Niceorgaw last updated : 06 Jan, 2005.