Defining a mail server connection in Lucee Admin

Linux debian 10
Apache
Lucee 5.3.9.133

I started a new server VPS at Gandi.
All going well. (linux, apache, lucee, web displayed well)
Now defining a “mail server” in Lucee Admin server context : mail.gandi.net

I press on “verify” button, then I get this good message : Verification of mail server [mail.gandi.net] was successful.

When I test “send a test mail” , with from/to , seems OK.
But no mail received.

And, when I use the CFmail in a web page, the mails never arrive.

How to ensure the mail server is correct and running, sending the correctly the mails ?

Thanks for help/suggestion.
(I need a mail server)

Did you try to turn logging for mails on?

This is how you can do it:

  1. Step: Log into your server administrator
  2. Step: Go to SettingsLogging
  3. Edit the setting for “mail” and set the level from from “error” to “debug” adn save it. You may need to restart Tomcat, I can’t remember well.
  4. Go to your application and create the mail with cfmail
  5. Check in the web context of that very same application for the logfile /web-inf/lucee/logs/mail.log

If the emails never arrive, it can be very different issues, e.g. spam-filters or depending on the SMTP server you are using, you may need to set for e.g. SPF, DKIM or similar.

I get this error :slight_smile: SMTPAddressFailedException: 554 5.7.1 <xvm-105-187.dc0.ghst.net[46.226.105.187]>: Client host rejected: Access denied

Then, It seems that the SMTP used decline my server IP.
Then, may be , I have to install a mail server on the web server ?
(or can I use some SMTP somewhere ?)
Thanks for suggestion.

Depends. Not necessarily. You need to know why exactly your IP is being denied. Looks like you are trying to use that smtp server without credentials, because the error code the smtp server is returning to you means that "relay is not allowed’ (that means without authentication). You need to have explicit authentication access and enter the credential to your mail settings in your application, just setting as you would do with any other mail cleint (like thunderbird, outlook, etc).

Can I use Postfix in Linux Debian 10
It should do the work ?
But I nerver used it (no experimentation with).
Thanks, Pierre.

Installing a mta mail server isn’t that trivial. There are many other things implicated. I’d check if your ISP that is hosting your domain doesn’t have already such a service available for you. My Domain Name Service provider for example has such a service on top for free. It’s good for most use cases, unless you want to make bulk mailings. But then, installing such an MTA might be more demanding than you are thinking. You’d need to whitelist it, keep on eye on the IP’s reputation and much more.

Well, I understand, I will check this at Gandi.
Thanks, Pierre.

Well , it did work when creating a mailbox at Gandi (admin@leol.fr) and use its parameters in the Lucee administration.

But , something strange,
when I use the Lucee admin to test the mail server, I receive that mail from Lucee admin with this from : admin@leol.fr to : pierre@pl-arts.com

And using a simple CFmail in a site page with same from/to it does not arrive, but no error, no undelivered.
And if I use another simple cfmail : from : pierre@pl-arts.com to : pierre@pl-arts.com
in the site page, it does arrive.
Seems to me misteries, If you have an idea ?
May be to wait arrivals.
Thanks, Pierre.

This sounds/smells like being some kind of spam filtering, but I can’t really say and take any conclusions and see the root of the cause. it can have tons of reasons. But it really doesn’t make sense. I’d say you must use the from emaiil of the smtp account allowed for its specific email. I’d also say, your cfmail is picking the wrong mailserver configuration, but you should be able to see the results in the logs.