Skip to content

znapzend not sending ERROR email #547

@gchmurka123

Description

@gchmurka123

There is an error in using sendmail (after the -t option it is wrong to use the recipient's address )

using:
exim4-daemon-light 4.90.1-1ubuntu1.8

my patch to fix this issue:

--- lib/ZnapZend.pm.org 2021-05-17 13:37:00.313340036 +0200
+++ lib/ZnapZend.pm     2021-05-17 13:36:15.636878130 +0200
@@ -783,7 +783,7 @@ my $sendRecvCleanup = sub {
             #my $mailprog = '/usr/lib/sendmail';
             my $mailprog = '/usr/sbin/sendmail';
             #my $from_address = "`id`@`hostname`" ;
-            if (open (MAIL, "|$mailprog -t " . $self->mailErrorSummaryTo)) {
+            if (open (MAIL, "|$mailprog -t")) {
                 $self->zLog->warn('Sending a copy of the report above to ' . $self->mailErrorSummaryTo);
                 print MAIL "To: " . $self->mailErrorSummaryTo . "\n";
                 #print MAIL "From: " . $from_address . "\n";

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions