[TYPO3-german] Mailform-Test mit wget und --post-data

Illi, Cornelius Cornelius.Illi at student.hpi.uni-potsdam.de
Fri Aug 17 15:05:11 CEST 2007


Aufgefallen ist mir zudem gerade, dass sich das Formular auch nach dem Deaktivieren von Cookies versenden lässt. 
Das Problem also nicht an die Cookies liegen kann. 
Viele Grüße,

Cornelius 

-----Original Message-----
From: typo3-german-bounces at lists.netfielders.de [mailto:typo3-german-bounces at lists.netfielders.de] On Behalf Of Illi, Cornelius
Sent: Freitag, 17. August 2007 14:57
To: typo3-german at lists.netfielders.de
Subject: [TYPO3-german] Mailform-Test mit wget und --post-data

Hallo zusammen,

Da es bei mir Probleme mit dem Mailform gab - einige Zeit keine Mails darüber ankamen, möchte ich einen Cronjob einrichten, der testweise die Formulardaten abschickt. Folgendes Shell-Script habe ich dazu geschrieben, leider werden keine Mails abgeschickt, obwohl die Post-Variablen übergeben werden. (Dafür gibt's ein Script, welches in der index.php eingebunden wird, die Variablen abfängt und in eine Datei schreibt):

----------------------------------------------------------------------------------
#!/bin/bash

wget -o logw1 -d -O - --user-agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" --save-cookies cookies.txt --keep-session-cookies http://mydomain.de/formmail.html

wget -o logw2 -d -O - --user-agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" --save-cookies cookies.txt --keep-session-cookies --load-cookies cookies.txt --post-data="html_enabled=&subject=Testmail&locationData=1338:tt_content:3757&Geschlecht=Herr&Name=asd&Strasse=asd&PLZ_Ort=asd&Land=asd&Bundesland=ad&email=cornelius.illi at test.de&Status=asd&formtype_mail=Absenden" http://mydomain.de/formmail.html

rm cookies.txt
----------------------------------------------------------------------------------


Die zweite log-Datei logw2 liefert Folgendes:

----------------------------------------------------------------------------------
DEBUG output created by Wget 1.10.2 on linux-gnu.


Stored cookie mydomain.de -1 (ANY) / <permanent> <insecure> [expiry 2008-08-16 14:45:16] fe_typo_user 975a00284b
--14:45:16--  http://mydomain.de/formmail.html
           => `-'
Resolving mydomain.de/formail.html... xxx.xxx.xxx.xxx Caching mydomain.de/formail.html... xxx.xxx.xxx.xxx Connecting to mydomain.de/formail.html...xxx.xxx.xxx.xxx:80... connected.
Created socket 4.
Releasing 0x08099600 (new refcount 1).

---request begin---
POST /formmail.html HTTP/1.0^M
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)^M
Accept: */*^M
Host: mydomain.de/formail.html^M
Connection: Keep-Alive^M
Cookie: fe_typo_user=975a00284b^M
Content-Type: application/x-www-form-urlencoded^M
Content-Length: 250^M
^M
---request end---
[POST data: html_enabled=&subject=Testmail&locationData=1338:tt_content:3757&Geschlecht=Herr&Name=asd&Strasse=asd&PLZ_Ort=asd&Land=asd&Bundesland=ad&email=cornelius.illi at test.de&Status=asd&formtype_mail=Absenden]
HTTP request sent, awaiting response...
---response begin---
HTTP/1.0 200 OK^M
Date: Fri, 17 Aug 2007 12:46:00 GMT^M
Server: Apache^M
X-Powered-By: PHP/5.2.0-8+etch7^M
Set-Cookie: fe_typo_user=975a00284b; expires=Sat, 16-Aug-2008 12:45:16 GMT; path=/^M
Content-Type: text/html;charset=iso-8859-1^M
Via: 1.0 mydomain.de^M
Connection: close^M
^M
---response end---
200 OK
Deleted old cookie (to be replaced.)

Stored cookie mydomain.de -1 (ANY) / <permanent> <insecure> [expiry 2008-08-16 14:45:16] fe_typo_user 975a00284b
Length: unspecified [text/html]

    0K .......... .......... .......... .......... ..........    2.11 MB/s
   50K .......... .......... .......... ..                       1.41 MB/s

Closed fd 4
14:45:17 (1.76 MB/s) - `-' saved [84906]

Saving cookies to cookies.txt.
Done saving cookies.
----------------------------------------------------------------------------------

Mir fällt hier nichts verdächtiges auf. Hat jemand von euch einen Tipp warum man einem Typo3-System das so nicht unterjubeln kann?
Tests mit einfachen Formmailern funktionieren.
Alle erdenklichen Kombinationen der "Cookie-Parameter" (--save-cookies cookies.txt --keep-session-cookies --load-cookies cookies.txt), also weglassen einzelner, bin ich durchgegangen- ohne Erfolg. Vielen Dank für eure Hilfe.
Grüße,

Cornelius

_______________________________________________
TYPO3-german mailing list
TYPO3-german at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-german


More information about the TYPO3-german mailing list