I get the same, too.
I’m running a slightly updated version of Notify404 (which I still need to wrap up) which gives more info on the visitor.
Under your email details, replace all of it with this:
/* Unless you know PHP and want to modify this plugin, do not edit below */
/*************************************************************************/
if ($mailto == '') {
$modx->log(modX::LOG_LEVEL_ERROR,'Error: mailto not specified for Notify404');
return;
}
$phs['ip'] = $_SERVER['REMOTE_ADDR'];
$phs['host'] = 'http'. ($_SERVER['HTTPS'] ? 's' : null) .'://'. $_SERVER['HTTP_HOST'];
$phs['request'] = $_SERVER['REQUEST_URI'];
$phs['timestamp'] = date('d M Y - G:i:s');
$phs['referer'] = ($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'Not available.';
$phs['user_agent'] = ($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'Not available.';
if (strstr($phs['request'],'reflect')) { return; }
$message = $modx->getChunk($mailchunk,$phs);
if ($message == '') {
$message = '<p>This is an automated email notification of a 404 error that has occured on the [[++site_name]] website.<br /><br />
<strong>Date & time</strong>: [[+timestamp]]<br />
<strong>Requested</strong>: [[+request]]<br />
<strong>Host</strong>: [[+host]]<br />
<strong>Visitor IP</strong>: [[+ip]]<br />
<strong>Referer</strong>: [[+referer]]<br />
</strong>User agent</strong>: [[+user_agent]]<br /><br />
These automatic notifications can be disabled by disabling the Notify404 plugin in your [[++site_name]] manager.<br />
Sent by Notify404 from [[++site_url]]</p>
';
}
$modx->getService('mail', 'mail.modPHPMailer');
$modx->mail->set(modMail::MAIL_BODY,$message);
$modx->mail->set(modMail::MAIL_FROM,$mailfrom);
$modx->mail->set(modMail::MAIL_FROM_NAME,'Notify404');
$modx->mail->set(modMail::MAIL_SENDER,'Notify404');
$modx->mail->set(modMail::MAIL_SUBJECT,'[Notify404] Not found: '.$phs['request']);
$modx->mail->address('to',$mailto);
$modx->mail->address('reply-to',$replyto);
$modx->mail->setHTML(true);
if (!$modx->mail->send()) {
$modx->log(modX::LOG_LEVEL_ERROR,'An error occurred while trying to send the email: '.$err);
}
$modx->mail->reset();
It will also send you the user agent and some other details like the referer. Oh and I added in a check to not send me emails of failed attempts to hack my site through an Evo exploit (reflect one).. my site is targetted often due to the "modx" in some of the urls.
What I find is that most of the 404’s are from java user agents who don’t understand relative urls (not even with a proper base href)...