Re: Questions about the python3 version of TMDA
Hippo Man <[email protected]> Thu, 2 Jun 2022 01:44:23 -0400
| Newsgroups | gmane.mail.spam.tmda.user |
|---|---|
| Message-ID | <CAK1LP6k6nKAG-kje95PEruCmaCytMfhJy2ta7oHQeTCXNa1scg@mail.gmail.com> |
--===============4234636817817861484== Content-Type: multipart/alternative; boundary="0000000000002f54c205e070802e" --0000000000002f54c205e070802e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > 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 Python= 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 they 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> --=20 [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/tmda > > > > In the cloned git directory, there is also a "debian" subdirectory, and > 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 h= ow > > 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 full= , > > 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 fo= r > 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 both > 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 a= m > still > > > getting lots of benefit from it and am still very happy with it= . > > > > > > If there is anyone who is actually reading this email list thes= e > 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 (less > 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 (less > 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 item= s > 1 and 3. > > > Is what I want to do even possible with TMDA? > > > > > > If anyone is actually reading this email list and can answer my > question, > > > I will be greatly appreciative! > > > > > > -- > > > [email protected] > > > Take a hippopotamus to lunch today. --0000000000002f54c205e070802e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><div class=3D"gmail_quote"><blo= ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left= :1px solid rgb(204,204,204);padding-left:1ex">I really tried to get TMDA wo= rking 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" class=3D"gm= ail_signature"><div dir=3D"ltr"><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.</div><div><br></div></div></div></div></div><div>= =C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0= .8ex;border-left:1px solid rgb(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> --0000000000002f54c205e070802e-- --===============4234636817817861484== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============4234636817817861484== 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 --===============4234636817817861484==--