Autor Zpráva
peta
Profil
Lze nejak zjistit detaily, proc mi nechce odeslat mail funkci mail() ?
Na cz.php.net/mail je jen napsano, ze funkce vraci true/false, coz je dost malo, kdyz mi to nefunguje.

Nastaveno to mam dobre:
hlavicka = From: testmracek@seznam.cz Return-Path: testmracek@seznam.cz Reply-To: testmracek@seznam.cz Content-Type: text/plain; charset=utf-8
to = web@fpf.slu.cz
subj = [#980600] [Fwd: [Fwd: [Fwd: řeky daleké]]]

Jen mi to proste mail neodesle. imap mam v php nainstalovany, mozna na odeslani jeste nekde neco treba.
Program poustim z localhost pod linux Kubuntu (jestli treba neni problem v tom).
domixx
Profil
A vrací aspoň to true nebo false? Pokud před ní máš @, tak nezobrazí chyby...
nightfish
Profil
Program poustim z localhost pod linux Kubuntu (jestli treba neni problem v tom).
a spustí se alespoň sendmail? (to by mohlo jít vyčíst z nějakého logu)
je ten sendmail správně nakonfigurovaný?
peta
Profil
nightfish
Nemam zdani, PC jsem prebral po predchudci, imap jsem doinstalovaval, zkusim se podivat.
Jsem ocekaval, zem i php hodi nejakou chybu, kdyz se mu nepodari odeslat mail.

mimochodem, nasel jsem, ze imap ma vlastni funkci imap_mail(), ale ta se chova trochu odlisne.
Kdezto:
mail (...) - vrati nebyl odeslan, false
imap_send (...) - vrati byl odeslan, true, ale mail mi nedojde
peta
Profil
PHP imap_mail() - vraci TRUE
/var/log/apache2
chyba = sh: /usr/sbin/sendmail: not found

PHP mail() - vrati FALSE
a tutez chybu v logu

Takze neco nemam nastaveno, jasny. Co s tim dal?
v /usr/sbin/
neni zadny sendmail
Mireczech
Profil
nainstalovat a nakonfigurovat sendmail (sendmail: not found )
apt-get install sendmail
peta
Profil
jj, uz jsem provedl pres synaptik, taky napadlo :)
Docela dlouho trvalo.
Ale ted nepise v apache-logu nic, ale pise mail.log
... My unqualified mail host (localhost) - sleeping for retry

pise to funkce mail, jeste zkusim imap_mail()

Sep 20 14:10:07 localhost sendmail[17957]: My unqualified host name (localhost) unknown; sleeping for retry
Sep 20 14:11:07 localhost sendmail[17957]: unable to qualify my own domain name (localhost) -- using short name
Sep 20 14:11:07 localhost sendmail[17957]: alias database /etc/mail/aliases rebuilt by root
Sep 20 14:11:07 localhost sendmail[17957]: /etc/mail/aliases: 2 aliases, longest 9 bytes, 26 bytes total
Sep 20 14:11:07 localhost sm-mta[18091]: My unqualified host name (localhost) unknown; sleeping for retry
Sep 20 14:11:09 localhost sm-msp-queue[18099]: My unqualified host name (localhost) unknown; sleeping for retry
Sep 20 14:12:07 localhost sm-mta[18091]: unable to qualify my own domain name (localhost) -- using short name
Sep 20 14:12:07 localhost sm-mta[18134]: starting daemon (8.13.8): SMTP+queueing@00:10:00
Sep 20 14:12:09 localhost sm-msp-queue[18099]: unable to qualify my own domain name (localhost) -- using short name
Sep 20 14:12:37 localhost sendmail[18169]: My unqualified host name (localhost) unknown; sleeping for retry
Sep 20 14:13:35 localhost sendmail[18271]: My unqualified host name (localhost) unknown; sleeping for retry
Sep 20 14:14:36 localhost sendmail[18271]: unable to qualify my own domain name (localhost) -- using short name
Sep 20 14:14:36 localhost sendmail[18271]: l8KCEZ6b018271: from=www-data, size=1220, class=0, nrcpts=1, msgid=<200709201214.l8KCEZ6b018271@localhost>, relay=www-data@localhost
Sep 20 14:14:36 localhost sm-mta[18297]: l8KCEaim018297: from=<www-data@localhost>, size=1381, class=0, nrcpts=1, msgid=<200709201214.l8KCEZ6b018271@localhost>, proto=ESMTP, daemon=MSP-v4, relay=localhost [127.0.0.1]
Sep 20 14:14:36 localhost sendmail[18271]: l8KCEZ6b018271: to=web@fpf.slu.cz, ctladdr=www-data (33/33), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=31220, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (l8KCEaim018297 Message accepted for delivery)
Sep 20 14:14:36 localhost sm-mta[18299]: l8KCEaim018297: to=<web@fpf.slu.cz>, ctladdr=<www-data@localhost> (33/33), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=121381, relay=decsu.fpf.slu.cz. [193.84.192.10], dsn=5.6.0, stat=Data format error
Sep 20 14:14:36 localhost sm-mta[18299]: l8KCEaim018297: l8KCEaim018299: DSN: Data format error
Sep 20 14:14:37 localhost sm-mta[18299]: l8KCEaim018299: to=<www-data@localhost>, delay=00:00:01, xdelay=00:00:01, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Sep 20 14:15:10 localhost sendmail[18319]: My unqualified host name (localhost) unknown; sleeping for retry
Sep 20 14:16:10 localhost sendmail[18319]: unable to qualify my own domain name (localhost) -- using short name
Sep 20 14:16:55 localhost sendmail[18382]: My unqualified host name (localhost) unknown; sleeping for retry
Sep 20 14:17:55 localhost sendmail[18382]: unable to qualify my own domain name (localhost) -- using short name
Sep 20 14:17:55 localhost sendmail[18382]: l8KCHtHQ018382: from=www-data, size=1309, class=0, nrcpts=1, msgid=<200709201217.l8KCHtHQ018382@localhost>, relay=www-data@localhost
Sep 20 14:17:55 localhost sm-mta[18417]: l8KCHt4E018417: from=<www-data@localhost>, size=1470, class=0, nrcpts=1, msgid=<200709201217.l8KCHtHQ018382@localhost>, proto=ESMTP, daemon=MSP-v4, relay=localhost [127.0.0.1]
Sep 20 14:17:55 localhost sendmail[18382]: l8KCHtHQ018382: to=web@fpf.slu.cz, ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31309, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (l8KCHt4E018417 Message accepted for delivery)
Sep 20 14:17:56 localhost sm-mta[18419]: l8KCHt4E018417: to=<web@fpf.slu.cz>, ctladdr=<www-data@localhost> (33/33), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=121470, relay=decsu.fpf.slu.cz. [193.84.192.10], dsn=5.6.0, stat=Data format error
Sep 20 14:17:56 localhost sm-mta[18419]: l8KCHt4E018417: l8KCHu4E018419: DSN: Data format error
Sep 20 14:17:56 localhost sm-mta[18419]: l8KCHu4E018419: to=<www-data@localhost>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Sep 20 14:20:01 localhost sm-msp-queue[18499]: My unqualified host name (localhost) unknown; sleeping for retry
Sep 20 14:20:46 localhost sendmail[18530]: My unqualified host name (localhost) unknown; sleeping for retry
Sep 20 14:21:01 localhost sm-msp-queue[18499]: unable to qualify my own domain name (localhost) -- using short name
peta
Profil
nas linuxovy technik mi psal, ze treba nekde nastavit SMTP na nas server (aaa.bbb.cc)
peta
Profil
uz to mam vyresene

- odinstaloval jsem sendmail, pry je deravy...
- nainstaloval postfix
- zakomentoval vsechny radky v /etc/postfix/main.cf (protoze jsem je nepotreboval)
- pridal nebo pozmenil radky v /etc/postfix/main.cf (aaa.bbb.ccc.cz = smtp server):
myorigin = peter.aaa.bbb.ccc.cz
relayhost = aaa.bbb.ccc.cz
inet.interface = 127.0.0.1
local_transport = error:local delivery is disabled

a mail mi prisel na mailbox na nick@aaa.bbb.ccc.cz

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0