Ipfstatusmail (Status emails for IPFire)

General questions.
LouR
Posts: 17
Joined: June 3rd, 2019, 7:49 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by LouR » June 5th, 2019, 9:09 am

Same setup here, the problem seems to be in the scheduling, I will let it run today and check the logs, when I run the command it works perfectly, It does not seem to work one its own...very close though.

skyfighter
Posts: 12
Joined: November 15th, 2018, 7:12 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by skyfighter » June 5th, 2019, 9:40 am

LouR wrote:
June 5th, 2019, 9:09 am
Same setup here, the problem seems to be in the scheduling, I will let it run today and check the logs, when I run the command it works perfectly, It does not seem to work one its own...very close though.
I'm happy that I'm not the only one with this problem ;)

User avatar
Roberto Peña
Posts: 761
Joined: July 16th, 2014, 3:56 pm
Location: Bilbao (España)
Contact:

Re: Ipfstatusmail (Status emails for IPFire)

Post by Roberto Peña » June 5th, 2019, 3:51 pm

I also get errors but it works for me. Have you tried other programming ?.

You have verified that your mail server is not detecting it as spam, right?

I tell you this since I sometimes detect it as spam and the error appears in the log.

TimF commented that they were going to remove it as an addon, I do not know in what version.

I will be able to help you little more, since I do not know about programming. Maybe TimF can help you.

Greetings.
Image
Image

╔════════════════════════════════════════════════╗
Donate to improve IPFire: https://www.ipfire.org/donate
╚════════════════════════════════════════════════╝

LouR
Posts: 17
Joined: June 3rd, 2019, 7:49 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by LouR » June 5th, 2019, 7:22 pm

Checked everything, ( I think) I also get errors in the log but when I click the execute button, the status mail works fine, I am stumped on how to get the scheduling to work.. ???

skyfighter
Posts: 12
Joined: November 15th, 2018, 7:12 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by skyfighter » June 5th, 2019, 8:15 pm

LouR wrote:
June 5th, 2019, 7:22 pm
Checked everything, ( I think) I also get errors in the log but when I click the execute button, the status mail works fine, I am stumped on how to get the scheduling to work.. ???
+1

TimF
Posts: 83
Joined: June 10th, 2017, 7:27 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by TimF » June 5th, 2019, 8:49 pm

Two answers.

First, the PGP key expected is an ASCII armoured public key. It should look like:

