summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-02-28 15:02:43 +0100
committerErich Eckner <git@eckner.net>2017-02-28 15:02:43 +0100
commit2097525dc2d8e0d65fe7f2f07be7f642a70cc98c (patch)
tree3c570b188016d86358054e66e24bf2b7fd343ff4
parent4941a59d815e829128047bd253d01c17b5fb5eb2 (diff)
downloadEmails-2097525dc2d8e0d65fe7f2f07be7f642a70cc98c.tar.xz
gültige Adressaten in optionen.konf ausgelagert
-rw-r--r--optionen.konf3
-rw-r--r--unit1.pas35
2 files changed, 23 insertions, 15 deletions
diff --git a/optionen.konf b/optionen.konf
new file mode 100644
index 0000000..fa5e6e1
--- /dev/null
+++ b/optionen.konf
@@ -0,0 +1,3 @@
+aufploppen = NEIN
+Ton geben = JA
+gültiger Adressat = .*@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|radvd-devel-l@lists\.litech\.org|arch-general-request@archlinux\.org|users@httpd\.apache\.org
diff --git a/unit1.pas b/unit1.pas
index 32a5b48..835bb19 100644
--- a/unit1.pas
+++ b/unit1.pas
@@ -53,9 +53,20 @@ uses myStringListUnit, lowLevelUnit, process;
procedure TForm1.FormCreate(Sender: TObject);
var
- sl: tMyStringList;
- s: string;
+ sl: tMyStringList;
+ s,ga: string;
begin
+ ga:='.*@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' +'|'+
+ 'radvd-devel-l@lists\.litech\.org' +'|'+
+ 'arch-general-request@archlinux\.org';
if fileexists(extractfilepath(application.exename)+'optionen.konf') then begin
sl:=tMyStringList.create;
sl.loadFromFile(extractfilepath(application.exename)+'optionen.konf');
@@ -78,6 +89,10 @@ begin
else if s<>'' then
raise exception.create(''''+s+''' ist kein gültiger Wert für ''Ton geben'' (ja|nein)!');
+ s:=sl.grepFirst('^gültiger\s+Adressat\s*=');
+ if s<>'' then
+ ga:=s;
+
sl.free;
end;
@@ -88,19 +103,7 @@ 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' +'|'+
- 'radvd-devel-l@lists\.litech\.org' +'|'+
- 'arch-general-request@archlinux\.org'+
- ')';
+ pc.gueltigerAdressat:='('+ga+')';
pc.port:=995;
end;
@@ -131,6 +134,8 @@ begin
else
sl.add('Ton geben = NEIN');
+ sl.add('gültiger Adressat = '+copy(pc.gueltigerAdressat,2,length(pc.gueltigerAdressat)-2));
+
sl.saveToFile(extractfilepath(application.exename)+'optionen.konf');
sl.free;
end;