How to Resolve Issues with SMTP Not Sending Emails in cPFence?

Note: Only the following special characters are supported in SMTP usernames and passwords:
% # @ : / + ? & ! $ ; = , ' ( ) *
Make sure your credentials do not contain unsupported characters such as spaces, quotes, or backslashes to avoid configuration errors.

If your SMTP setup in cPFence is not sending emails, it may be due to compatibility issues with certain SMTP providers, such as MXRoute and ZeptoMail, that don’t support modern configuration variables. This guide will help you adjust your SMTP configuration to ensure proper functionality.

Steps to Fix SMTP Sending Issues

  1. Open the SMTP Configuration File:
    nano /etc/s-nail.rc
  2. Update the SMTP Configuration:

    Replace the current SMTP settings in the file with the updated configuration below:

    Original Configuration:

    # cPFence SMTP Configuration - START
    set v15-compat
    set from="[email protected] (cp.xxx)"
    set mta=smtps://smtp%40xxx.cc:[email protected]:465
    # cPFence SMTP Configuration - END

    Updated Configuration:

    # cPFence SMTP Configuration - START
    set smtp=smtps://smtp.xxx.cc:465
    set smtp-auth=login
    set [email protected]
    set smtp-auth-password=password
    set ssl-verify=ignore
    set from="[email protected] (cp.xxx)"
    # cPFence SMTP Configuration - END
    Tip for Microsoft 365 Users:
    Some clients using Microsoft 365 have reported that the following settings worked for them:
    set mta=smtp://smtp.office365.com:587
    set smtp-auth=login
    set [email protected]
    set smtp-auth-password=yourpassword
    set from="[email protected]"
    set smtp-use-starttls
    If you're using Microsoft 365, try this configuration and see if it resolves the issue.
  3. Save and Close the File:

    Press Ctrl + O to save the file and Ctrl + X to exit the editor.

  4. Test Your SMTP Configuration:

    Send a test email using the following command:

    mailx -v -s 'SMTP Test Email from cPFence' '[email protected]' <<< 'This is a test email to confirm the SMTP configuration for cPFence notifications.'

    Replace [email protected] with your test email address.

Important Notes

  • This workaround resolves the issue with SMTP not sending emails by using legacy-compatible configuration variables.
  • Monitor your SMTP provider for updates regarding modern variable support, as older variables may become obsolete in the future.

Need Help?

If the issue persists or you require additional assistance, don’t hesitate to contact our support team through your client portal. We’re here to help!

  • smtp
  • 2 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

Is cPFence Compatible with Cloudflare, BunnyCDN and Quic.Cloud?

Yes, cPFence is fully compatible with Cloudflare, Quic.Cloud, and BunnyCDN. In fact, we recommend...

Why Do I See "could not change directory to /root: Permission denied" Warnings?

You may occasionally encounter the following warning message while using cPFence: could not...

How to Uninstall cPFence ?

If you need to remove cPFence from your system, follow the steps below to uninstall the software...

Configuring Hostname on Ubuntu for cPFence Emails and Features

Setting a proper hostname on your server is important for several reasons, including being able...

How to Set Up Slack Notifications in cPFence?

If you'd like to receive cPFence alerts on your desktop or mobile via Slack, follow the steps...