Code: Select all

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQENBFz4J/YBCAC/wzMkadGIDWctazpRLhNXBvQugAbsnBGJOy86rmibv1uP+Nwp
txfXDxw19XDFouuhJTKjtQ+zjhP0a6dpN/QxfVlWjIsG0NQyckarxql0JylCN6UM
MSOBwsjw0uvaja2vw5kOD59SVpF+rneJbmrvzbgWAAhMUwmOCshteEG2/McqpqJK
DDYZrw30esBXcmYVBsb/8CP25IQNRrVWRMxACqydzjE1RWmdVouZ10x2NMVyNbJm
EAW0LEceNyZtcpVjJn/kaxyotpaxSbu/vV4zDJi8vE+UOMguRek4E0srnqvGLWp4
AFZ9zyHQdOyq9a18aHYB0OzzBa8hWQfc1VnjABEBAAG0IVRlc3QgVXNlciA8dGVz
dC51c2VyQGV4YW1wbGUuY29tPokBVAQTAQgAPhYhBM7nMWx/jeR02IS4fiNW4Euv
aXU3BQJc+Cf2AhsDBQkDwmcABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJECNW
4EuvaXU3cX4H/08C6lTLkBbaWI3+pNRkkBOrXAJf0dh526KBrhNuuRPvyRhgPTeM
pnJaHefZ7d7vavxVC9Im82BULNMTosq08IrDJmX04mb0q2lBvgx7n8LYaO69SeKc
AJYdgeof55PEWsb0tbv7fpHTOTD0AyvnNYgI8W1Mrwy1qPEEYJ1yd8YZ/uxeljdI
8rXFDjjpBtbdQxmeqO/LLWd/bLbgepq5qvYIWEp/1fDRZEv3ne3pP+69oWJ90FEE
2q4RoqAcxUnxKFydvdi49TsC6GOAImgStzfgV283FnOmU2AqeMmkmB6lgCkEmoft
PAqgkreYrXMreuxdj4eDus1nrWJIaEGvmmS5AQ0EXPgn9gEIALOUuQfhWXAQZ93c
mr+FXIQd+SQK0lZoXePeO2Eizg6H21wnfPf/s8o+IDq6TGMt2oYKUTTDoCCnxn2B
Q7mQX4bC9f3QWqx+gNM+3+URxibr2fgpHKT3Y3JIKkD8qoV+BtgbJcInstO8KYWE
C9+M+PUbjV4P374udOgUN4f/UbIOtvMUV0nGTC6YyPZG0dEc5mPStZgC12YamCqX
bT0/r1muyz2PqRsSJ9Pi8TaLF0mE7z40ru59SVDJ5nCkrwfhlKWLQDMqxudIs6Or
iOxDS4IlPbd6JN9P8QLGmZzRKTSacj56A9o2nfgSjx7UJykydKGHtL9Oj4NdhHsB
RZWtel8AEQEAAYkBPAQYAQgAJhYhBM7nMWx/jeR02IS4fiNW4EuvaXU3BQJc+Cf2
AhsMBQkDwmcAAAoJECNW4EuvaXU30dMIAIN/HvtQog8/vvuFPZfi8yo8vdSap9EA
9/9Idmgm3hBCiKvmb5pezFqUtGQwVm+sDJkx/bwIgRzE3k9GaVqb8fcGyejlAvdh
ok11lKF9hyPeno/QPS5yPSPK0Zg7pi75y2JSOWL35YPraWr/tXpChP0yZUPwu9IR
8/Pmj8iRNFpgTW7XXkzBtKPE/lqhf6ifaRlUf78FOUtAGUScp7U3HPB6AlQ/YM/1
n3bhJgNDzAooa91zR0xn4jVmC9pDmBbBRncUTQkb4ndxUn1HP94xLWSSDzX4Lo33
8hGY4Z4ckI/xtvCnYaMlsImKNwAZTUHATHuAs61AFnrYoTsRgPk0Bd4=
=dSPB
-----END PGP PUBLIC KEY BLOCK-----
(This is a valid key, which I can import successfully, although it's for an invalid user).

The message 'Invalid PGP Key format' usually means that it hasn't seen the BEGIN and END lines.

Second, if you can send messages from the command line or by clicking the 'Execute now' button, it probably means that the script hasn't been added to fcron properly. Check that /etc/fcron.hourly/statusmail exists. If not run:

Code: Select all

ln -fs /usr/lib/statusmail/statusmail.sh /etc/fcron.hourly/statusmail
Note that if you're using grep on the system log for mail messages, you need to look for 'dma' (Dragonfly Mail Agent).

LouR
Posts: 17
Joined: June 3rd, 2019, 7:49 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by LouR » June 5th, 2019, 8:55 pm

I figured I would post my logs here also
[Wed Jun 5 16:34:33 2019] statusmail.cgi: Use of uninitialized value in concatenation (.) or string at /srv/web/ipfire/cgi-bin/statusmail.cgi line 943.
[Wed Jun 5 16:34:33 2019] statusmail.cgi: Use of uninitialized value in concatenation (.) or string at /srv/web/ipfire/cgi-bin/statusmail.cgi line 943.
[Wed Jun 5 16:34:37 2019] statusmail.cgi: Use of uninitialized value $params{"item"} in hash element at /srv/web/ipfire/cgi-bin/statusmail.cgi line 1592.
[Wed Jun 5 16:34:37 2019] statusmail.cgi: Use of uninitialized value $schedule{"period-unit"} in string eq at /srv/web/ipfire/cgi-bin/statusmail.cgi line 938.
[Wed Jun 5 16:34:37 2019] statusmail.cgi: Use of uninitialized value $schedule{"period-unit"} in string eq at /srv/web/ipfire/cgi-bin/statusmail.cgi line 939.
[Wed Jun 5 16:34:37 2019] statusmail.cgi: Use of uninitialized value $schedule{"period-unit"} in string eq at /srv/web/ipfire/cgi-bin/statusmail.cgi line 940.
[Wed Jun 5 16:34:37 2019] statusmail.cgi: Use of uninitialized value $schedule{"period-unit"} in string eq at /srv/web/ipfire/cgi-bin/statusmail.cgi line 941.
[Wed Jun 5 16:34:37 2019] statusmail.cgi: Use of uninitialized value in concatenation (.) or string at /srv/web/ipfire/cgi-bin/statusmail.cgi line 943.
[Wed Jun 5 16:34:37 2019] statusmail.cgi: Use of uninitialized value in concatenation (.) or string at /srv/web/ipfire/cgi-bin/statusmail.cgi line 943.
Use of uninitialized value $params{"item"} in hash element at /usr/local/bin/statusmail.pl line 359.


I did run the command
ln -fs /usr/lib/statusmail/statusmail.sh /etc/fcron.hourly/statusmail
and the firewall did send a status on its own, will wait and see if it continues...getting closer!!!!!

LouR
Posts: 17
Joined: June 3rd, 2019, 7:49 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by LouR » June 5th, 2019, 11:14 pm

UPDATE, so far so good, I got two auto alerts via email in a row...will let it run and keep checking....not sure if running the script above helped but I can only assume it did. Lets see if it will run after a remote reboot...

skyfighter
Posts: 12
Joined: November 15th, 2018, 7:12 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by skyfighter » June 6th, 2019, 5:17 pm

I don't know why my public key doesn't work.
Here it is, maybe you can also try to add it:

Code: Select all

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBFV8f1cBEAC7dnapPWahpnhtCrgRGyFhd7xPotd7V/eJt79LDpDXeHNor+hk
WCC4X+xvv8ZepkckFTnKYemSbBCZcxVR8pvKPMwyt/1DFGMfg6bxA6EXmSh2qhhr
RvnK9BtqIQpEGQ8CRCCHEik2yDwFS9vwhBssa092YRD2MI4VNgPdbEGLafzA6mhf
84GkDAOnra+HeBfNRU6+kSwjS4NklN2LoNq9OItP3F038aT4WgaTbweSLO4wuSp6
01KXEsWYxfLTXmDCu8pUFImGKy+XlZjmcEd04eRwRtjxdtjuLldV4vcoE0KoNiUq
efsNfk0kRpatunf2ruWULRfiGVNg0QixqC4ZeTSlerqKCIKK6XWuKDdSCr1GedR1
CY3M2D+62c/9/lgyXcW8Rvc8AE6Y7Sphy3qr3arYU3jUhKX5bVkPY7owTJmGPzDe
jY7qnh5LzizAODgxuOjNgRXfRxeK00votiUigofXCuOa9lX3qgfS85SM1Ut9w4bA
lCgex/D7aWYA+/yVcMvF3siBduf5NagSCRk3gB9peLU+7l93swhNIWQ4Ul6GaY+h
uZOjTLVtlT2Mhnk+937bEv87wtoqZjZBy5jOf2r4Ug8sCJUsiXTJZ6pTwodpaafh
3jVzGNi889X7giDlipiVS4Jh7MRSzIkSPgr7olR8bJ+QThCdylR6D9DxCwARAQAB
tCZGYWJpYW4gVHV0dG1hbm4gPGYudHV0dG1hbm5AcG9zdGVvLmRlPokCNwQTAQoA
IQUCVXx/VwIbAwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRC5ivIMnbXwUbSh
D/93Te81Srpxgwq/2Mmh29dHgbMw+WlC6lu316PCuIIhdvfmSocECnYOHhbgv76f
0TwOQpapfXosuoLj7BzhbCdmIRyv+VVBTORkZsP0TEjbBxJz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4dUT/c6YBIQ2SdGCRywVOd0ekji+4kZckDdtkoI7qpcG1wcgFa0QAcnsTHPO+Vh5
jv9vsXB0HbtOztfJqfysMYRjoKvB9Amtc1v8Bj1xEJ3PyvZooLVC+8N20zRzCwtt
b4Z8O5U8+a4WX6nSge9mhllF2DqCWAwsMEgqCAIbDegJgYg3r12pikn8Pd6EZrIg
wQQAo85scRTaYOIRl32qq2ccPpnjI1SwkCthBgXQdynT2b3/PaEuBwzWEvDcP/2x
bMN7kijqQ/eq9XomL3yJ1UpGJmQ+i62GqeyhhT3nHrqHN6z4M6e9+1RYgKfBewfB
+2x9ncALsHBx0tLIMNyjrwX1cFfHuVH/I0yifCokoMN63ssAJI29qEDh+s2gHRH3
HufRZ5dQ9va7FGDJeclF0mJTEznPpglmURwY2ZAk45sFgw0dZPs+k4CQ+Wo/aJws
qPujyXP5Eb3K7XwU4f2cnWw7Z/NC+0mV4JDu1wJpB051AlbFnUUbzVBEIxJJBhmN
yo+zs/g8NncyF4XPIxoybDJFbueDTkOSnsnG+RCFuFR321Lq+6NQHpBqKI6w/kI1
vArObeXvnbzuFG7Q7+btUmyfVg==
=XUBb
-----END PGP PUBLIC KEY BLOCK-----

LouR
Posts: 17
Joined: June 3rd, 2019, 7:49 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by LouR » June 6th, 2019, 6:48 pm

Well I am back to square one, it stopped sending emails again today, running the script did not help.

TimF
Posts: 83
Joined: June 10th, 2017, 7:27 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by TimF » June 6th, 2019, 8:07 pm

I don't know why it's stopped working for you, but I think I've identified why it's not seeing the key (no expiry date). I'll come up with a fix for it.

LouR
Posts: 17
Joined: June 3rd, 2019, 7:49 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by LouR » June 6th, 2019, 8:54 pm

I will try to reinstall, I do appreciate the work so far though..it was working fine and then all of a sudden no status emails..mail service still works though.

[root@ipfiremini ~]# tail /var/log/httpd/error_log
[Thu Jun 6 16:59:51 2019] statusmail.cgi: Use of uninitialized value in concatenation (.) or string at / srv/web/ipfire/cgi-bin/statusmail.cgi line 943.
[Thu Jun 6 16:59:51 2019] statusmail.cgi: Use of uninitialized value in concatenation (.) or string at / srv/web/ipfire/cgi-bin/statusmail.cgi line 943.
[Thu Jun 6 16:59:56 2019] statusmail.cgi: Use of uninitialized value $params{"item"} in hash element at /srv/web/ipfire/cgi-bin/statusmail.cgi line 1592.
[Thu Jun 6 16:59:56 2019] statusmail.cgi: Use of uninitialized value $schedule{"period-unit"} in string eq at /srv/web/ipfire/cgi-bin/statusmail.cgi line 938.
[Thu Jun 6 16:59:56 2019] statusmail.cgi: Use of uninitialized value $schedule{"period-unit"} in string eq at /srv/web/ipfire/cgi-bin/statusmail.cgi line 939.
[Thu Jun 6 16:59:56 2019] statusmail.cgi: Use of uninitialized value $schedule{"period-unit"} in string eq at /srv/web/ipfire/cgi-bin/statusmail.cgi line 940.
[Thu Jun 6 16:59:56 2019] statusmail.cgi: Use of uninitialized value $schedule{"period-unit"} in string eq at /srv/web/ipfire/cgi-bin/statusmail.cgi line 941.
[Thu Jun 6 16:59:56 2019] statusmail.cgi: Use of uninitialized value in concatenation (.) or string at / srv/web/ipfire/cgi-bin/statusmail.cgi line 943.
[Thu Jun 6 16:59:56 2019] statusmail.cgi: Use of uninitialized value in concatenation (.) or string at / srv/web/ipfire/cgi-bin/statusmail.cgi line 943.
Use of uninitialized value $params{"item"} in hash element at /usr/local/bin/statusmail.pl line 359.

TimF
Posts: 83
Joined: June 10th, 2017, 7:27 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by TimF » June 7th, 2019, 7:20 pm

I've uploaded an new version which can see imported keys that don't have an expiry data. it's also got a little bit more information when things go wrong. Just download and run the installer to get it.

If you don't receive any emails the chain of evidence should be as follows:
  1. The link /etc/fcron.hourly/statusmail should exist.
  2. There are contacts defined and enabled in the WUI.
  3. There are schedule(s) defined and enabled in the WUI.
  4. The schedule(s) use enabled user(s).
  5. grep statusmail /var/log/messages
    You should see messages every hour:
    1. Starting log and status email processing
    2. Executing status mail schedule name when a schedule is due
    3. Send mail message for 'name' to contact list if a message is sent.
      Note that no message will be sent if there's no contents.
  6. grep dma /var/log/messages
    You should see messages as it tries to send the email
    1. new mail from user=nobody uid=99 envelope_from=email address
    2. Various progress messages
    3. delivery successful
If you get the new mail message, statusmail is almost certainly working correctly and the problems in mail processing. If you get the delivery successful message the problem is outside IPFire. A possibility is a spam filter.

LouR
Posts: 17
Joined: June 3rd, 2019, 7:49 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by LouR » June 9th, 2019, 2:03 am

Tim, can you please post a removal script, still learning Linux..I will try a new new install thanks.

TimF
Posts: 83
Joined: June 10th, 2017, 7:27 pm

Re: Ipfstatusmail (Status emails for IPFire)

Post by TimF » June 9th, 2019, 7:02 pm

It'll take a few days, but you should just be able to run the installer again to overwrite the old version. Unless, of course, you have other reasons to uninstall.

Post Reply