Am 09.07.2014 19:06, schrieb John Hein:
> I'm not sure about the exact cause of the errors you're seeing, but it
> looks like the mailto check will not accept '@' or '.' (or dashes or
> underscores or numbers).
>
> To address that, maybe try this patch:
>
> --- libexec/amanda/application/script-email.orig 2009-11-06
> 10:27:46.000000000 -0700
> +++ libexec/amanda/application/script-email 2014-07-09
> 10:02:06.000000000 -0600
> @@ -154,7 +154,7 @@
> my $dest;
> if ($self->{mailto}) {
> my $destcheck = join ',', @{$self->{mailto}};
> - $destcheck =~ /^([a-zA-Z,]*)$/;
> + $destcheck =~ /^([-_[:alnum:],@.]*)$/;
> $dest = $1;
> } else {
> $dest = "root";
>
>
> Or don't try to do the mailer's job and just skip the whole destcheck
> part - let the mailer catch any errors:
>
>
> --- libexec/amanda/application/script-email.orig 2009-11-06
> 10:27:46.000000000 -0700
> +++ libexec/amanda/application/script-email 2014-07-09
> 11:02:18.000000000 -0600
> @@ -153,9 +153,7 @@
> my($function) = @_;
> my $dest;
> if ($self->{mailto}) {
> - my $destcheck = join ',', @{$self->{mailto}};
> - $destcheck =~ /^([a-zA-Z,]*)$/;
> - $dest = $1;
> + $dest = join ',', @{$self->{mailto}};
> } else {
> $dest = "root";
> }
>
Thanks, John ... I just tried your 2nd patch and the email gets through now.
I was maybe too demanding to assume that an email-address might contain
"@" or "." :-P
Thanks again, I will continue to find my way with scripting,
Stefan