VitalPBX tries to send email notifications as apache@..... with custom email server

Hi there,

I have noticed a curious thing recently, the VitalPBX server that I am testing (version: 3.1.5-4) is doing something odd when it tries to send email notifications through my SMTP email relay:

I have my email server setting set up as follows: (obfuscated sensitive info)

I never receive the email, and then check the log I can see that it has tried to log in as apache@… and send the email as apache@… instead of noreply@vm…

Log snippet:(obfuscated sensitive info)
Feb 25 13:24:19 [hostname] postfix/pickup[11692]: 77F134E3A0C: uid=48 from=
Feb 25 13:24:19 [hostname] postfix/cleanup[12460]: 77F134E3A0C: message-id=<20220225132419.77F134E3A0C@.com>
Feb 25 13:24:19 [hostname] postfix/qmgr[11693]: 77F134E3A0C: from=<apache@vm.
.com>, size=436, nrcpt=1 (queue active)
Feb 25 13:24:19 [hostname] postfix/smtp[12462]: 77F134E3A0C: to=<support@.com>, relay=mail.vm..com[(removed IP Address)]:26, delay=0.14, delays=0.02/0.01/0.09/0.02, dsn=5.0.0, status=bounced (host mail.vm..com[(removed IP Address)] said: 550-Verification failed for <apache@vm..com> 550-No Such User Here" 550 Sender verify failed (in reply to RCPT TO command))
Feb 25 13:24:19 [hostname] postfix/cleanup[12460]: 9A57F4E3A0B: message-id=<20220225132419.9A57F4E3A0B@.com>
Feb 25 13:24:19 [hostname] postfix/qmgr[11693]: 9A57F4E3A0B: from=<>, size=2595, nrcpt=1 (queue active)
Feb 25 13:24:19 [hostname] postfix/bounce[12463]: 77F134E3A0C: sender non-delivery notification: 9A57F4E3A0B
Feb 25 13:24:19 [hostname] postfix/qmgr[11693]: 77F134E3A0C: removed
Feb 25 13:24:19 [hostname] postfix/smtp[12462]: 9A57F4E3A0B: to=<apache@vm.
.com>, relay=mail.vm..com[(removed IP Address)]:26, delay=0.05, delays=0/0/0.04/0.01, dsn=5.0.0, status=bounced (host mail.vm..com[(removed IP Address)] said: 550 No Such User Here" (in reply to RCPT TO command))
Feb 25 13:24:19 [hostname] postfix/qmgr[11693]: 9A57F4E3A0B: removed

It seems despite me setting the from address and the username and password, it looks like it has ignored that for some reason?

Does anyone have any ideas? I have wracked my brain over this and I cannot see any more places for email settings anywhere else.

Thanks in advance,

Paul

This was reported on the old forum last year. I was able to work around the problem because we run our own email server and I can create rules to modify the address but that wont work for everyone.
https://community.vitalpbx.org/forums/topic/vitalpbx-3-0-adds-apache-to-my-email/

This seems to be a Postfix issue. Anyway, try updating the whole system to see if the system packages update helps.

yum update -y
reboot

Thanks for the suggestion Miguel. I ran yum update -y and rebooted. I’m now updated and using VitalPBX 3.1.5-4 Asterisk 18.8.0-1. I sent a test email and get the same result.

Fri 2022-02-25 21:26:22.691: Authenticating vpbx@mydomain.com
Fri 2022-02-25 21:26:22.691: Authenticated as vpbx@mydomain.com
Fri 2022-02-25 21:26:22.691: → 235 2.7.0 Authentication successful
Fri 2022-02-25 21:26:22.691: ← MAIL FROM:apache@mydomain.com SIZE=415

FYI, I already work around this by setting an alias on the mail server but I don’t mind helping others if you need me to try something else.

If this would be an postfix issue the Internet would be full with it and they would fix asap.
Sounds more like a configuration issue in the backend.

You can check few things here.

  1. Such issue mainly appears when one is using non-default SMTP port. So check your SMTP port once
  2. Check firewall if you have any in front of PBX
  3. You can add the public IP of your VPS in TXT records

The configurations are located in the file below. What do you suggest @mo10 to fix this?
/etc/postfix/main.cf

@paul_powlo
Why port 26? This is odd. Can you test 25 or 587? How about TLS? Sending unencrypted is bad.

It is not about the main.cf its about the command you use to send the mails / testmails.
Somewhere the is a mistake with the “From” or so.

Please check it yourself: try a testmail. You will find the “apache@…” in the Email Log underneath.

Where does the apache@ come from?

1 Like

Hi @mo10, it’s the standard ports if you are using an IMAP/POP3 email account on our WHM/CPanel web server, it’s odd, but it’s standard practice with all the hosted VPS servers from our hosting provider.

No solutions but FWIW I just did a test by removing the entire “From” entry in VitalPBX email setup and sent a test message. The resulting email has a blank “From:” field as expected and shows the proper “X-Authenticated-Sender: vpbx@ourdomain.com” field but uses the default “X-Envelope-From: apache@ourdomain.com” and “Return-path: apache@ourdomain.com” fields. From my Googling it looks like the generated email is being sent to Postfix with a missing field or two and Postfix is just defaulting to the apache address.

Return-path: <apache@ourdomain.com>
Authentication-Results: spirit.ourdomain.com;
	auth=pass (login) smtp.auth=vpbx@ourdomain.com
Received: from vpbx.ourdomain.com [(4.2.2.245)] by ourdomain.com (4.2.2.250) 
	with ESMTPSA id md50002672020.msg; Thu, 03 Mar 2022 08:45:04 -0500
X-Spam-Processed: spirit.ourdomain.com, Thu, 03 Mar 2022 08:45:04 -0500
	(not processed: message from trusted or authenticated source)
X-MDRemoteIP: 4.2.2.245
X-MDHelo: vpbx.ourdomain.com
X-MDArrival-Date: Thu, 03 Mar 2022 08:45:04 -0500
X-Authenticated-Sender: vpbx@ourdomain.com
X-Rcpt-To: me@ourdomain.com
X-MDRcpt-To: me@ourdomain.com
X-Return-Path: prvs=1061840534=apache@ourdomain.com
X-Envelope-From: apache@ourdomain.com
X-MDaemon-Deliver-To: me@ourdomain.com
Received: by vpbx.ourdomain.com (Postfix, from userid 48)
	id 448023187796; Thu,  3 Mar 2022 08:43:11 -0500 (EST)
To: me@ourdomain.com
Subject: VitalPBX - Test E-Mail
From:
Message-Id: <20220303134311.448023187796@vpbx.ourdomain.com>
Date: Thu,  3 Mar 2022 08:43:11 -0500 (EST)
X-ClamAV: PASS

Thank you for using VitalPBX
 This message indicates that your email configuration is working.
1 Like

Any news on this? We gave quite some hints (apache@…).Thanks.

Hi all I have, for the moment put a work around in, it’s not pretty, as I would mech prefer to send from a different email address other than apache@

From address:[domain address] (yes I know it should be the email address but it seems that apache@ is automatically prepend to the from address somewhere

Username: apache@[domain name]

And emails sent with no issue

[edit]
I had to also create a mail account for apache on our sever

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.