How to remove link to Contact site support to avoid SPAM

How to remove link to Contact site support to avoid SPAM

by Joseph Rézeau -
Number of replies: 16
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi!

I have a small online Moodle test site which is getting very low traffic. Since updating to Moodle 4.0 I am regularly getting spam messages from the Contact site support link on my site home page.

The messages I get clearly state "Be careful with this message. The sender was not logged in, so their identity has not been confirmed."

But I'd rather find a way to totally remove the Contact site support link, as it is useless on my site.

Any ideas?

Average of ratings: -
In reply to Joseph Rézeau

Re: How to remove link to Contact site support to avoid SPAM

by Ken Task -
Picture of Particularly helpful Moodlers

What theme are you using?   Am not seeing a contact support link at bottom of
tinker site using Classic.

in a 4.0, Site Admin -> Server -> Outgoing mail configuration
there is a noreply address, which, if I recall, when I upgraded that site to 4.0 complained about the 'false noreply' I had in config.

There is now an Email Diverting config box which has this comment/diz:

"Used as a safeguard in development environments when testing emails and should not be used in production."

Other settings there as well.

One could add a line to config.php

$CFG->divertallemailsto='nouser@FQDNofserver';

where 'nouser' is really 'non-existent' and the @FQDNofserver is the true FQDN of your server.

The test sending of mail tool does not work then.

You might also check your server web server logs for the IP addresses hitting that support email address on your server ... and use your servers firewall to drop the ip or the range of IP addresses that IP includes (drop zone).   Am using the drop zone quite often now for my 'tinker sites'! sad (5358 entries over the last few years)

'SoS', Ken

In reply to Ken Task

Re: How to remove link to Contact site support to avoid SPAM

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
@Ken - please see Support contact This email is now mandatory - although I wasn't aware the support contact doesn;t appear in Classic. In Boost, it appears in the question mark icon bottom right.
Various related tracker issues here: MDL-73608 and MDL-72984
Average of ratings: Useful (1)
In reply to Mary Cooch

Re: How to remove link to Contact site support to avoid SPAM

by Ken Task -
Picture of Particularly helpful Moodlers

In Boost, ? icon does show and does have a 'contact' link  contained in popup box ... not in Classic.  Have set a course to Boost and ? is there but one must login to see it.

Good to know, though!   Thanks!  smile

'SoS', Ken

In reply to Ken Task

Re: How to remove link to Contact site support to avoid SPAM

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Ah correction (for my own records) - although when using Classic,  the Contact site support doesn't appear on the Front page of my 4.0 site when not logged in, it does appear on the actual Log in page https://xxxxx/login/index.php (which is fair enough, if you need help logging in)
In reply to Mary Cooch

Re: How to remove link to Contact site support to avoid SPAM

by Ken Task -
Picture of Particularly helpful Moodlers

Well ... appears I've not followed what I use to 'preach' .... RATS (Read All the Screen!) ... there is a ? icon ... lower right on login form page - have seen it, but it didn't register with my feeble! sad

For the OP ... did read the tracker submission ... kinda complicated setup there.

Simpler? ....

the access to look for in your server logs:
/user/contactsitesupport.php and it is a POST

fgrep "POST" /var/log/httpd/ssl_access_log

should show IP, date/time it was called.

With:
$CFG->divertallemailsto='nouser@FQDNofSERVER';
There is no 'nouser' on that system.

Tested without logging on.
It was logged and can the reference in the logs.
The form reported successfully sending, but ... no mail.

Should you ever want to use that feature on your sandbox server, easy fix is to comment out that divert line in config.php.

'SoS', Ken

In reply to Joseph Rézeau

Re: How to remove link to Contact site support to avoid SPAM

by Ken Task -
Picture of Particularly helpful Moodlers

"The sender was not logged in" ... that's not good! :|

Still have one of those messages in your inbox?   If so, please look at the full header

There should be a line below Subject line that shows:

X-Moodle-Originating-Script

Also read from subject line upwards ... initial reference should be to your servers phpmailer (default if no SMTP setup) and note each 'received by' line.

Also, check your apache logs ... see if you can determine an IP address that used any php script involved.

'SoS', Ken


In reply to Joseph Rézeau

Re: How to remove link to Contact site support to avoid SPAM

by Diego Corral Molero -
Hi!

I found a "solution" about this.

In Admin > Server > Support contact > supportpage I added "#" so when anyone try press in contact they stay in page avoiding spam being send.
Not the best option but is a fast solution.
Average of ratings: Useful (2)
In reply to Diego Corral Molero

Re: How to remove link to Contact site support to avoid SPAM

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Please note in Moodle 4.1 there are additional options - see the documentation Support contact
Average of ratings: Useful (4)
In reply to Mary Cooch

Re: How to remove link to Contact site support to avoid SPAM

by Diego Corral Molero -
You right, but user who ask is in Moodle 4.0 so, he can't use this option until he update moodle.

By the way, Thank you!
In reply to Diego Corral Molero

Re: How to remove link to Contact site support to avoid SPAM

by Sree M -
Thanks for the workaround

Sree
In reply to Mary Cooch

Re: How to remove link to Contact site support to avoid SPAM

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
To call the Support contact form in 4.1 one has to be logged in? What if the question is, "I can't log in"?
kiss
In reply to Visvanath Ratnaweera

Re: How to remove link to Contact site support to avoid SPAM

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
You don't have to be logged in to send a message to support (for example saying you can't log in) However, those admins who decide to restrict it to only authenticated users - I am not sure how they resolve the problem of people not able to log in...
In reply to Mary Cooch

Re: How to remove link to Contact site support to avoid SPAM

by Sudhir Singhal -
I am also facing the same issue of getting spam emails with this support form.
Is there any option to add captcha on this form to avoid spam?

Right now I disabled this support form and provided my email address in the footer.
So that others can not spam using my SMTP server.
Any other suggestions to stop spamming?
In reply to Sudhir Singhal

Re: How to remove link to Contact site support to avoid SPAM

by Martin Niewzwaag -
"Is there any option to add captcha on this form to avoid spam?"

Feature request:
Yes, please add captcha to this form for not logged in users.
In reply to Martin Niewzwaag

Re: How to remove link to Contact site support to avoid SPAM

by Martin Niewzwaag -
Sorry, my mistake. Captcha is working out of the box with the captcha plugin.