SOLVED: Freepbx sending emails every 60 seconds

I’m running the freepbx distro 6.12.65 and sendmail is sending an email every 60 seconds but i don’t understand what is going on. Here is a snippet from /var/log/maillog of each time it sends:

Feb 29 09:01:30 freepbx sendmail[14138]: u1T90xLm014138: from=root, size=508, class=0, nrcpts=1, msgid=[email protected], [email protected]
Feb 29 09:01:30 freepbx sendmail[14155]: u1T91U70014155: from=[email protected], size=823, class=0, nrcpts=1, msgid=[email protected], proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Feb 29 09:01:31 freepbx sendmail[14155]: u1T91U70014155: Milter change (add): header: X-Spam-Score: -100.399 () ALL_TRUSTED,BAYES_00,LOCAL_DEMONSTRATION_RULE,NO_DNS_FOR_FROM,USER_IN_WHITELIST
Feb 29 09:01:31 freepbx sendmail[14155]: u1T91U70014155: Milter add: header: X-Scanned-By: MIMEDefang 2.78 on 127.0.0.1
Feb 29 09:01:31 freepbx sendmail[14138]: u1T90xLm014138: to=asterisk, ctladdr=root (0/0), delay=00:00:32, xdelay=00:00:01, mailer=relay, pri=30508, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (u1T91U70014155 Message accepted for delivery)
Feb 29 09:01:31 freepbx sendmail[14158]: u1T91U70014155: to=[email protected], ctladdr=[email protected] (0/0), delay=00:00:01, xdelay=00:00:00, mailer=local, pri=31158, dsn=2.0.0, stat=Sent

I’ve drilled into /var/log/maillog and this behaviour started yesterday with this line appearing every 60 seconds too:

Authentication-Warning: freepbx.svr: asterisk set sender to root using -f

is this normal behaviour for freepbx? There’s nothing in my mail queue. How would i find out what these emails are?

What’s in the email?

Hi!

This is the REAL sendmail as far as I can tell and not Postfix…

It also look like it’s running SpamAssassin or something similar and a milter of some kind which is not standard from the distro…

I thought the distro (even the version you are running) used Postfix and I am pretty sure it has no milter and SpamAssassin, are you sure this is the distro?

Good luck and have a nice day!

Nick

Not so much, on installation, Postfix will install it’s own sendmail for compatablity, try it

man sendmail

So don’t worry about all the antispam stuff you might have added, the email is coming from the local “root” account and being sent successfully to the local “asterisk” account,as your logs expose.

Some diagnostics,

edit /etc/aliases to arrange to send the email for root and asterisk to a valid email account that you can read or perhaps use elm or mutt to read those mailboxes locally if your postfix is set up badly and the asterisk/root forwarding is not working.

(you might need to install elm and/or mutt)

dicko, I am pretty sure that this is not Postfix sendmail “emulation”…

I was mail server admin at work for like 10 years and still do some and this looks like the REAL sendmail and not the one Postfix provides for compatibility…

He/She did quite a few modifications to the base setup of the distro if this is not using Sendmail, the REAL one…

Have a nice day,

Nick

as I said , what does

man sendmail |head

say on his/your machine if postfix is installed?

add

which sendmail
locate sendmail
ls -l whatever binary/link that returns

OK, I see where you are going, I didn’t originally…

You want to see if (s)he will get Sendmail or Postfix’s man page…

I am pretty sure it’s Sendmail, the REAL one, this looks all wrong for Postfix…

We’ll see…

Nick

1 Like

:wink: we will. do the aliases/elm/mutt thing , they don’t care they use your current MTA . . .

thanks for the response here but I’m still struggling. I managed to drill down in the console and each 60 second email contains this:

From [email protected] Thu Mar 3 10:35:19 2016
Return-Path: [email protected]
Received: from freepbx.svr (localhost [127.0.0.1])
by freepbx.svr (8.14.4/8.14.4) with ESMTP id u23AZIFO022434
for [email protected]; Thu, 3 Mar 2016 10:35:18 GMT
Received: (from [email protected])
by freepbx.svr (8.14.4/8.14.4/Submit) id u23AYlx5022402;
Thu, 3 Mar 2016 10:34:47 GMT
Date: Thu, 3 Mar 2016 10:34:47 GMT
Message-Id: [email protected]
X-Authentication-Warning: freepbx.svr: asterisk set sender to root using -f
From: [email protected] (Cron Daemon)
To: [email protected]
Subject: Cron [email protected] [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <LANG=en_US.UTF-8>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/asterisk>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=asterisk>
X-Cron-Env: <USER=asterisk>
X-Spam-Score: -100.399 () ALL_TRUSTED,BAYES_00,LOCAL_DEMONSTRATION_RULE,NO_DNS_FOR_FROM,USER_IN_WHITELIST
X-Scanned-By: MIMEDefang 2.78 on 127.0.0.1

stream_select: timeout expired !
stream_select: timeout expired !

I’m running sendmail-8.14.4-8.el6.x86_64, sorry I didn’t make that clearer in my earlier post. I use this freepbx machine as a mail server too and I installed mimedefang to weed out the spam I get.Thanks for any further help.

Edit/remove your rss feeds in advanced settings.

The email subject indicates this is being generated from the Dashboard cron job, which indeed runs every minute. Something in the scheduler script is failing and generating output that gets sent as an email. Please file a bug report including email message content at http://issues.freepbx.org

Some service in the dashboard updater seems to have gone away. @dicko suggested the RSS feed. I’d start there. If you want to disable the cron job until you get it fixed, use “crontab -e” and comment out the dashboard scheduler.

thanks I removed the rss feeds and clicked ‘apply config’ but the system is still pumping out these damn emails.I also went to the bug report link given above but I don’t have a log in, and when I clicked JIRA administrators.I got a ‘Your JIRA administrator has not yet configured this contact form.’.

Log into the PBX server as root.

Type “php /var/www/html/admin/modules/dashboard/scheduler.php” and tell us what happens.

Login credentials for the issues site are the same as for the forums.

php /var/www/html/admin/modules/dashboard/scheduler.php
(40 second delay…)
stream_select: timeout expired !
stream_select: timeout expired !

You’ve verified that this is where the email is coming from (you get the same output from running the script that you do from the console).

It’s all open-source - time to break out the editor. Open the file up and start troubleshooting. I’d recommend looking for places where you can add some “print” commands and start figuring out the errors.

thanks again for the further replies. I solved this by restoring a previous freepbx backup - one I had before this problem started, and then I rebooted the machine just for good measure. The emails have now stopped.