Hi Jason,
Since solving my problem, I have done some tinkering with the 'tmda-pending'
script, so that I can use it for multiple uses, from within a script that is
being run as root.
Now I believe this could be a good addition to the tmda-pending script in
the next version of tmda, just in case others have the same issue.
Here are the additions I have made to my tmda-pending:
...
Usage:
...
-u <username>
--user=<username>
Specify a username for tmda-pending to run as.
...
...
import pwd
...
...
...
try:
opts, args = getopt.getopt(sys.argv[1:],
'cu:ipbrdsTSCADR:Y:O:vqVh',
['config-file=',
'user=',
...
...
...
elif opt in ('-u', '--user'):
os.environ['USER'] = arg
os.environ['HOME'] = pwd.getpwnam(arg)[5]
...
...
And with those changes, in my perl script (runnning as root) sitting on our
mail server listening to requests from the web interface, when a user wants
to release a message, the command below is called:
exec( "tmda-pending --user=$user -b -r -q $msgid.msg" );
Well it may be useful, or it might not be.
Mike
> Thanks for your help Jason, I did some further searching around at the
> previous code that was written on our interface before I took it over, and
> manged to find the problems and fix them.
> I also upgraded to tmda 0.56, as that is the stable package that comes
with
> debian woody, otherwise I'd have to d/l a whole lot of new *.debs to get
> tmda 0.68 going... and maybe even python2.2 . But thats something I can do
> at a later stage.
>
> Basically the interface was realeasing messages by just moving them from
> pending to maildir (eg qx( 'mv $home/.tmda/pending/$msg
> $home/Maildir/new' ) ).
> So when the sender replies to a confirmation email, there is no pending
msg
> in /pending/ and there is no entry in the .delivered_cache file , so it is
> bounced back.
>
> I have solved this by using:
> qx ( "su $user -c 'exec tmda-pending -b -r -q $msgid'" );
> in the perl server daemon in on our mail server, so if someone happens to
> release an email before a sender confirms it, the sender will receive a
"the
> email has already been released and delivered" message.
>
> So all working good now, and I must say with the past few days of it
working
> fully with the interface I've completed, seems to be a great system!
> Cheers.
>
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users