Moodle 3.5 self registration mail failed: auth_emailnoemail error - moodle

I am running moodle 3.5.3 LTS and I activate self registration.
When an user tries to create a an account, the following error happened:
Debug info:
Error code: auth_emailnoemail
Stack trace:
line 482 of /lib/setuplib.php: moodle_exception thrown
line 142 of /auth/email/auth.php: call to print_error()
line 99 of /auth/email/auth.php: call to auth_plugin_email->user_signup_with_confirmation()
line 89 of /login/signup.php: call to auth_plugin_email->user_signup()
When I execute the following php script, the mail is sent without error:
<?php
mail("me#mydomain.com","My subject","this is a test from php mail function");
I can send successfully mail from the command line using the mail command:
mail -s "Hello World" me#mydomain.com
What's wrong?

Setting noreplyaddress configuration field fixes the issue.
NB: enabling debugsmtp setting can be helpful to debug emails issues.

Related

OTRS Mailfetching issue

I have issue with OTRS version 6 which is running on ubuntu 16.04.
OTRS didn't fetch the mail properly whenever i tried to fetch the mail it through below error
" OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-77[5799]: [Error][Kernel::System::Daemon::DaemonModules::BaseTaskWorker::_HandleError][Line:52]: There was an error executing Execute() in Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch: Error: Timeout of 600 seconds reached, killing child process!"
I tried below steps:
Tried to reconfigure fetchmail:bin not success
Tried to add new param in Daemon: "ArtticlIndex rebuild" add new param "--force-pid"
3.Restart the server from remote console
How to fix this issue? please guide me on this.

How to specify the Mailbin that the icinga2 uses when invoking the mail command

I have icinga2 set up on a Ubuntu xenial machine. I'm using postfix to send emails, which is working properly, i.e.
echo "hello world" | mail -s "test subject" sammy#example.com
sends an email as expected.
However, when an icinga sends an email, I find the following error message:
/var/log/icinga2/debug.log
[2017-12-12 02:56:05 +0000] notice/Process: PID 5512 >
('/etc/icinga2/scripts/mail-host-notification.sh' '-4' '$
$a.mydomain.com' (PID: 5512, arguments: '/etc/icinga2/scripts/mail-host-notification.sh' '-4' '127.0.0$
Can't canonicalize "./Maildir"
./Maildir/sent: No such file or directory
Failed to save message in "./Maildir/sent" - message not sent
I know that the error is caused by the Maildir directory not being set up. However, I can't figure out how to determine which user is invoking the mail command. I also don't know what the cwd is set to in ./Maildir/sent.
I would be very grateful if anyone could help me figure out either:
Where to set up the Maildir
How to specify the user that icinga uses so as to know where to set up the Maildir
A better method to get icinga to send emails
Thanks in advance
I was able to get my icinga2 instance to mail properly by creating the Maildir in the / directory and setting the owner:group to nagios:nagios. Currently not sure how to configure this, but it is a working configuration!

error with linux-based mailserver

i got the following problem with my myserver based on Linux Debian 8:
i´m unable to send the test-mail via roundcube , it Returns the error : not ok
and i´m also unable to do the test-Login via roundcube , it Returns the error
Login failed for admin#mydomain from *** Unable to send command: A0002 LOGIN admin#mydomain
i also tryed to re-install it but it wont work
can somneone help me with this ?

while start the bro the error is coming "error occurred while trying to send mail: send-mail: SENDMAIL-NOTFOUND not found"

I've installed the Bro IDS but when I try to start the service an error is coming that :
Error: error occurred while trying to send mail: send-mail: SENDMAIL-NOTFOUND not found
starting ...
starting bro ...
bro terminated immediately after starting; check output with "diag"
I've already used broctl install and broctl update but still got the same error.
Kindly help
I've checked the configuration file i.e. node.cfg under /nsm/bro/etc and change the default interface eth0 with my system interface.
now bro has started
Bro can run without sendmail present but you may have been hit by a bug in Bro where it failed to include the Sendmail location in the config files. Whilst it says the bug was supposed to be fixed I've also seen the problem in Bro-2.5. So an easy fix is to do as suggested in the bug report and add the SendMail = /usr/sbin/sendmail to /usr/local/bro/etc/broctl.cfg and then rerun the deployment command:
sudo /usr/local/bro/bin/broctl deploy

Moodle 2.6 mailer not working properly

I'm having trouble with moodle mailer , problem is that moodle is not sending mail after registration to student and when somebody click forgotten password mail doesnt come to user also.
Error logs are empty
I tried to change to send via smtp servers but is not working
My moodle version is 2.6.1 and i cannot upgrade to higher version.
Can somebody please help me with this trouble ?
This is error log:
Error code: filenotfound
* line 463 of /lib/setuplib.php: moodle_exception thrown
* line 1948 of /lib/filelib.php: call to print_error()
* line 1201 of /lib/outputlib.php: call to send_file_not_found()
* line 94 of /theme/essential/lib.php: call to theme_config->setting_file_serve()
* line 4628 of /lib/filelib.php: call to theme_essential_pluginfile()
* line 37 of /pluginfile.php: call to file_pluginfile()
Edit your config.php and enter this
$CFG->debugsmtp = true;
Or go to site admin -> development -> debugging -> and check 'Debug email sending'
It will show verbose messages when sending email so might show what's wrong.
Alternatively, use an editor with xdebug enabled (I use Netbeans IDE) - then add a breakpoint at the start of the function email_to_user() in /lib/moodlelib.php - Then step through until it fails.
Problem Solved
I had to set port in lib/moodlelib.php to 465 (My provider want me to use 587)