Re: Questions about the python3 version of TMDA
Hippo Man <[email protected]> Thu, 2 Jun 2022 22:12:13 -0400
| Newsgroups | gmane.mail.spam.tmda.user |
|---|---|
| Message-ID | <CAK1LP6mv3HXb=-hqJZbYc75pHyNWi-euW9AE-0RwjoyLCLp17A@mail.gmail.com> |
--===============2665079688713341351== Content-Type: multipart/alternative; boundary="00000000000042edcd05e081a7cd" --00000000000042edcd05e081a7cd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > However, it turns out that the C=C3=A9dric Dufour version runs under Pyth= on 3. > I decided to take the plunge and try it, and I very easily got it to work!!! ... but unfortunately, I still have to deal with tmda-cgi. I found several versions of it on line and tried each of them, but none work in conjunction with thi= s Python 3 version of TMDA. And it would be major piece of work to convert any of the existing tmda-cgi releases to Python 3, and therefore, I believe I will have to write my own replacement for tmda-cgi in order to accomplish this. I already have been using a command-line utility that I wrote a number of years ago (in the Ruby language) to go through my pending emails and either release, blacklist, whitelist, or delete them via invocations of "tmda-pending". But I want a web-based app for doing this, and so I guess I will have to us= e my command-line code as a starting point in order to write my own web-based tmda-cgi-like utility. Or perhaps is there already some sort of alternative web-based front end to tmda? I haven't been able to find such a thing, but perhaps I am missing something. Thanks in advance for any thoughts or suggestions. --=20 [email protected] Take a hippopotamus to lunch today. On Thu, Jun 2, 2022 at 1:44 AM Hippo Man <[email protected]> wrote: > > I really tried to get TMDA working with python3 but eventually I gave up >> and decided to just stick with python2. Admittedly, my python skills are >> poor, and I didn't want to spend more hours trying to get it to work. >> >> Hopefully you'll make better progress than I did! >> >> Chris >> > > Thank you! > > And yes, I understand, I spent way, *way* too much time trying to convert > the original Python 2 TMDA code to Python 3. It ended up being a big > mess, and I finally gave up. > > However, it turns out that the C=C3=A9dric Dufour version runs under Pyth= on 3. > I decided to take the plunge and try it, and I very easily got it to > work!!! > ... as follows: > > % cd [work directory] > > % git clone https://github.com/cedric-dufour/tmda.git > > % cd tmda > > % sudo python3 setup.py install > > This installs the Python 3 TMDA executables into /usr/local/bin , and the= y > all work for me! It turns out that the "debian" subdirectory that I was > asking about in my previous message is totally irrelevant. The only > purpose of that subdirectory is for facilitating the creation of a debian > APT package for TMDA. There is no need to do that, since the steps I > outlined above will perform a full TMDA installation on your own linux > machine. > > After performing those steps, I only had to make one tiny change to my > existing TMDA configuration: > > Near the top of /etc/tmdarc is the following line of code: > os.makedirs(LOGDIR, 0755) > > That simply needs to be changed to this: > os.makedirs(LOGDIR, 0o755) > > (*i.e.*, put a lower-case letter "o" between the zero and the seven) > > Some of my own scripts had to be changed, because I had the original > Python 2 TMDA code in /usr/local/tmda/bin, and I had to change a small > number of references to that directory into /usr/local/bin. But to be > clear, > those changes are in my own code which *calls* TMDA executables ... > not in any of the Python 3 TMDA code itself. > > One caveat is that I do not use TMDA for challenge-response these > days, and I have never used it for tagging ... only for whitelisting, for > blacklisting, and for putting unfamiliar messages into the Pending queue > so I can inspect them via the TMDA-cgi web software and decide what > to do with them. Therefore, I don't know if you would encounter > challenge-response or tagging issues. However, given how well the > Python 3 version is working for me, I am optimistic that those functions > would also probably work. > > If you or anyone else want to try this Python 3 version of TMDA, and > if problems are encountered, I'm glad to offer whatever help I can here > in this mailing list. > <https://github.com/cedric-dufour/tmda.git> > -- > [email protected] > Take a hippopotamus to lunch today. > > > >> >> On Wed, 1 Jun 2022, Hippo Man wrote: >> > I have done a "git clone" of the python3 version of TMDA from here: >> > https://github.com/cedric-dufour/tmda.git >> > >> > And I have done a "python3 setup.py install". >> > >> > I see that it created a TMDA directory tree under /opt/local/share/tmd= a >> > >> > In the cloned git directory, there is also a "debian" subdirectory, an= d >> since >> > I am running under Debian-11, I want to install that debian-specific >> code. >> > However, this debian code was not installed anywhere after my run of >> > "python3 setup.py install", and I could not find any instructions for >> how >> > to install that debian code. >> > >> > Futhermore, in the documentation that came with this TMDA version, >> > there are a few references to http://wiki.tmda.net, but that web site >> > no longer exists. >> > >> > Is there any place where I could find instructions for how to do a ful= l, >> > complete TMDA install of this python3 version on my Debian host? >> > >> > Thanks in advance for any pointers and help! >> > >> > -- >> > [email protected] >> > Take a hippopotamus to lunch today. >> > >> > >> > On Wed, Jun 1, 2022 at 10:14 AM Hippo Man <[email protected]> wrote: >> > Thank you very much. >> > >> > And I'm glad to see that this mailing list is actually still alive! >> > >> > Also, I went to your github site, and see that there are links there >> for two >> > Python3 forks. TMDA is the only Python2 code on my server, and I very >> > much want to get rid of Python2 completely. I'm going to check out bot= h >> of >> > those Python3 TMDA forks, and I'm happy that they exist. >> > >> > -- >> > [email protected] >> > Take a hippopotamus to lunch today. >> > >> > >> > On Wed, Jun 1, 2022 at 1:17 AM Chris Caputo <[email protected]> wrote: >> > Nice work! >> > >> > BTW, I maintain https://github.com/ccaputo/TMDAretro in case >> anyone has >> > trouble installing TMDA these days. >> > >> > Chris >> > >> > On Tue, 31 May 2022, Hippo Man wrote: >> > > I figured out the answer to my question. >> > > >> > > In case anyone might come to this mailing list some >> > > day and wants to know how I solved my problem, here >> > > is how I did so ... >> > > >> > > I can implement item #2 in my list below by means of >> > > an "incoming" filter. I created a "holdlist" file to contain >> > > match patterns for the set of addresses that I want to >> > > automatically put into a pending state, and I put the >> > > following rule into my incoming filter ... >> > > >> > > from-file ~/.tmda/lists/holdlist hold >> > > >> > > Now, I have succcessfully implemented all three items >> > > in my list. >> > > -- >> > > [email protected] >> > > Take a hippopotamus to lunch today. >> > > >> > > >> > > On Mon, May 30, 2022 at 7:51 PM Hippo Man <[email protected]> >> wrote: >> > > I've been using TMDA for something like 15 years, and I >> am still >> > > getting lots of benefit from it and am still very happy with i= t. >> > > >> > > If there is anyone who is actually reading this email list >> these days, >> > > I have a question about the use of TMDA. >> > > >> > > My question is this: I want to set up the following filtering >> rules ... >> > > >> > > (1) If the sender's email address is on a very small list (les= s >> than a >> > > dozen entries), I'd like the sender to be blacklisted. >> > > >> > > (2) if the sender's email address is on a very small list (les= s >> than a >> > > dozen entries), I'd like the email to be held in the pending >> queue. >> > > >> > > (3) If any email arrives whose sender address is not in either >> of those >> > > two small lists, I'd like it to be delivered. >> > > >> > > If all I had to deal with were item 1 and item 3, I could set >> ACTION_INCOMING >> > > to "ok" and simply put the unwanted sender addresses into a >> blacklist file. >> > > >> > > However, I don't know how to also handle item 2 along with >> items 1 and 3. >> > > Is what I want to do even possible with TMDA? >> > > >> > > If anyone is actually reading this email list and can answer m= y >> question, >> > > I will be greatly appreciative! >> > > >> > > -- >> > > [email protected] >> > > Take a hippopotamus to lunch today. > > --00000000000042edcd05e081a7cd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>> However, it turns out that the C=C3=A9dric Dufou= r version runs under Python 3.</div><div>> I decided to take the plunge = and try it, and I very easily got it to work!!!</div><div><br></div><div>..= . but unfortunately, I still have to deal with tmda-cgi. I found several ve= rsions</div><div>of it on line and tried each of them, but none work in con= junction with this</div><div>Python 3 version of TMDA.</div><div><br></div>= <div>And it would be major piece of work to convert any of the existing tmd= a-cgi</div><div>releases to Python 3, and therefore, I believe I will have = to write my own</div><div>replacement for tmda-cgi in order to accomplish t= his.</div><div><br></div><div>I already have been using a command-line util= ity that I wrote a number of</div><div>years ago (in the Ruby language) to = go through my pending emails and</div><div>either release, blacklist, white= list, or delete them via invocations of</div><div> "tmda-pending"= .</div><div><br></div><div>But I want a web-based app for doing this, and s= o I guess I will have to use</div><div>my command-line code as a starting p= oint in order to write my own</div><div>web-based tmda-cgi-like utility.</d= iv><div><br></div><div>Or perhaps is there already some sort of alternative= web-based front end to</div><div>tmda? I haven't been able to find suc= h a thing, but perhaps I am missing</div><div>something.</div><div><br></di= v><div>Thanks in advance for any thoughts or suggestions.<br></div><div><di= v dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature">= <div dir=3D"ltr"><div><br></div><div>-- <br>=C2=A0<a href=3D"mailto:hippoma= [email protected]" target=3D"_blank">[email protected]</a><br>=C2=A0Take a hippo= potamus to lunch today.<br></div></div></div></div><br></div><br><div class= =3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Jun 2, 2022 = at 1:44 AM Hippo Man <<a href=3D"mailto:[email protected]">hippoman@gma= il.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"m= argin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left= :1ex"><div dir=3D"ltr"><div dir=3D"ltr"><br></div><div class=3D"gmail_quote= "><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;borde= r-left:1px solid rgb(204,204,204);padding-left:1ex">I really tried to get T= MDA working with python3 but eventually I gave up <br> and decided to just stick with python2. Admittedly, my python skills are <b= r> poor, and I didn't want to spend more hours trying to get it to work.<b= r> <br> Hopefully you'll make better progress than I did!<br> <br> Chris<br></blockquote><div><br></div><div>Thank you!</div><div><br></div><d= iv>And yes, I understand, I spent way, *way* too much time trying to conver= t<br></div><div>the original Python 2 TMDA code to Python 3. It ended up be= ing a big<br></div><div>mess, and I finally gave up.</div><div><br></div><d= iv>However, it turns out that the C=C3=A9dric Dufour version runs under Pyt= hon 3.</div><div>I decided to take the plunge and try it, and I very easily= got it to work!!!</div><div>... as follows:<br></div><div><br></div><div s= tyle=3D"margin-left:40px">% cd [work directory]</div><div style=3D"margin-l= eft:40px"><br></div><div style=3D"margin-left:40px">% git clone <a href=3D"= https://github.com/cedric-dufour/tmda.git" rel=3D"noreferrer" target=3D"_bl= ank">https://github.com/cedric-dufour/tmda.git</a></div><div style=3D"margi= n-left:40px"><br></div><div style=3D"margin-left:40px">% cd tmda</div><div = style=3D"margin-left:40px"><br></div><div style=3D"margin-left:40px">% sudo= python3 setup.py install</div><div><br></div><div>This installs the Python= 3 TMDA executables into /usr/local/bin , and they</div><div>all work for m= e!=C2=A0 It turns out that the "debian" subdirectory that I was</= div><div>asking about in my previous message is totally irrelevant. The onl= y</div><div>purpose of that subdirectory is for facilitating the creation o= f a debian</div><div>APT package for TMDA. There is no need to do that, sin= ce the steps I</div><div>outlined above will perform a full TMDA installati= on on your own linux</div><div>machine.<br></div><div><br></div><div>After = performing those steps, I only had to make one tiny change to my</div><div>= existing TMDA configuration:</div><div><br></div><div>Near the top of /etc/= tmdarc is the following line of code:</div><div style=3D"margin-left:40px">= os.makedirs(LOGDIR, 0755)</div><div><br></div><div>That simply needs to be = changed to this:</div><div style=3D"margin-left:40px">os.makedirs(LOGDIR, 0= o755)</div><div><br></div><div>(<i>i.e.</i>, put a lower-case letter "= o" between the zero and the seven)</div><div><br></div><div>Some of my= own scripts had to be changed, because I had the original</div><div>Python= 2 TMDA code in /usr/local/tmda/bin, and I had to change a small</div><div>= number of references to that directory into /usr/local/bin. But to be clear= , <br></div><div>those changes are in my own code which *calls* TMDA execut= ables ...</div><div>not in any of the Python 3 TMDA code itself.</div><div>= <br></div><div>One caveat is that I do not use TMDA for challenge-response = these</div><div>days, and I have never used it for tagging ... only for whi= telisting, for</div><div>blacklisting, and for putting unfamiliar messages = into the Pending queue</div><div>so I can inspect them via the TMDA-cgi web= software and decide what</div><div>to do with them. Therefore, I don't= know if you would encounter</div><div>challenge-response or tagging issues= . However, given how well the</div><div>Python 3 version is working for me,= I am optimistic that those functions<br></div><div>would also probably wor= k.</div><div><br></div><div>If you or anyone else want to try this Python 3= version of TMDA, and</div><div>if problems are encountered, I'm glad t= o offer whatever help I can here</div><div>in this mailing list.</div><div>= </div><div><a href=3D"https://github.com/cedric-dufour/tmda.git" rel=3D"nor= eferrer" target=3D"_blank"></a></div><div><div><div dir=3D"ltr"><div dir=3D= "ltr"><div>-- <br>=C2=A0<a href=3D"mailto:[email protected]" target=3D"_bl= ank">[email protected]</a><br>=C2=A0Take a hippopotamus to lunch today.</d= iv><div><br></div></div></div></div></div><div>=C2=A0</div><blockquote clas= s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r= gb(204,204,204);padding-left:1ex"> <br> On Wed, 1 Jun 2022, Hippo Man wrote:<br> > I have done a "git clone" of the python3 version of TMDA fro= m here:<br> > <a href=3D"https://github.com/cedric-dufour/tmda.git" rel=3D"noreferre= r" target=3D"_blank">https://github.com/cedric-dufour/tmda.git</a><br> > <br> > And I have done a "python3 setup.py install".<br> > <br> > I see that it created a TMDA directory tree under /opt/local/share/tmd= a<br> > <br> > In the cloned git directory, there is also a "debian" subdir= ectory, and since<br> > I am running under Debian-11, I want to install that debian-specific c= ode.<br> > However, this debian code was not installed anywhere after my run of<b= r> > "python3 setup.py install", and I could not find any instruc= tions for how<br> > to install that debian code.<br> > <br> > Futhermore, in the documentation that came with this TMDA version,<br> > there are a few references to <a href=3D"http://wiki.tmda.net" rel=3D"= noreferrer" target=3D"_blank">http://wiki.tmda.net</a>, but that web site<b= r> > no longer exists.<br> > <br> > Is there any place where I could find instructions for how to do a ful= l,<br> > complete TMDA install of this python3 version on my Debian host?<br> > <br> > Thanks in advance for any pointers and help!<br> > <br> > --<br> > =C2=A0<a href=3D"mailto:[email protected]" target=3D"_blank">hippoman= @gmail.com</a><br> > =C2=A0Take a hippopotamus to lunch today.<br> > <br> > <br> > On Wed, Jun 1, 2022 at 10:14 AM Hippo Man <<a href=3D"mailto:hippom= [email protected]" target=3D"_blank">[email protected]</a>> wrote:<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0Thank you very much.<br> > <br> > And I'm glad to see that this mailing list is actually still alive= !<br> > <br> > Also, I went to your github site, and see that there are links there f= or two<br> > Python3 forks. TMDA is the only Python2 code on my server, and I very<= br> > much want to get rid of Python2 completely. I'm going to check out= both of<br> > those Python3 TMDA forks, and I'm happy that they exist.<br> > <br> > --<br> > =C2=A0<a href=3D"mailto:[email protected]" target=3D"_blank">hippoman= @gmail.com</a><br> > =C2=A0Take a hippopotamus to lunch today.<br> > <br> > <br> > On Wed, Jun 1, 2022 at 1:17 AM Chris Caputo <<a href=3D"mailto:ccap= [email protected]" target=3D"_blank">[email protected]</a>> wrote:<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0Nice work!<br> > <br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0BTW, I maintain <a href=3D"https://github.co= m/ccaputo/TMDAretro" rel=3D"noreferrer" target=3D"_blank">https://github.co= m/ccaputo/TMDAretro</a> in case anyone has<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0trouble installing TMDA these days.<br> > <br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0Chris<br> > <br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0On Tue, 31 May 2022, Hippo Man wrote:<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> I figured out the answer to my question= .<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> In case anyone might come to this maili= ng list some<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> day and wants to know how I solved my p= roblem, here<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> is how I did so ...<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> I can implement item #2 in my list belo= w by means of<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> an "incoming" filter. I creat= ed a "holdlist" file to contain<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> match patterns for the set of addresses= that I want to<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> automatically put into a pending state,= and I put the<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> following rule into my incoming filter = ...<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> from-file ~/.tmda/lists/holdlist hold<b= r> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> Now, I have succcessfully implemented a= ll three items<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> in my list.<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> --<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> =C2=A0<a href=3D"mailto:hippoman@gmail.= com" target=3D"_blank">[email protected]</a><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> =C2=A0Take a hippopotamus to lunch toda= y.<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> On Mon, May 30, 2022 at 7:51 PM Hippo M= an <<a href=3D"mailto:[email protected]" target=3D"_blank">hippoman@gma= il.com</a>> wrote:<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0I've been= using TMDA for something like 15 years, and I am still<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> getting lots of benefit from it and am = still very happy with it.<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> If there is anyone who is actually read= ing this email list these days,<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> I have a question about the use of TMDA= .<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> My question is this: I want to set up t= he following filtering rules ...<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> (1) If the sender's email address i= s on a very small list (less than a<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> dozen entries), I'd like the sender= to be blacklisted.<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> (2) if the sender's email address i= s on a very small list (less than a<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> dozen entries), I'd like the email = to be held in the pending queue.<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> (3) If any email arrives whose sender a= ddress is not in either of those<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> two small lists, I'd like it to be = delivered.<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> If all I had to deal with were item 1 a= nd item 3, I could set ACTION_INCOMING<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> to "ok" and simply put the un= wanted sender addresses into a blacklist file.<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> However, I don't know how to also h= andle item 2 along with items 1 and 3.<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> Is what I want to do even possible with= TMDA?<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> If anyone is actually reading this emai= l list and can answer my question,<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> I will be greatly appreciative!<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> --<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> =C2=A0<a href=3D"mailto:hippoman@gmail.= com" target=3D"_blank">[email protected]</a><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0> =C2=A0Take a hippopotamus to lunch toda= y.</blockquote></div></div> </blockquote></div> --00000000000042edcd05e081a7cd-- --===============2665079688713341351== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============2665079688713341351== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ tmda-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tmda-users --===============2665079688713341351==--