Moodle - Forums not sending mail notifications - cron

I don't succeed in making Forums Moodle module sending mails for posts notification.
Although mails sending is working right in Moodle platform, when it comes to Forums module it doesn't work. I executed cron.php from the browser and I got:
Starting activity modules
Processing module function assignment_cron ...done.
Processing module function chat_cron ...done.
Processing module function forum_cron ...Processing user 3
Sending ERROR: SMTP Error: Data not accepted.
Error: mod/forum/cron.php: Could not send out mail for id 13 to user 3 (test.test#test.org) .. not trying again.
post 13: Re: test4
Sending ERROR: SMTP Error: Data not accepted.
Error: mod/forum/cron.php: Could not send out mail for id 14 to user 3 (test.test#test.org) .. not trying again.
post 14: Re: test4
Processing user 4
Sending ERROR: SMTP Error: Data not accepted.
Error: mod/forum/cron.php: Could not send out mail for id 13 to user 4 (test.test#test.org) .. not trying again.
post 13: Re: test4
Sending ERROR: SMTP Error: Data not accepted.
Error: mod/forum/cron.php: Could not send out mail for id 14 to user 4 (test.test#test.org) .. not trying again.
post 14: Re: test4
....
post 19: Re: teacher topic
0 users were sent post 13, 'Re: test4'
0 users were sent post 14, 'Re: test4'
0 users were sent post 15, 'new topic test'
0 users were sent post 16, 'Re: new topic test'
0 users were sent post 17, 'Re: new topic test'
0 users were sent post 18, 'teacher topic'
0 users were sent post 19, 'Re: teacher topic'
Starting digest processing...
Cleaned old digest records
done.

In moodle 1.9 or 2.0 go to Site administration ► Server ► Email to check the SMTP settings.
Click on the moodle docs link at the bottom of this page and it will take you to moodle documentation, where it talks about Email settings, SMTP settings in particular.
If you cant find the link to moodle docs, http://docs.moodle.org/21/en/admin/setting/mail

Related

Gramex SMTP Email Issue

I have to send an email from python function to multiple users with dynamic content.
I have given email details in gramex.yaml as below
email:
barcode-mail-service:
type: gmail
email: gramex.guide#gmail.com
password: alphaBetaGamma
In my python function I have implemented mail functionality as below:
def email_users(_pending_users, approval):
mailer = service.email['barcode-mail-service']
content = []
if approval == 'Approved':
content = [f"Hi {obj['user']},\n\n \
Welcome to the Service online portal!"
for obj in
_pending_users.to_dict('r')
]
else:
content = [f"Hi {obj['user']},\n\n \
Your request has been rejected by the approver!"
for obj in _pending_users.to_dict('r')
]
to_list = _pending_users['email'].tolist() #gets list of all email ids
for index in range(len(to_list)): #loops over each mail id and sends the email
mailer.mail(
to=to_list[index],
subject=f'Barcode User Access {approval}',
html=content[index]
)
When I execute the above function I get the following error:
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
How can I fix this?
This seems to be a Firewall issue. SMTP internally uses port 25 for sending email. Enable (Allow) port 25 on your system and try if that works. You would need to enable this port on the server as well during deployment.
Note: Check which port is being used for sending the email by your Email Exchange
You can check this link to enable on Windows OS

Forwarding messages from Telegram Bot

I need to do the following:
user sends all kind of messages to my bot;
bot should forward the particular messages to my channel like this:
bot.forward_message(chat_id='my_chat_id', from_chat_id='my_chat_id_from_which_I_am_forwarding', message_id=message.message_id)
However, I am getting this error:
ERROR - init:__threaded_polling:515 - A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: message to forward not found, 2021-03-09 18:44:15,950
When I debug this, message.message_id and message.text are correct. Does anybody have any ideas or suggestions?
bot.forward_message(
chat_id="#channel",
from_chat_id="chat_id_from_which_I_am_forwarding",
message_id=message.message_id)
You need to add the bot as admin in the channel!!

canno't send from plesk webmail to Gmail " a simple mail"

after i change my hostname in plesk " there was a IP adress but now i cant change hostname to ip" i can't send email to gmail. on outlook works propperly and plus on info#mydomain.com i cant send to info#myclientdomain.com email but on gmail i can't pls help me i'm getting this error
This is the mail system at host server1.mydomain.ge.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<astronaut.georgia#gmail.com>: host
gmail-smtp-in.l.google.com[2a00:1450:400c:c08::1a] said: 550-5.7.1
[2a01:4f8:c2c:fe73::1] Our system has detected that this message does
550-5.7.1 not meet IPv6 sending guidelines regarding PTR records and
550-5.7.1 authentication. Please review 550-5.7.1
https://support.google.com/mail/?p=IPv6AuthError for more information 550
5.7.1 . k2si2790691wrg.299 - gsmtp (in reply to end of DATA command)
Reporting-MTA: dns; mydomain.com
X-Postfix-Queue-ID: 03B9E6257E
X-Postfix-Sender: rfc822; info#mydomain.com
Arrival-Date: Thu, 5 Nov 2020 20:26:02 +0100 (CET)
Final-Recipient: rfc822; astronaut.georgia#gmail.com
Original-Recipient: rfc822;astronaut.georgia#gmail.com
Action: failed
Status: 5.7.1
Remote-MTA: dns; gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 550-5.7.1 [2a01:4f8:c2c:fe73::1] Our system has detected
that this message does 550-5.7.1 not meet IPv6 sending guidelines regarding
PTR records and 550-5.7.1 authentication. Please review 550-5.7.1
https://support.google.com/mail/?p=IPv6AuthError for more information 550
5.7.1 . k2si2790691wrg.299 - gsmtp
გამგზავნი info#mydomain.com
ვის astronaut.georgia#gmail.com
თარიღი დღეს 23:26
qqq
Try to apply the solution from this KB article - https://support.plesk.com/hc/en-us/articles/213936285-Unable-to-send-an-email-to-Gmail-from-a-Plesk-server-Our-system-has-detected-that-this-message-does-not-meet-IPv6-sending-guidelines-regarding-PTR-records

Twitter API issue (code: 349, message: 'You cannot send messages to this user.') in node.js

I am sending message by using direct_messages/events/new method in Node.js by using API,
But i am getting the errors like { code: 349, message: 'You cannot send messages to this user.' }
please help me to solve this issue.
Thanks
If the user is not following you or has blocked you, then you will not be able to send messages to the user.
You can also send messages to a user that is not following you but has DM'd you (e.g. if your id accepts DMs without requiring mutual following). However, if the user is not following you/has blocked you (as mentioned by Andy Piper) or has not DM'd you, you'll receive the "code: 349, message: 'You cannot send messages to this user.'" error. Tested via postman using the direct message api (https://api.twitter.com/1.1/direct_messages/events/new.json).

How is another IP sending email through my qMail?

My first question on here...
I have a VPS which I have a few small websites on and also run my email services, every now and then I see messages in my mail queue that I did not send.
Firstly my setup:
Ubuntu 12.04
Latest Plesk Panel
qMail SMTP Server
Courier-imap
Using the Plesk panel I have set up qmail to not act as an open relay, and must use SMTP authentication to send to remote accounts, also short mailbox names are not allowed only the full account names.
Today I received bounced messages, upon checking my mail queue I have found again emails in there with multiple recipients that I have not sent.
These are not being sent by a script on my server as I would see different header information with uid 33 being specified, instead I see invoked from network in the mail header, an example below...
Received: (qmail 17710 invoked from network); 2 Feb 2016 11:34:10 +0000
Received: from unknown (HELO mx1.variationdesign.co.uk) (182.190.250.238)
by lvps212-67-205-193.vps.webfusion.co.uk with ESMTPA;
2 Feb 2016 11:34:09 +0000
From: Merel de Bruin - Van de Beek <seth#variationdesign.co.uk>
Content-Type: multipart/alternative;
boundary=Apple-Mail-29D34A60-FB4E-38B5-1BBF-7DDE23285FD2
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (1.0)
Subject: Re(4): Surprise
Message-Id: <91925fdeae7d$78ac5f73$dfad0a17$#variationdesign.co.uk>
Date: Mon, 2 Feb 2016 12:33:59 +0000
To: "sanderdejong" <sanderdejong#hotmail.com>,
"Sanne van Roon" <sannevanroon#hotmail.com>,
"Sarah Dormaar" <sarahdormaar#hotmail.com>,
"Sarah Tempelaar" <bordeaux84#hotmail.com>, "saskia middel" <s.middel#jvo.nl>,
"Saskia Roovers" <matrixspijkertje#hotmail.com>,
"sinta sinta ss" <sinta_sinta_ss#hotmail.com>,
"Sinta de Wildt" <sinta_de_wildt#hotmail.com>,
"skizonespijkertje" <skizonespijkertje#hotmail.com>,
"spijkertje matrix" <spijkertje_matrix#hotmail.com>,
"sroovers007" <sroovers007#hotmail.com>, "sroovers75" <sroovers75#hotmail.com>,
"stali n" <stali_n#hotmail.com>, "stingarts" <stingarts#hotmail.com>,
"suus rem" <suus_rem#post.com>, "svdbersselaar" <svdbersselaar#hotmail.com>,
"teresa villalobos" <teresavs#hotmail.com>, "teresavs" <teresavs#home.nl>,
"Thomas Bollen" <T.P.F.Bollen#students.uu.nl>
X-Mailer: iPad Mail (13A452)
X-PPP-Message-ID: <20160202113410.17689.25881#lvps212-67-205-193.vps.webfusion.co.uk>
X-PPP-Vhost: variationdesign.co.uk
The IP: 182.190.250.238 is nothing to do with me, I also never use mx1.variationdesign.co.uk.
Every time I want to send an email, I have to send my username and password to be able to send through this server.
My question is, how on earth is this person/people able to physically send emails through my VPS without authenticating?
I see in the logs around the same time "smtp_auth' for username seth#variationdesign.co.uk, which is odd because that is actually just an alias and not an email account, the account itself uses my full name and a couple of numbers at the end, I did this to try and stop spammers from guessing the correct username.
My server is definitely sending these emails out and I can't figure out how they are doing it, what ma I missing here?
I appreciate any help you can give me on this matter.
Kind regards
Seth
qMail SMTP Server comes with a default configuration to be a open relay, make sure you disable that and only authenticaed users can send emails. And stop your server before you get into a blacklist for spam.
https://qmail.jms1.net/relay.shtml

Resources