Re: Mail von Cron kommen nicht an

From: <emfau(at)t-online.de>
Date: Fri, 17 Jun 2005 16:25:51 +0200

Hi Matthias,

> versuch doch bitte mal das folgende bei dir:
> /usr/sbin/sendmail -FCronDaemon -odi -oem -oi -t
> From: "root (Cron Daemon)"
> ^D
>
> Das sollte dann genau das gleiche Verhalten wie bei mir bringen.
> Wenn das nicht der Fall ist, ist definitiv was an der Config von exim kaputt.

Also, der Aufruf geht mit einer bounce schief, die bekannt vor kommt

<snip>
A message that you sent contained no recipient addresses, and therefore no
delivery could be attempted.

------ This is a copy of your message, including all the headers. ------

From: root (Cron Daemon)
From: root(at)xxxxxx (Cron Daemon)
Message-Id: <E1DjGdN-000HLO-V9(at)xxxxxx>
Date: Fr, 17 Jun 2005 15:11:48 +0200
</snip>

Nachdem ich in der Doku geblaettert habe, wundert mich das aber auch nicht,
weil (http://www.exim.org/exim-html-4.50/doc/html/spec_5.html#IX535)

-t When Exim is receiving a locally-generated, non-SMTP message on its
         standard input, the -t option causes the recipients of the message to
         be obtained from the To:, Cc:, and Bcc: header lines in the message
         instead of from the command arguments.
         The addresses are extracted before any rewriting takes place.

         ...

In diesem Fall gibt's ja keinen To, Cc oder Bcc Header, so dass es schief gehen
muss, or am I wrong?! Erwartungsgemaess wird folgendes erfolgreich zugestellt

     $ /usr/sbin/sendmail -FCronDaemon -odi -oem -oi -t
     From: "root (Cron Daemon)"
     To: "Michael" <michael(at)test-intern.org>
     ^D

Wenn ich auf meinem Server, auf dem cron+exim erfolgreich laeuft, das logging
andrehe, sehe ich folgendes

     2005-06-17 16:00:01 +0200
         cwd=/root
         6 args: /usr/sbin/sendmail -FCronDaemon -odi -oem -oi -t

Zu gut deutsch, es wird genau jenes Kommando erzeugt, dass von der Konsole aus
fehlschlaegt (wenn kein To: Header angegeben wird).

     2005-06-17 15:20:01 +0200 1DjHO5-000HSW-2O
         <= root(at)xxxxx
         U=root P=local S=509 T="Cron <root(at)xxxx> echo test"
         from <rootxxxx> for root
     2005-06-17 15:20:01 +0200
         cwd=/var/spool/exim
         4 args: /usr/local/sbin/exim -odi -Mc 1DjHO5-000HSW-2O
     2005-06-17 15:20:01 +0200 1DjHO5-000HSW-2O
         => Michael(at)xxxxx (caretaker(at)xxx) <root(at)xxxx>
         F=<root(at)xxxxx> P=<root(at)xxxx>
         R=smart_host T=smtp_incoming S=527 H=10.0.0.112 [10.0.0.112]:2525
         X=TLSv1:AES256-SHA:256 CV=no DN="xxxx"
         C="250 OK id=1DjHO5-000HSa-6H"
         QT=0s DT=0s
     2005-06-17 15:20:01 +0200 1DjHO5-000HSW-2O
         Completed QT=0s

Da es allerdings gut geht, scheint auf dieser Maschine cron eine korrekte Mail
zu erzeugen...
Hast Du schon mal ohne MAILTO probiert? In dem Fall geht die Mail ja an root
und da doch sowieso ein alias root -> idefix(at)fechner.net existiert, sollte die
mail an der gewuenschten Stelle ankommen. Das ist auch so ziemlich der einzige
relevante Unterschied zwischen Deiner und meiner Konfguration, wenn ich es
richtig ueberblicke.

Als denne, enjoy the bug hunt;-)
   Michael

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Fri 17 Jun 2005 - 16:27:08 CEST

search this site