On Tue, Dec 21, 2004 at 12:46:56PM -0500, Scott Schmutz wrote:
> I currently have a server running Postfix 1.1.11, MySQL for virtual
> users/domains, spamassassin, and courier. No local mail users at all.
>
> Is it possible to add TMDA to this configuration successfully?
I have done this with postfix, mysql, and cyrus imapd.
I modified the tmda-filter script to take values, typically read from
environment variables, via the command line. I then defined a postfix
service using "pipe" that I could then specify as a transport in postfixr
and then used the per user transport map to redirect to TMDA.
from my postfix master.cf:
tmda unix - n n - - pipe flags=R
user=tmda:cyrus argv=/local/tmda/bin/tmda-filter -noenv /local/tmda/users/$user
$user $sender $recipient $extension
Note the addition of the "-noenv" options and the 5 values passed via the
command line. See below for the diffs to tmda-filter to use this.
I also modified tmda to support delivery via LMTP for injection into cyrus
imapd but you won't need this for courier presumably.
I had to create a place for the TMDA user directories since there were no
home directories to use. All management of tmda is done via tmda-cgi, with the
exception of enabling tmda on accounts -- that is still a manual process but
my user base is quite small (10-20 people) so enabling it on request is not
an issue.
I hope this helps.
-Craig
Here is the diff for tmda-filter:
***************
*** 47,56 ****
--- 47,63 ----
sitedir = os.path.join(sys.prefix, 'lib', 'python'+sys.version[:3],
'site-packages', 'TMDA', 'pythonlib')
sys.path.insert(0, sitedir)
program = sys.argv[0]
+ if sys.argv[1] == '-noenv':
+ sys.argv.pop(1)
+ os.environ['HOME'] = sys.argv.pop(1)
+ os.environ['USER'] = sys.argv.pop(1)
+ os.environ['SENDER'] = sys.argv.pop(1)
+ os.environ['RECIPIENT'] = sys.argv.pop(1)
+ os.environ['EXT'] = sys.argv.pop(1)
execdir = os.path.dirname(os.path.abspath(program))
execfile(os.path.join(execdir, 'tmda-rfilter'))
except KeyboardInterrupt:
pass
>
> I have read the archives and searched all over but could not find anything
> definative saying it would work. Just alot of people with problems and no
> real solutions.
>
> If it is possible, do you have any tips or links to HOWTOs?
>
> Thanks
> Scott
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users