[SOLVED] Mail forward failed

Elliott Partridge

Well-Known Member
Oct 7, 2018
57
11
48
Pittsburgh, PA
I had a ZFS event occur overnight, but never received the associated notification email. In the system log, I see the following:
pvemailforward[3873]: mail forward failed: Insecure $ENV{IFS} while running with -T switch at /usr/bin/pvemailforward.pl line 36, <DATA> line 755.

I am able to manually forward email just fine using sendmail, and continue to regularly receive replication and VZdump notifications just fine.

This seems like a potential Perl issue. See similar issue on StackOverflow: https://stackoverflow.com/questions/4552197/insecure-envenv-while-running-with-t-switch

Perhaps adding the following line after $ENV{'PATH'} = ... would resolve this? I don't have a great test case, as mail forwarding works fine most of the time.
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
 
$ENV{IFS}
This env variable is the internal field separate for the shell. Do you run a custom shell as root? The IFS is not set on a fresh Proxmox VE installation.
 
I do not run a custom shell, as far as I know.

I think I found the issue. I had zed.rc configured with this option:
ZED_EMAIL_PROG="/usr/bin/pvemailforward"

Another server I have set up uses this:
ZED_EMAIL_PROG="mail"

Not sure why I changed that setting, but using mail as the email program has worked for other servers.
 
  • Like
Reactions: Alwin