|
|
 |

|

 |

| Community » CGI: Allgemeines Forum |
|
sendmail sendet nicht , kein log, kein mail aber script läuft
|
Seitenanfang |
| Hi! Ich bin mit meinem Latein am Ende: open(MAIL,"|/usr/sbin/sendmail -t") || print "Mailprogramm konnte nicht gestartet werden\n"; print MAIL "To: standfest.matthias\@standfest.com\n"; print MAIL "From: INTERNET\n"; print MAIL "Subject: $subject\n\n"; print MAIL "***$subject***\n"; print MAIL "--------------------------------\n\n"; print MAIL "$mailtext\n"; close(MAIL) || print "Mailprogramm konnte nicht ausgeführt werden\n";
eigentlich absolut simpel, und schon tausendmal bewährt, aber aus irgend einem grund bekomm ich keine e-mail vom cgi-script. - der pfad ist richtig - CHMOD 755 - der "\" vorm "@" ist da - und der abschließende testscreen
# -------> kontrollansicht # print "Content-type: text/plain\n\n"; # print "To: standfest.matthias\@standfest.com\n"; # print "From: INTERNET\n"; # print "Subject: $subject\n\n"; # print "***$subject***\n"; # print "--------------------------------\n\n"; # print "$mailtext\n";
zeigt mir auch keinen fehler.FRAGE: Kann mir bitte wer helfen und sagen, was ich die ganze zeit übersehe?
Datum: 17.09.2005-16:55

|
re: sendmail sendet nicht , kein log, kein mail aber script läuft
|
Seitenanfang |
| Vielleicht das From?
Datum: 17.09.2005-20:31

|
re: sendmail sendet nicht , kein log, kein mail aber script läuft
|
Seitenanfang |
Nein leider, das wars auch nicht. (habs auch anders probiert && in früheren scripten funzt das tadellos)
Datum: 18.09.2005-10:44

|
re: sendmail sendet nicht , kein log, kein mail aber script läuft
|
Seitenanfang |
| Dann faellt mir nur perldoc perlipc ein. Besonders die letzten Absaetze von "Using open() for IPC": Be careful to check both the open() and the close() return values. If you're writing to a pipe, you should also trap SIGPIPE. Otherwise, think of what happens when you start up a pipe to a command that doesn't exist: the open() will in all likelihood succeed (it only reflects the fork()'s success), but then your output will fail--spectacularly. Perl can't know whether the command worked because your command is actually running in a separate process whose exec() might have failed. Therefore, while readers of bogus commands return just a quick end of file, writers to bogus command will trigger a signal they'd better be prepared to handle. Consider: open(FH, "|bogus") or die "can't fork: $!"; print FH "bang\n" or die "can't write: $!"; close FH or die "can't close: $!"; That won't blow up until the close, and it will blow up with a SIGPIPE. To catch it, you could use this: $SIG{PIPE} = 'IGNORE'; open(FH, "|bogus") or die "can't fork: $!"; print FH "bang\n" or die "can't write: $!"; close FH or die "can't close: status=$?";
Wie's scheint gibt's /usr/sbin/sendmail auf dem System nicht... Vielleicht qmail oder sowas und keinen Symlink gesetzt? Support fragen.
Datum: 18.09.2005-22:30

|
re: sendmail sendet nicht , kein log, kein mail aber script läuft
|
Seitenanfang |
| Es war ein Serverfehler der PTA, die hatten angeblich ein fehlerhafters Sendmail-Update eingespielt. lg und vielen dank
Datum: 28.09.2005-12:55

|
|

|

|

|
 |

|

|
|