create a file "ContactController.php" and place it inside "override/controllers/front" folder.
the file should look like this.
<?php
class ContactController extends ContactControllerCore {
public function postProcess() {
$email_address = Tools::convertEmailToIdn(trim(Tools::getValue('from')));
$emailParts = explode( '@', $email_address );
$emailDomain = end($emailParts);
if ($emailDomain == 'qq.com') {
header('HTTP/1.1 403 FORBIDDEN');
header('Status: 403 No China here!!!');
header("Location: https://www.qq.com/");
}
return parent::postProcess();
}
}
i think it should work, don't have time to test it right now.
you should delete cache/class_index.php as well