Mail report command line output not working right
-
Hi,
I'm having a problem with command outputs using mail report. I've got the Traffic Totals package installed and when I enter "vnstat -i em0" into the command line under pfSense>Diagnostics, it provides the expected output. I setup a scheduled email using the mail reports package. When I test my mailreport config using the "Send" button I get an email with the same info that the command line gave me and it seems to work correctly. I have it scheduled to email me every day but the scheduled emails just say "Command output: WHAT_I_NAMED_IT (vnstat -i em0)" with nothing after that. Just a blank email. Am I missing something? Currently running 2.4 on a custom build using intel cards. Upgraded from 2.3.4. I can't find a log anywhere but maybe I'm not looking in the right place and I probably need to check the logs as soon as the scheduled email happens. Any suggestions would be helpful.
Thanks for taking the time.
-
Use the whole path to the command:
/usr/local/bin/vnstat -i em0
-
That was it! Thanks a bunch. I even saw the notice in the UI about using the full path and I guess it just didn't click.
-
i have the same problem, the test mail in advanced settings works but on mailreport not work with this comand
/usr/bin/grep
/bin/date -v-1d "+%Y-%m-%d"
/var/squidGuard/log/block.log | /usr/bin/grep -v in-addrI am using pfsense 2.4 and its works on comand line and with pfsense 2.3 before I updated to 2.4
if any one can help me.
Tks
-
i have the same problem, the test mail in advanced settings works but on mailreport not work with this comand
/usr/bin/grep
/bin/date -v-1d "+%Y-%m-%d"
/var/squidGuard/log/block.log | /usr/bin/grep -v in-addrI am using pfsense 2.4 and its works on comand line and with pfsense 2.3 before I updated to 2.4
That box isn't meant for complex shell commands, odds are something is getting lost along the way or changed/escaped in an unexpected manner.
Make a shell script (e.g. /root/mystuff.sh), make it executable (chmod u+x /root/mystuff.sh) and then run that script for the report instead
-
i have the same problem, the test mail in advanced settings works but on mailreport not work with this comand
/usr/bin/grep
/bin/date -v-1d "+%Y-%m-%d"
/var/squidGuard/log/block.log | /usr/bin/grep -v in-addrI am using pfsense 2.4 and its works on comand line and with pfsense 2.3 before I updated to 2.4
That box isn't meant for complex shell commands, odds are something is getting lost along the way or changed/escaped in an unexpected manner.
Make a shell script (e.g. /root/mystuff.sh), make it executable (chmod u+x /root/mystuff.sh) and then run that script for the report instead
I did this but when i test with Send Now buttom nothing hapen. I tryed exclude the comand and select a log and again don't work.
I tryed to put simple```
/bin/echo testewhat i can try now?