Jump to content

Domain Synchronisation Cron Report


MaikelVE

Recommended Posts

I'm not aware of any way of disabling just those emails. You can filter them via the mail server; that's what we've done. I'd suggest pushing them to a mailbox just for that, and check it weekly for problems, if you don't want to keep track daily. Alternately, you can just kill them (not recommended). 

Check this thread:

 

Edited by bear
Link to comment
Share on other sites

  • WHMCS Technical Analyst III

Hello,

There is no specific option to stop only those emails unfortunately, you can navigate to Setup > Staff Management > Administrator Roles and untick "System Emails (eg. Cron Notifications, Invalid Login Attempts, etc...)" but this will stop more than just the domain sync emails.

If this is not suitable, I would recommend adding some local filtering rules to discard those emails as they come in, using the subject as the base for creating the rule.

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...
  • 4 weeks later...

As a consultant installing WHMCS for other the very first question they ask me is about these automated emails for domain synchronisation.

I struggle to explain this to them:

 Setup > Staff Management > Administrator Roles and untick "System Emails (eg. Cron Notifications, Invalid Login Attempts, etc...)"


but this will stop more than just the domain sync emails.

Hopefully, one day, there will be a magic button where we can put this off.

Link to comment
Share on other sites

  • 5 months later...

There's no clean way to prevent email sending. If Domain Synch was an Email Template, we could have stop it via EmailPreSend. Sadly WHMCS sends it by directly requiring (or initializing) phpMailer file (or class).

The only solution is an hack. Edit phpMailer loader file so that it throws a die(); when it is included or initialized by crons/domainsync.php. It works but it is ugly and your change will be reverted back on every update of WHMCS.

A more sensical approach is to use a filter on your email so that the all incoming emails with "WHMCS Domain Synchronisation Cron Report" title automatically go in "Automatic email" folder. If like me you recieve a lot of such useless emails (I have access to hundreds of WHMCS systems that flood me with thousands cron/sync emails on a daily basis) also enable automatic cancellation after X days.

 

Edited by Kian
Link to comment
Share on other sites

  • 9 months later...
<?php

add_hook('EmailPreSend', 1, function ($vars) 
{
  $messageName = $vars['messagename'];

  $templateName = array(
    'WHMCS Domain Synchronisation Cron Report',

  );
 
  $merge_fields = array(); 
  if(in_array($messageName, $templateName))
  {  
      $merge_fields['abortsend'] = true;
  }

  return $merge_fields;
});

Why not use simple Hook? 
Event more Template names in Array possible to abort. 

Link to comment
Share on other sites

  • 10 months later...

Oh, I totally get how annoying that is—I had the same issue with my setup. What worked for me was going into the cron job settings and redirecting the email output to /dev/null, so it just runs silently in the background. It took care of all those daily reports cluttering my inbox! Give it a try, and it should stop the spam without messing with the actual function.


 

Link to comment
Share on other sites

There have been times in the past where the cron fails to sync, generally because of an issue with the registrar. Just my opinion, but better to receive these and know than to have it failing with no notifications of problems. I still recommend creating a "dead letter" mailbox just for them you can view once a day to be sure then toss all at once. 

Link to comment
Share on other sites

  • 11 months later...

Six years since the first message on this thread and there has been (as far as I can tell) zero change to this situation.

This behavior undermines the entire purpose of checking and notifying an administrator. See: the mental model is that this cron job should check on something, and if it finds a problem, administrators will be alerted to the problem by receiving an email. But in practice that will never happen. Administrators will find out about domain synchronization problems through something other than this email because all of us are filtering these emails and not looking at them. It literally doesn't do what it is meant to do: find a problem and notify the right person. This is such a basic issue and it takes so little effort to fix. How is it six YEARS since it was raised and there's not even a decent workaround much less a fix to the bug?

The problems are these:

  • The system sends multiple email messages per day, even when there's absolutely nothing wrong
  • The destination address that it sends to cannot be changed or modified
  • The email cannot be suppressed
  • The configuration allows three choices:
    • Do the synchronization and send an email about it, even if there's nothing to do and no problems.
    • Send the emails about it, even if there's nothing wrong--but don't actually do the synchronization
    • Do nothing at all (disable the check entirely)
  • The cron job code is protected intellectual property and is not editable/modifiable by the administrator.
  • Even if we found a way to modify the cron job, it would just revert on the next software update.

The obvious right answer is to notify the administrator only on problems. There is literally no argument for leaving it the way it is. This is an incorrect implementation.

Is there somewhere else we should request product features? Is that why this has gotten no attention in all these years, because it's not being requested the right way?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated