Logwatch bringt die Mails nicht raus

Alle weiteren Dienste, die nicht in die drei oberen Foren gehören.
Antworten
MiNe
Beiträge: 14
Registriert: 08.08.2005 13:27:00

Logwatch bringt die Mails nicht raus

Beitrag von MiNe » 23.04.2012 15:22:06

Hi!
Ich hab Logwatch nicht wie üblich mit sendmail sondern mit mail eingerichtet.
Meine Konfiguration sieht folgendermaßen aus:

Code: Alles auswählen

mailer = "/usr/bin/mail -t"
TmpDir = /tmp
MailFrom = root
MailTo = host@host.at
Output = mail
Format = text
Service = All
Wenn ich nun mittels

Code: Alles auswählen

sudo logwatch
einen Testlauf mache, bekomme ich eine Fehlermeldung, dass offensichtlich die Empfängermailadresse falsch an /usr/bin/mail übergeben wurde:

Code: Alles auswählen

mine@vpn1:~$ sudo logwatch
You have old files in your logwatch tmpdir (/tmp):
        logwatch.BELbQXTq
        logwatch.A2ZQ15B_
        logwatch.6UKPhGTo
        logwatch.epBt3lz0
        logwatch.GzebjPkJ
        logwatch.gDzbJxKL
        logwatch.PhnwXlS6
        logwatch.XmK66hPK
The directories listed above were most likely created by a
logwatch run that failed to complete successfully.  If so, you
may delete these directories.

Cannot parse address `To: user@host.at' (while expanding `To: user@host.at'): Format of RFC822 object is bad
mine@vpn1:~$
Ich vermute mal stark, dass bei der Anweisung

Code: Alles auswählen

mailer = "/usr/bin/mail -t"
der Parameter nicht passt. Ohne Parameter klappts aber auch nicht. Hat jemand eine Idee, was ich verändern müsste?

MfG,
MiNe
Zuletzt geändert von MiNe am 23.04.2012 19:19:09, insgesamt 2-mal geändert.

Cae
Beiträge: 6349
Registriert: 17.07.2011 23:36:39
Wohnort: 2130706433

Re: Logwatch bringt die Mails nicht raus

Beitrag von Cae » 23.04.2012 16:01:45

Mutmaßlich ist dies die Aufforderung, die E-Mail-Adresse konform im Format

Code: Alles auswählen

<user@host>
zu schreiben.

Gruß Cae
If universal surveillance were the answer, lots of us would have moved to the former East Germany. If surveillance cameras were the answer, camera-happy London, with something like 500,000 of them at a cost of $700 million, would be the safest city on the planet.

—Bruce Schneier

MiNe
Beiträge: 14
Registriert: 08.08.2005 13:27:00

Re: Logwatch bringt die Mails nicht raus

Beitrag von MiNe » 23.04.2012 19:16:24

Cae hat geschrieben:Mutmaßlich ist dies die Aufforderung, die E-Mail-Adresse konform im Format

Code: Alles auswählen

<user@host>
zu schreiben.
Danke für den Hinweis. Nun sieht die Fehlermeldung aber folgendermaßen aus:

Code: Alles auswählen

Cannot parse address `To: <host@host.at>' (while expanding `To: <host@host.at>'): Format of RFC822 object is bad
Ich vermute, dass das Binary mail die Adresse als "To: host@host.at" anstatt "host@host.at" übergeben bekommt.

Cae
Beiträge: 6349
Registriert: 17.07.2011 23:36:39
Wohnort: 2130706433

Re: Logwatch bringt die Mails nicht raus

Beitrag von Cae » 23.04.2012 19:30:46

Ich kenne (bsdmailx) den Parameter -t nicht, normalerweise wird die Adresse einfach als letztes Argument übergeben. Was ist überhaupt dein Mailer?

Code: Alles auswählen

$ readlink -f /usr/bin/mail
Auch könnte ein abschließendes Space fehlen.

Gruß Cae
If universal surveillance were the answer, lots of us would have moved to the former East Germany. If surveillance cameras were the answer, camera-happy London, with something like 500,000 of them at a cost of $700 million, would be the safest city on the planet.

—Bruce Schneier

MiNe
Beiträge: 14
Registriert: 08.08.2005 13:27:00

Re: Logwatch bringt die Mails nicht raus

Beitrag von MiNe » 23.04.2012 20:04:57

Also als MTA verwende ich Postfix und als Mailer mail aus dem mailutils Paket.
Der Parameter -t gibt an, dass er mit der Abfrage des Empfängers beginnen soll. Wenn ich nur /usr/bin/mail aufrufe, bekomme ich lediglich die Meldung

Code: Alles auswählen

No mail for root
Genau diese Meldung bekomme ich auch, wenn ich in der Logwatch Konfiguration den Parameter -t wegnehme.

Code: Alles auswählen

mine@vpn1:~$ sudo logwatch
You have old files in your logwatch tmpdir (/tmp):
        logwatch.BELbQXTq
        logwatch.A2ZQ15B_
        logwatch.6UKPhGTo
        logwatch.epBt3lz0
        logwatch.GzebjPkJ
        logwatch.gDzbJxKL
        logwatch.PhnwXlS6
        logwatch.XmK66hPK
        logwatch.Mgf7VPC0
The directories listed above were most likely created by a
logwatch run that failed to complete successfully.  If so, you
may delete these directories.

No mail for root
mine@vpn1:~$

MiNe
Beiträge: 14
Registriert: 08.08.2005 13:27:00

Re: Logwatch bringt die Mails nicht raus

Beitrag von MiNe » 24.04.2012 08:46:05

So, ich habs nun zum Laufen bekommen, indem ich einfach das sendmail Binary von einem anderen Rechner in meinen Benutzerordner kopiert hab. Anschließend hab ich in der Logwatch Konfig einfach den Pfad dementsprechend gesetzt.

@Cae: Danke für deine Hilfe!

MfG,
MiNe

Cae
Beiträge: 6349
Registriert: 17.07.2011 23:36:39
Wohnort: 2130706433

Re: Logwatch bringt die Mails nicht raus

Beitrag von Cae » 24.04.2012 08:59:51

Was ich wohl oben nicht geschrieben hatte, falls "das normale mail" nicht ausreicht, war bisher Debianbsdmailx die Lösung. Doch, hatte ich ja geschrieben… nur hattest du den Readlink-Befehl nicht ausgeführt, weiteres Debugging ausgeschlossen.

Gruß Cae
If universal surveillance were the answer, lots of us would have moved to the former East Germany. If surveillance cameras were the answer, camera-happy London, with something like 500,000 of them at a cost of $700 million, would be the safest city on the planet.

—Bruce Schneier

MiNe
Beiträge: 14
Registriert: 08.08.2005 13:27:00

Re: Logwatch bringt die Mails nicht raus

Beitrag von MiNe » 24.04.2012 09:50:16

Ah, alles klar. Konnte nur mit bsdmailx nichts anfangen, weil es mir nicht geläufig ist.

MiNe

Antworten