I’ve gone over this a lot, and can not find the problem. Email is using the standard Postfix Mail server. The Postfix appears to be setup, like all the other boxes i’ve done. It is setup to relay email. It does authentication, and everything works fine with the authentication, and emailing.
FreePBX 12.0.76.4
The Problem
It is sending all messages to the forwarding host, so all the garbage messages - like root and asterisk messages. So the relaying host gets spammed from the server ~ 1000 emails a day, when only a few are actual voicemails. It would seem there’s a local delivery option or something I’ve overlooked, but I can not find it, and I’ve done this several times.
FreePBX 12 is no longer supported but yes like any server it’s going to send more than just the voicemail emails. It’s going to send update alerts, backup alerts, user notices, cronjob logs and other items.
What does the maillog show as far as the amount and what type of emails are going out?
I think they have always been there and sent, but If you care not to read the sometimes informative emails to root or asterisk, you can redirect in /etc/aliases them to /dev/null
.
.
.
root: /dev/null
asterisk: /dev/null
and run newaliases
but then you will never get any warnings, ideally you would read the warnings and fix them as they come up
obviously in this specific case you have an unlicensed module active, delete it if you don’t need it , pay for it if you do
(I think we are gonna tumble down the rabbit hole with this…)
My thoughts, I’ve not confirmed this on other boxes, were that the local mailboxes: root, asterisk, etc… would have those mail messages delivered locally, not sent out. Why would it send them out? On my other boxes if I need to I pull up those mail boxes and look through the 1000’s of messages. This box, those mailboxes are empty. It appears all mailboxes are empty. There are ~ 30 system mail boxes, none have anything in them. That’s why I think this is a postfix confirg error. (Ive even looked through the main.cf)
Yea your right - I uninstalled the Queue Reporting module, I must have been playing with it, at somepoint, and forgot it - dunno, it’s removed. And, yes, having these messages are good for that reason, but at this point I’m not getting any, because they are being sent outta the box, and getting dropped by the relay mail server. The only reason I see them now, is I’ve stopped Postfix and look in the mail queue.
Very simply, postfix delivers email to the final destination as defined basically in /etc/aliases that can be an email address, a list, a pipe or any other linux device you care to define, by default, root will be the local root user, asterisk the local asterisk user. There are no rabbit holes; just rules defined by whatever that might later re-define post /etc/aliases
a) there is an alias root but it is disabled
b) I did remove the trunk-check script.
So now 99.5 of all messages are cleared. Funtionally my problem is solved, but I never addressed the original issue: why are root emails being sent out for delivery and not being sent to the root mailbox locally? This doesn’t appear to be impacting anything besides not being able to see those messages, and unless my Relay exceeds its 24hr limit I’ll never know there’s a problem.
The mail logs on pbx.FQDN.com should show you what happened to mail to users asterisk and root. It accepted it and your local machine is happy. It looks like you need to fix your postfix permissions though. How did you install this machine ?
I have had this problem before on Freepbx 13.
Those local emails to asterisk@freepbx being relayed through our external SMTP server instead of locally, essentially spamming it with thousands of emails every day.
Is that what’s happening to you?