Solved Email Server Setup

Status
Not open for further replies.
I recently updated to the latest version of 3CX v15.5.0.

Voicemails are no longer being send to users by email.

The Type of Email server is set to "3CX SMTP server" and cannot be changed (which I understand is because I am using the free version of 3CX).

Sending emails worked fine previously using an Office365 SMTP server, but I understand now I must use the 3CX SMTP server.

But when I press TEST I get the error:

AuthenticationInvalidCredentials: 5.7.0 Denied


I have tried these fixes:

Since you have a dynamic Public IP try going to Settings / Licence and click on the Refresh Licence Key Information button.
The restart services and try again.


and

If it was an upgraded version, then I suggest you clear cache, go to the mail server, Apply OK there and restart the machine. Maybe some settings were left there from the previous smtp.

I still get the error. Are there any other suggestions of how to fix this?

I could uninstall the latest version and re-install an earlier version, but I would prefer to get the latest version working.

David
 
I think I have found the answer and thought I would post it in case it helps others.

I have two NICs in the server running 3CX and two WAN connections

The interface assigned to 3CX (the "3CX NIC") is directed to a static WAN IP by the router (pfSense).
The second interface (NIC #2) is directed to a dynamic WAN IP.

NIC #2 has a lower metric than the 3CX NIC. I think 3CX is sending SMTP traffic to the interface with the lowest metric, not the one that is assigned to 3CX in Settings/Network/Public IP/Select network card interface.

When I set the 3CX NIC to a lower metric than NIC #2, then 3CX would correctly send a Test email.
When I set NIC #2 back to the lower metric than the 3CX NIC then I get an authentication error when I tried to set a test email (AuthenticationInvalidCredentials: 5.7.0 Denied).

I did not need to restart the Services between tests.

I assume this issue arises because the 3CX SMTP server checks the source WAN IP address of the traffic against the static IP address in the 3CX settings. If the SMTP traffic goes out through the dynamic WAN, when 3CX checks the dynamic WAN IP address against the static WAN address specified in the 3CX settings they do not match. The system then generates an authentication error. That sounds plausible but I do not know if that is actually the reason.

I then set NIC #2 back to the lower metric and added a firewall rule in pfSense on the VLAN for NIC #2 to force all traffic to the 3CX SMTP port (2528) to go out through the static WAN gateway.

3CX now correctly sends the Test email.

I suppose there is some technical reason why 3CX sends SMTP traffic to the NIC with the lowest metric rather than to the interface selected for general 3CX use?
 
  • Like
Reactions: Techops
I think I have found the answer and thought I would post it in case it helps others.

I have two NICs in the server running 3CX and two WAN connections

The interface assigned to 3CX (the "3CX NIC") is directed to a static WAN IP by the router (pfSense).
The second interface (NIC #2) is directed to a dynamic WAN IP.

NIC #2 has a lower metric than the 3CX NIC. I think 3CX is sending SMTP traffic to the interface with the lowest metric, not the one that is assigned to 3CX in Settings/Network/Public IP/Select network card interface.

When I set the 3CX NIC to a lower metric than NIC #2, then 3CX would correctly send a Test email.
When I set NIC #2 back to the lower metric than the 3CX NIC then I get an authentication error when I tried to set a test email (AuthenticationInvalidCredentials: 5.7.0 Denied).

I did not need to restart the Services between tests.

I assume this issue arises because the 3CX SMTP server checks the source WAN IP address of the traffic against the static IP address in the 3CX settings. If the SMTP traffic goes out through the dynamic WAN, when 3CX checks the dynamic WAN IP address against the static WAN address specified in the 3CX settings they do not match. The system then generates an authentication error. That sounds plausible but I do not know if that is actually the reason.

I then set NIC #2 back to the lower metric and added a firewall rule in pfSense on the VLAN for NIC #2 to force all traffic to the 3CX SMTP port (2528) to go out through the static WAN gateway.

3CX now correctly sends the Test email.

I suppose there is some technical reason why 3CX sends SMTP traffic to the NIC with the lowest metric rather than to the interface selected for general 3CX use?
I'm afraid your network setup is not correct, you should generally avoid having 2 or more default gateways, except for backup. In case both gateways are active, the lowest metric one will be used, this is done by OS, not by 3CX.
 
Hello,

I am having the same issue regarding the smtp problem : email (AuthenticationInvalidCredentials: 5.7.0 Denied) with the Free edition.

I cleared the cache , reapply the configuration and restarted the server but not working.
Is there a way to have the default value for MLSRVADDR because value for the moment is "smtp"

Thanks in advance.
Raph
 
Hello,

I am having the same issue regarding the smtp problem : email (AuthenticationInvalidCredentials: 5.7.0 Denied) with the Free edition.

I cleared the cache , reapply the configuration and restarted the server but not working.
Is there a way to have the default value for MLSRVADDR because value for the moment is "smtp"

Thanks in advance.
Raph
There is no way of changing this value if you are using a PBX Edition License Key, this effectively means that you will be using the 3CX SMTP. To be honest, even if you do find a way to change that param, the code will just ignore it.

To your problem, you get this error if your 3CX installation thinks your Public IP is A, while in reality it's B or at lest of the data that reach the 3CX SMTP have a different source IP other than what your 3CX installations "thinks" it has. That's most likely what was causing the problem for @David Lacey in this thread as well.

Check that your Public IP you have set in the Management Console --> Settings --> Network is correct, that your Firewall indeed sends traffic out through the WAN that corresponds to the IP and that you don't any weird static routes on your network sending traffic out though some other GW completely.

I would suggest also to do the following:
  1. Management Console --> Settings --> Network change from Static to Dynamic (or vice versa)
  2. Wait 5 minutes
  3. Restart all 3CX services
  4. Revert change.
  5. Wait 5-10 minutes
  6. Restart 3CX services again.
  7. Try SMTP again.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,880
Messages
589,533
Members
164,735
Latest member
998742