Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

znapzend not sending ERROR email #547

Open
gchmurka123 opened this issue May 17, 2021 · 3 comments
Open

znapzend not sending ERROR email #547

gchmurka123 opened this issue May 17, 2021 · 3 comments
Labels

Comments

@gchmurka123
Copy link
Contributor

gchmurka123 commented May 17, 2021

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";

@oetiker
Copy link
Owner

oetiker commented May 17, 2021

you are correct ... it makes little sense to have the recipient on the commandline AND request for it to be extracted from the headers ... postfix < 2.1 also considers this an error ...

can you please make the change as a PR ?

@oetiker oetiker added the bug label May 17, 2021
@rokkoyama
Copy link

Oetiker: Would you be willing to merge the fix/540 branch? It is behind master with respect to this issue, and contains similar corrective action as described in the patch above to remove the recipient argument from the command in ZnapZend.pm due to the conflict with the -t flag that parses the recipient from the headers below. However, it also cleans up the variables.

The issue is reproducible in Exim version 4.92 on Deb 10 - Linux 4.19.0-17-amd64 #1 SMP Debian 4.19.194-1 (2021-06-10).

Applying the patch above resolves the issue.

I have not tested the innocuous variable related changes in fix/540 but am happy to do so if you would like.

@oetiker
Copy link
Owner

oetiker commented Sep 20, 2021

totally ... sorry that somehow slipped through the cracks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants