SMTP Incoming email issue

SMTP Incoming email issue

Khalaf Almazrouei -
Колькасьць адказаў: 8

Hi All I hope that everyone is doing well, I was trying to setup the incoming mail and followed the step but kept getting the error message Could not connect to IMAP server.

 I made sure that mail confguration is wrong by placing the example.com:993 and that the firewall is not blocking the IMAP for both ssl and no ssl ports along with that I add the correct username and password. But it still failing. dose anyone have any solution to solve this issue. I have tried mutliple plugin to test out the inbox mail and still faced the same issue

I am hosting moodle via private VPS Cpanel and my moodle version is Moodle 4.4.1+
MOODLE_404_STABLE

I have checked with the hosting company and they told me that all the IMAP ports are not blocked.

Please note that I have installed moodle via Softaculous and tested all type of ports (SSL and Non SSL) and selected each type of use_ssl but still facing same issue, could this be a bug and if it is a bug is their an altenrtive solution to fix it manual from the filemanger   

Execute scheduled task: Incoming email pickup (tool_messageinbound\task\pickup_task)
... started 12:27:10. Current memory use 29.3 MB.
Debugging increased temporarily due to faildelay of 86400
Connecting to info@elearning.skmcsimcenter.site as info@elearning.skmcsimcenter.site...
... used 0 dbqueries
... used 0.032258987426758 seconds
Scheduled task failed: Incoming email pickup (tool_messageinbound\task\pickup_task),tool_messageinbound/imapconnectfailure (Could not connect to IMAP server.)
Debug info:
 v.
Backtrace:
* line 225 of /admin/tool/messageinbound/classes/manager.php: call to tool_messageinbound\manager->get_imap_client()
* line 52 of /admin/tool/messageinbound/classes/task/pickup_task.php: call to tool_messageinbound\manager->pickup_messages()
* line 410 of /lib/classes/cron.php: call to tool_messageinbound\task\pickup_task->execute()
* line 208 of /lib/classes/cron.php: call to core\cron::run_inner_scheduled_task()
* line 125 of /lib/classes/cron.php: call to core\cron::run_scheduled_tasks()
* line 186 of /admin/cli/cron.php: call to core\cron::run_main_process()

Attachment SMPT configuration.png

Attachment SMTP Cpnael mail settings .png

Сярэдняе рэйтынгаў: -
У адказ на Khalaf Almazrouei

Re: SMTP Incoming email issue

Ken Task -
Выява Particularly helpful Moodlers

Verifying hosting provider - ports are open:

143/tcp open  imap
465/tcp open  smtps
993/tcp open  imaps
995/tcp open  pop3s

However, there are no records in DNS for mail.elearning.skmcsimcenter.site

dig mail.elearning.skmcsimcenter.site

begets 0 Answers.

You've shown us cron and debug, but what of server error logs and mail server logs?

Am assuming your server is Linux but what distro?   Is there a service for IMAPS/POP3S runnning?   Ports can be open but that does not mean a service is there.

Given the state of SPAM/phishing/virus/etc in EMail these days, are you sure you want to do this?

'SoS', Ken

У адказ на Ken Task

Re: SMTP Incoming email issue

Khalaf Almazrouei -

Hi Ken,

Thanks for your support and advise, and sorry for the late reply, so as per your adivse that their will be a high risk of SPAM/Phising /virus if we enabled the incoming email. what would be your recomendtion for incmoing mail to reduce the high risk. the main purpose of incmoing mail is to be able to solve issues with courses.

I am hosting moodle via Cpanel Linuex Cloud based system version

VPS: CentOS v7.9.2009      Capnel version: 110.0.34        

У адказ на Khalaf Almazrouei

Re: SMTP Incoming email issue

Ken Task -
Выява Particularly helpful Moodlers

"VPS: CentOS v7.9.2009"

You've a larger issue!  Centos 7 is to expire updates 30 June 2024 - that's 7 days from now!

Am somewhat surprised you are not aware of that as your cPanel should have notified you.   But I guess that depends upon where hosted.  So with whom are you hosted?

So before pursuing incoming email, check with provider!

Please see:

https://www.redhat.com/en/topics/linux/centos-linux-eol

'SoS', Ken

У адказ на Ken Task

Re: SMTP Incoming email issue

Khalaf Almazrouei -

Thanks for your respond, we are hosting it via hostgator as per the hosting company they stated that very soon they will be doing major OS update they will migarte from CentOS 7 to AlmaLinux 8.

У адказ на Khalaf Almazrouei

Re: SMTP Incoming email issue

Ken Task -
Выява Particularly helpful Moodlers

Will hostgator do that for you?

When you arrive at AlmaLinux 8, your versions of MySQL (if running MySQL) will be version 8 and there will be higher versions of PHP as well.

That could adversely affect your Moodle if your Moodle is older than 4.0.

http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases

Also, check the EOL date for AlmaLinux 8.

Think I'd wait to tinker with Moodle until after the migration.   You might have a lot more work to do after the migration to AlmaLinux 8.

'SoS', Ken

У адказ на Ken Task

Re: SMTP Incoming email issue

Susan Jones -
Nope, it had a 4 in there ;) It's still Sunday 6/23 here (Happy Birthday Mike Next Door!)
However, I cannot find your more direct message, much less my message sending you the access info. I have it all ready to cut and paste...
У адказ на Susan Jones

Re: SMTP Incoming email issue

Ken Task -
Выява Particularly helpful Moodlers

@Susan Jones
Our conversation about your moodle is over @
https://moodle.org/mod/forum/discuss.php?d=459418

You've used private message on this system before.

Look in upper right hand corner when in these forums.

Next to your account icon/preferences on the far right, first icon to the left of that is the private messages.

Screenshot%202024-06-23%20at%209.24.42%E2%80%AFPM.png

Click the icon boxed in above.

Then click 'Private'.

You should see our previous exchange as well as a new one I just sent.

'SoS', Ken