New Reports addon

@roberto & Co. :wink:

Spent some time, over these errors. :face_with_peeking_eye:
It took me a long time because I am not a programmer. :wink:

It seems that the cause of these messages is unsent messages.

The DMA is trying to send them, but due to previous errors and fails.

===

What I did.

  1. created files

/var/mail/root
/var/mail/nobody

After this action, the above errors stopped appearing.

  1. added to the file /var/ipfire/reports/send_mail.sh
# Get sender email 
SENDER=$(grep -E '^SENDER=' "$MAIL_CONF" | head -n1 | cut -d'=' -f2- | tr -d ' ')
if [[ -z "$SENDER" ]]; then
echo "Error: No se encontró SENDER en $MAIL_CONF" >&2
exit 1
fi

the following line

} | $SENDMAIL -t

I changed to

} | $SENDMAIL -f $SENDER -t

===

After these changes

1 in the file `/var/ipfire/dma/ I removed the line “MASQUERADE”

2 I deleted the files

/var/mail/root
/var/mail/nobody

3 I did a test of sending reports

The test looks successful. :smiley:

===

Could someone with more proramist experience check the correctness of the changes made?

Best Regards

2 Likes