From a7ecc784aa5ed954a1b31ec799c16d930c1b1eed Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 4 Dec 2015 13:15:45 +0100 Subject: auf Verwendung von hashcash statt sha1sum umgestellt --- emails.lps | 97 ++++++++++++++++++++++++++++++-------------------------------- unit1.lfm | 12 ++++---- unit1.pas | 34 ++++++++++++++++------ 3 files changed, 78 insertions(+), 65 deletions(-) diff --git a/emails.lps b/emails.lps index a01cd53..c3f7382 100644 --- a/emails.lps +++ b/emails.lps @@ -9,7 +9,7 @@ - + @@ -19,9 +19,9 @@ - - - + + + @@ -29,9 +29,9 @@ - - - + + + @@ -50,9 +50,9 @@ - - - + + + @@ -66,123 +66,120 @@ - - + - + - + - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/unit1.lfm b/unit1.lfm index 0ca6924..4677922 100644 --- a/unit1.lfm +++ b/unit1.lfm @@ -1,7 +1,7 @@ object Form1: TForm1 - Left = 1462 + Left = 137 Height = 756 - Top = 167 + Top = 158 Width = 999 Caption = 'Form1' ClientHeight = 756 @@ -72,18 +72,18 @@ object Form1: TForm1 end object CheckBox1: TCheckBox Left = 272 - Height = 21 + Height = 24 Top = 596 - Width = 93 + Width = 98 Caption = 'aufploppen' OnClick = CheckBox1Click TabOrder = 2 end object CheckBox2: TCheckBox Left = 416 - Height = 21 + Height = 24 Top = 596 - Width = 86 + Width = 94 Caption = 'Ton geben' Checked = True OnClick = CheckBox1Click diff --git a/unit1.pas b/unit1.pas index 5871981..d7da1d3 100644 --- a/unit1.pas +++ b/unit1.pas @@ -87,6 +87,17 @@ begin pc.host:='eckner.net'; pc.user:='notify@eckner.net'; pc.pass:='C7sd7k8*'; + pc.gueltigerAdressat:='('+ + '.*@eckner\.net' +'|'+ + '(ee|intern|vorstand)@wurzel\.org' +'|'+ + 'erich\.eckner@uni-jena\.de' +'|'+ + 'erich\.eckner@gmx\.de' +'|'+ + '(ioq_(nlo|staff)|alle_mitarbeiter|fsr-physik-newsletter)@listserv\.uni-jena\.de' +'|'+ + '(sox-users|logwatch-devel)@lists\.sourceforge\.net' +'|'+ + 'gmp-discuss@gmplib\.org' +'|'+ + 'hashcash@freelists\.org' +'|'+ + 'crux(-commits)?@lists.crux.nu'+ + ')'; pc.port:=995; end; @@ -169,30 +180,33 @@ end; procedure tForm1.neueNachrichten(sender: tObject); var - i,mitMarkeDa: longint; - argumente: array of string; - ausgabe: string; + i,ung,mitMarkeDa: longint; + argumente: array of string; + ausgabe: string; begin mitMarkeDa:=0; memo1.lines.clear; + ung:=0; for i:=pc.nAnz-1 downto 0 do case pc.marke(i) of - mvUngueltig: - pc.loesche(i); mvGueltig: begin inc(mitMarkeDa); memo1.lines.add('! '+pc.zeit(i)+' '+pc.von(i)+': '+pc.betreff(i)); end; + mvUngueltig: begin + memo1.lines.add('( '+pc.zeit(i)+' '+pc.von(i)+': '+pc.betreff(i)+' )'); + inc(ung); + end; mvKeine: - memo1.lines.add(pc.zeit(i)+' '+pc.von(i)+': '+pc.betreff(i)); + memo1.lines.add(' '+pc.zeit(i)+' '+pc.von(i)+': '+pc.betreff(i)); end{of case}; - if pc.nAnz=0 then begin + if pc.nAnz<=ung then begin trayIcon1.icon:=nichtsDaIcon.picture.icon; trayIcon1.hint:='keine Post'; end else begin trayIcon1.icon:=emailsDaIcon.picture.icon; - trayIcon1.hint:=inttostr(pc.nAnz)+' neue Nachrichten'; + trayIcon1.hint:=inttostr(pc.nAnz-ung)+' neue Nachrichten'; if mitMarkeDa>0 then begin trayIcon1.hint:=trayIcon1.hint+', davon '+inttostr(mitMarkeDa)+' mit Marke'; if checkBox1.checked then @@ -201,11 +215,13 @@ begin setlength(argumente,1); argumente[0]:=extractFilePath(application.exename)+'gotmail.wav'; ausgabe:=''; - runCommand('mplayer',argumente,ausgabe); + runCommand('play',argumente,ausgabe); setlength(argumente,0); end; end; end; + if ung>0 then + trayIcon1.hint:=trayIcon1.hint+' (und noch '+inttostr(ung)+' mit ungültiger Marke)'; trayIcon1.visible:=true; form1.icon:=trayIcon1.icon; form1.caption:=trayIcon1.hint; -- cgit v1.2.3-70-g09d2