-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall_qdated.sh
69 lines (55 loc) · 2.4 KB
/
install_qdated.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
# qdated Installation im Uberspace
# Auskunft, 24.04.2013
# www.8300111.de
# Werte einlesen
echo "Wohin mit den Mails (z.B. 'uberspaceuser-info', ohne ' )?"
read to_adress
echo "Praefix fuer die temp. Mails (z.B. 'dated', ohne ' ):"
read prefix
echo "Domain fuer deine temporaeren Adressen (hinter dem @-Zeichen, also \"domain.de\" oder \"username.server.uberspace.de\"):"
read suffix
# Ordner im bin-Verzeichnis des Users anlegen
mkdir ~/bin/qdated
cd ~/bin/qdated
# qdated herunterladen
# original Link offline, wget http://www.palomine.net/qdated/qdated-0.53.tar.gz
wget http://web.archive.org/web/20130408040225/http://www.palomine.net/qdated/qdated-0.53.tar.gz
gunzip qdated-0.53.tar.gz
tar -xpf qdated-0.53.tar
rm qdated-0.53.tar
cd mail/qdated-0.53/
# qdated nach ~/bin/qdated installieren
package/install
mv ~/bin/qdated/mail/qdated/command/* ~/bin/qdated
rm -r ~/bin/qdated/mail
# qdated key erzeugen
~/bin/qdated/qdated-makekey
# .qmail Datei zum pruefen der eingehenden Mails erzeugen
echo "# Adresse darf maximal 7 Tage und 12 Stunden alt sein (60*60*24*7 + 60*60*12 = 648000 Sekunden)" > ~/.qmail-$prefix-default
echo "|~/bin/qdated/qdated-check 648000" >> ~/.qmail-$prefix-default
echo "$to_adress" >> ~/.qmail-$prefix-default
# erzeuge ein Script (in ~/bin/qdated/get_new_mail.sh, das von einem Cronjob aufgerufen werden kann und eine vollstaendige,
# aktuelle E-Mail Adresse in ~/html/current_mail schreibt
echo "#!/bin/bash" > ~/bin/qdated/get_new_mail.sh
echo "" >> ~/bin/qdated/get_new_mail.sh
echo "# schreibt bei Aufruf eine vollstaendige E-Mail Adresse mit aktuellem Zeitstempel" >> ~/bin/qdated/get_new_mail.sh
echo "# in ~/html/current_mail" >> ~/bin/qdated/get_new_mail.sh
echo "# www.8300111.de" >> ~/bin/qdated/get_new_mail.sh
echo "" >> ~/bin/qdated/get_new_mail.sh
echo "PREFIX=$prefix-" >> ~/bin/qdated/get_new_mail.sh
echo "SUFFIX=@$suffix" >> ~/bin/qdated/get_new_mail.sh
echo "TIMESTAMP=\`~/bin/qdated/qdated-now\`" >> ~/bin/qdated/get_new_mail.sh
echo "TOPATH=~/html/current_mail" >> ~/bin/qdated/get_new_mail.sh
echo "" >> ~/bin/qdated/get_new_mail.sh
echo "echo -n \$PREFIX\$TIMESTAMP\$SUFFIX > \$TOPATH" >> ~/bin/qdated/get_new_mail.sh
chmod +x ~/bin/qdated/get_new_mail.sh
echo ""
echo "--------"
echo ""
echo ""
echo "Fertig!"
echo "Details siehe Doku, 'https://web.archive.org/web/20160223134423/http://www.palomine.net/qdated/'"
echo "Jetzt Cronjob einrichten!"
echo ""
echo ""