{"id":358,"date":"2026-11-17T13:05:53","date_gmt":"2026-11-17T20:05:53","guid":{"rendered":"https:\/\/hostandtech.com\/kb\/?p=358"},"modified":"2026-11-17T13:05:53","modified_gmt":"2026-11-17T20:05:53","slug":"cpanel-server-sending-spam-find-source","status":"publish","type":"post","link":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/","title":{"rendered":"Server Sending Spam? How to Find the Source in WHM and Exim"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>When a cPanel server is sending spam, the source is almost always one of three things: a mailbox whose password was stolen, a PHP script on one of the sites, or a forwarder passing inbound spam on to Gmail or Outlook. The Exim log tells you which in one or two commands. Stop the account sending first, then find the source, fix it, clear the queue and request delisting.<\/p>\n<p>This guide is for VPS and dedicated server owners with root access to WHM. The usual warning signs are a mail queue in the thousands, bounce messages for mail nobody sent, a sudden Spamhaus or Microsoft block on your IP, or cPanel notices saying a domain &#8220;has exceeded the max emails per hour&#8221;. Work through the fixes in order. Clearing the queue before you&#8217;ve found the source just makes room for the next batch.<\/p>\n<h2>What causes a cPanel server to send spam<\/h2>\n<figure class=\"wp-block-image\"><img src=\"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/11\/cpanel-spam-source-triage.webp\" alt=\"Flowchart for finding spam on a cPanel server: check the queue, then the Exim log for a login, a script directory or a forwarder\" width=\"1000\" height=\"680\" loading=\"lazy\" decoding=\"async\"><figcaption>Three log signs cover almost every spam outbreak on a cPanel server.<\/figcaption><\/figure>\n<table>\n<thead>\n<tr>\n<th>Source<\/th>\n<th>Sign in the Exim log<\/th>\n<th>Typical cause<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Compromised mailbox<\/td>\n<td><code class=\"\" data-line=\"\">A=dovecot_login:user@example.com<\/code> on outgoing mail<\/td>\n<td>Weak or reused password, phished user, malware on a PC<\/td>\n<\/tr>\n<tr>\n<td>PHP script<\/td>\n<td><code class=\"\" data-line=\"\">cwd=\/home\/user\/public_html\/...<\/code><\/td>\n<td>Abused contact form, or a mailer uploaded through an old plugin<\/td>\n<\/tr>\n<tr>\n<td>Forwarder<\/td>\n<td>Mail from outside senders relayed to Gmail or Outlook<\/td>\n<td>A forwarder sending everything on, spam included<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How to find and stop the spam<\/h2>\n<h3>Fix 1: Check the queue and stop the sending account<\/h3>\n<p>Count the queue, then see which domains it&#8217;s sending to and from:<\/p>\n<div class='ht-code-snippet'><button class='ht-code-snippet__copy' onclick='htCopyCode(\"code-block-1\")' type='button' aria-label='Copy code'><svg class='ht-copy-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z'><\/path><path d='M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z'><\/path><\/svg><svg class='ht-check-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M13,24l-9-9,1.414-1.414L13,21.171,26.586,7.586,28,9Z'><\/path><\/svg><\/button><span class='ht-code-snippet__feedback'>Copied to clipboard<\/span><\/p>\n<pre class='ht-code-snippet__code' id='code-block-1'><code class=\"\" data-line=\"\">exim -bpc\nexim -bp | exiqsumm | sort -n | tail -n 15<\/code><\/pre>\n<\/div>\n<p>A normal small server holds a handful of messages; thousands means something is sending right now. The same view is in <strong>WHM &gt; Email &gt; Mail Queue Manager<\/strong>. If one cPanel account clearly owns the spam, stop its outgoing mail while you investigate. Incoming mail and the website keep working:<\/p>\n<div class='ht-code-snippet'><button class='ht-code-snippet__copy' onclick='htCopyCode(\"code-block-2\")' type='button' aria-label='Copy code'><svg class='ht-copy-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z'><\/path><path d='M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z'><\/path><\/svg><svg class='ht-check-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M13,24l-9-9,1.414-1.414L13,21.171,26.586,7.586,28,9Z'><\/path><\/svg><\/button><span class='ht-code-snippet__feedback'>Copied to clipboard<\/span><\/p>\n<pre class='ht-code-snippet__code' id='code-block-2'><code class=\"\" data-line=\"\">whmapi1 suspend_outgoing_email user=cpuser<\/code><\/pre>\n<\/div>\n<p>Reverse it later with <code class=\"\" data-line=\"\">whmapi1 unsuspend_outgoing_email user=cpuser<\/code>. To stop just one address, use cPanel <strong>Email Accounts &gt; Manage<\/strong> and set <strong>Sending Outgoing Email<\/strong> to <strong>Suspend<\/strong> (or <strong>Hold<\/strong>, which queues the messages so you can inspect them).<\/p>\n<h3>Fix 2: Find a compromised email account<\/h3>\n<p>Spam sent with a stolen password goes out through SMTP authentication, and Exim logs the mailbox that logged in. This counts outgoing messages by authenticated user:<\/p>\n<div class='ht-code-snippet'><button class='ht-code-snippet__copy' onclick='htCopyCode(\"code-block-3\")' type='button' aria-label='Copy code'><svg class='ht-copy-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z'><\/path><path d='M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z'><\/path><\/svg><svg class='ht-check-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M13,24l-9-9,1.414-1.414L13,21.171,26.586,7.586,28,9Z'><\/path><\/svg><\/button><span class='ht-code-snippet__feedback'>Copied to clipboard<\/span><\/p>\n<pre class='ht-code-snippet__code' id='code-block-3'><code class=\"\" data-line=\"\">grep -o &#039;A=dovecot_login:[^ ]*&#039; \/var\/log\/exim_mainlog | sort | uniq -c | sort -rn | head<\/code><\/pre>\n<\/div>\n<p>One address with thousands of entries when everyone else has dozens is your answer. To confirm, list the IP addresses that logged in as that user:<\/p>\n<div class='ht-code-snippet'><button class='ht-code-snippet__copy' onclick='htCopyCode(\"code-block-4\")' type='button' aria-label='Copy code'><svg class='ht-copy-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z'><\/path><path d='M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z'><\/path><\/svg><svg class='ht-check-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M13,24l-9-9,1.414-1.414L13,21.171,26.586,7.586,28,9Z'><\/path><\/svg><\/button><span class='ht-code-snippet__feedback'>Copied to clipboard<\/span><\/p>\n<pre class='ht-code-snippet__code' id='code-block-4'><code class=\"\" data-line=\"\">grep &#039;A=dovecot_login:info@example.com&#039; \/var\/log\/exim_mainlog | grep -oE &#039;&#092;[[0-9.]+&#092;]&#039; | sort | uniq -c | sort -rn | head<\/code><\/pre>\n<\/div>\n<p>A spread of addresses in countries where nobody works for the company means a stolen password. To fix it:<\/p>\n<ol>\n<li>Change the mailbox password in cPanel and give the new one only to its owner.<\/li>\n<li>Check that mailbox&#8217;s forwarders, autoresponders and filters. Attackers sometimes add a forwarder to keep copies of the replies.<\/li>\n<li>Ask the owner to update the password on their devices and to scan their computer. A password stolen by malware gets stolen again.<\/li>\n<\/ol>\n<h3>Fix 3: Find a PHP script sending mail<\/h3>\n<p>Mail sent by a script has no SMTP login. Instead, Exim records the directory the script ran from. This lists the busiest ones:<\/p>\n<div class='ht-code-snippet'><button class='ht-code-snippet__copy' onclick='htCopyCode(\"code-block-5\")' type='button' aria-label='Copy code'><svg class='ht-copy-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z'><\/path><path d='M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z'><\/path><\/svg><svg class='ht-check-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M13,24l-9-9,1.414-1.414L13,21.171,26.586,7.586,28,9Z'><\/path><\/svg><\/button><span class='ht-code-snippet__feedback'>Copied to clipboard<\/span><\/p>\n<pre class='ht-code-snippet__code' id='code-block-5'><code class=\"\" data-line=\"\">grep &#039;cwd=\/home&#039; \/var\/log\/exim_mainlog | grep -o &#039;cwd=[^ ]*&#039; | sort | uniq -c | sort -rn | head<\/code><\/pre>\n<\/div>\n<p>A count in the thousands against <code class=\"\" data-line=\"\">\/home\/cpuser\/public_html\/wp-content\/uploads\/2024<\/code> or a folder you don&#8217;t recognise points at an uploaded mailer. A count against the site root usually means an abused contact form. To name the exact file, read the headers of one queued message:<\/p>\n<div class='ht-code-snippet'><button class='ht-code-snippet__copy' onclick='htCopyCode(\"code-block-6\")' type='button' aria-label='Copy code'><svg class='ht-copy-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z'><\/path><path d='M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z'><\/path><\/svg><svg class='ht-check-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M13,24l-9-9,1.414-1.414L13,21.171,26.586,7.586,28,9Z'><\/path><\/svg><\/button><span class='ht-code-snippet__feedback'>Copied to clipboard<\/span><\/p>\n<pre class='ht-code-snippet__code' id='code-block-6'><code class=\"\" data-line=\"\">exiqgrep -i -f cpuser@server.hostname.example | head -n 3\nexim -Mvh 1tAbCd-000123-Xy<\/code><\/pre>\n<\/div>\n<p>Replace the ID with one from the first command. With PHP&#8217;s <code class=\"\" data-line=\"\">mail.add_x_header<\/code> enabled, the <code class=\"\" data-line=\"\">X-PHP-Originating-Script<\/code> header names the script. Then:<\/p>\n<ul>\n<li><strong>Uploaded mailer:<\/strong> remove it and scan the whole account, because it&#8217;s rarely the only file. See <a href=\"https:\/\/hostandtech.com\/kb\/security\/scan-for-malware-cpanel-virus-scanner-imunifyav\/\">how to scan for malware in cPanel<\/a>, then update or remove the plugin it came in through.<\/li>\n<li><strong>Abused contact form:<\/strong> add a CAPTCHA or honeypot field, and make sure the form never puts the visitor&#8217;s input into the To, Cc or Bcc headers.<\/li>\n<\/ul>\n<h3>Fix 4: Stop forwarders relaying spam<\/h3>\n<p>A forwarder sends every inbound message on to another provider, spam included. Gmail and Outlook then see your server as the sender of that spam and rate its IP down. See which local addresses forward the most mail to Gmail (the address in angle brackets is the forwarder; swap in outlook.com or hotmail.com as needed):<\/p>\n<div class='ht-code-snippet'><button class='ht-code-snippet__copy' onclick='htCopyCode(\"code-block-7\")' type='button' aria-label='Copy code'><svg class='ht-copy-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z'><\/path><path d='M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z'><\/path><\/svg><svg class='ht-check-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M13,24l-9-9,1.414-1.414L13,21.171,26.586,7.586,28,9Z'><\/path><\/svg><\/button><span class='ht-code-snippet__feedback'>Copied to clipboard<\/span><\/p>\n<pre class='ht-code-snippet__code' id='code-block-7'><code class=\"\" data-line=\"\">grep &#039;=&gt; [^ ]*@gmail.com &lt;&#039; \/var\/log\/exim_mainlog | grep -o &#039;@gmail.com &lt;[^&gt;]*&gt;&#039; | sort | uniq -c | sort -rn | head<\/code><\/pre>\n<\/div>\n<p>The fix is to filter before forwarding. In cPanel <strong>Email &gt; Spam Filters<\/strong>, turn on spam filtering and auto-delete above a score of 5 to 7, so the worst spam is dropped before the forwarder sends it on. Better still, replace the forwarder with a mailbox the user checks from Gmail. <a href=\"https:\/\/hostandtech.com\/kb\/email\/how-to-set-up-email-forwarding-cpanel\/\">Setting up email forwarding in cPanel<\/a> covers the other forwarding pitfalls.<\/p>\n<h3>Fix 5: Clear the spam from the queue<\/h3>\n<p>Only once the source is fixed, remove the spam that&#8217;s still waiting. These delete by sender address and then remove frozen bounces:<\/p>\n<div class='ht-code-snippet'><button class='ht-code-snippet__copy' onclick='htCopyCode(\"code-block-8\")' type='button' aria-label='Copy code'><svg class='ht-copy-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z'><\/path><path d='M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z'><\/path><\/svg><svg class='ht-check-icon' viewBox='0 0 32 32' width='16' height='16' fill='currentColor'><path d='M13,24l-9-9,1.414-1.414L13,21.171,26.586,7.586,28,9Z'><\/path><\/svg><\/button><span class='ht-code-snippet__feedback'>Copied to clipboard<\/span><\/p>\n<pre class='ht-code-snippet__code' id='code-block-8'><code class=\"\" data-line=\"\">exiqgrep -i -f info@example.com | xargs -r exim -Mrm\nexiqgrep -z -i | xargs -r exim -Mrm<\/code><\/pre>\n<\/div>\n<p><strong>Warning:<\/strong> <code class=\"\" data-line=\"\">exim -Mrm<\/code> deletes messages permanently. Run the <code class=\"\" data-line=\"\">exiqgrep<\/code> part on its own first and check the count, so legitimate mail from the same sender isn&#8217;t swept up.<\/p>\n<h3>Fix 6: Request delisting<\/h3>\n<p>Look up your server IP at <a href=\"https:\/\/check.spamhaus.org\/\">check.spamhaus.org<\/a> and with the blocklists named in recent bounce messages. Request removal only after the queue is clean. Most lists delist quickly once the spam stops, and a second listing in a short time is slower to clear. Bounces for legitimate mail during this period are covered in <a href=\"https:\/\/hostandtech.com\/kb\/whm\/whm-handle-email-delivery-failures-bounces\/\">handling email delivery failures in WHM<\/a>.<\/p>\n<h2>How to prevent it<\/h2>\n<ul>\n<li><strong>Cap hourly sending.<\/strong> In <strong>WHM &gt; Server Configuration &gt; Tweak Settings<\/strong>, set &#8220;Max hourly emails per domain&#8221; to a number your customers never reach in normal use. A stolen password then sends hundreds of messages instead of tens of thousands before Exim refuses them.<\/li>\n<li><strong>Stop password guessing.<\/strong> Keep cPHulk enabled in WHM, and add <a href=\"https:\/\/hostandtech.com\/kb\/security\/install-configure-fail2ban-ubuntu\/\">Fail2Ban<\/a> on servers you manage without it.<\/li>\n<li><strong>Keep sites patched.<\/strong> Old plugins with upload holes are where most script mailers come from.<\/li>\n<li><strong>Publish SPF, DKIM and DMARC<\/strong> so forged mail using your domains is rejected elsewhere: see <a href=\"https:\/\/hostandtech.com\/kb\/whm\/how-to-configure-email-authentication-whm-spf-dkim-dmarc\/\">email authentication in WHM<\/a>.<\/li>\n<li><strong>Get alerted on queue size.<\/strong> <code class=\"\" data-line=\"\">exim -bpc<\/code> in a cron job that emails you when it passes a few hundred catches the next outbreak within hours.<\/li>\n<\/ul>\n<p>For the customer-side view of the same problem, including what to tell a user whose mailbox was abused, see <a href=\"https:\/\/hostandtech.com\/kb\/email\/preventing-email-spam-and-blacklisting\/\">preventing email spam and blacklisting<\/a>. If you&#8217;d rather not run a mail server at all, on our <a href=\"https:\/\/hostandtech.com\/cloudlinux-cpanel-shared-hosting\">cPanel shared hosting<\/a> the mail server is ours to look after.<\/p>\n<div class=\"ht-faq-section\">\n<h2>Frequently Asked Questions<\/h2>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">How do I check the mail queue on a cPanel server?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Run exim -bpc as root to count queued messages, and exim -bp piped to exiqsumm for a summary by domain. In the WHM interface, the same view is under Email, then Mail Queue Manager.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">How do I stop a cPanel account from sending spam?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Run whmapi1 suspend_outgoing_email user=cpuser to stop all outgoing mail from that account while incoming mail keeps working. For a single mailbox, set Sending Outgoing Email to Suspend or Hold in cPanel Email Accounts.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">How can I tell if an email account has been hacked?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Count outgoing messages per authenticated user in \/var\/log\/exim_mainlog by searching for A=dovecot_login. A mailbox sending far more than the others, from IP addresses in unfamiliar countries, has a stolen password.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">How do I find which PHP script is sending email?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Search the Exim main log for cwd=\/home to see which directories send the most mail. Then read a queued message\u2019s headers with exim -Mvh; the X-PHP-Originating-Script header names the file when mail.add_x_header is on.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Will clearing the mail queue get my IP removed from blacklists?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>No. Blocklists delist your IP after the spam stops and you request removal. Clear the queue only after fixing the source, then submit the delisting request.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Find out why a cPanel server is sending spam: read the Exim queue and log to spot a hacked mailbox, a PHP mailer or a forwarder, contain the account, fix the cause, clear the queue and request delisting.<\/p>\n","protected":false},"author":1,"featured_media":352,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[73],"tags":[263,190,281,565,89],"class_list":["post-358","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","tag-cpanel-security","tag-email-deliverability","tag-email-spam","tag-exim","tag-whm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>cPanel Server Sending Spam? Find the Source in Exim<\/title>\n<meta name=\"description\" content=\"cPanel server sending spam? Use the Exim queue and log to find the hacked mailbox, PHP script or forwarder, stop it, clear the queue and get delisted.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"cPanel Server Sending Spam? Find the Source in Exim\" \/>\n<meta property=\"og:description\" content=\"cPanel server sending spam? Use the Exim queue and log to find the hacked mailbox, PHP script or forwarder, stop it, clear the queue and get delisted.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/\" \/>\n<meta property=\"og:site_name\" content=\"Host And Tech knowledge base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/stshostandtech\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-17T20:05:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/11\/cpanel-server-sending-spam-find-source.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:site\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/security\\\/cpanel-server-sending-spam-find-source\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/security\\\/cpanel-server-sending-spam-find-source\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/person\\\/b6fa79c48ddaba71af32e395c5b017ee\"},\"headline\":\"Server Sending Spam? How to Find the Source in WHM and Exim\",\"datePublished\":\"2026-11-17T20:05:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/security\\\/cpanel-server-sending-spam-find-source\\\/\"},\"wordCount\":1293,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/security\\\/cpanel-server-sending-spam-find-source\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/cpanel-server-sending-spam-find-source.webp\",\"keywords\":[\"cPanel security\",\"email deliverability\",\"email spam\",\"Exim\",\"WHM\"],\"articleSection\":[\"Server Security\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/hostandtech.com\\\/kb\\\/security\\\/cpanel-server-sending-spam-find-source\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/security\\\/cpanel-server-sending-spam-find-source\\\/\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/security\\\/cpanel-server-sending-spam-find-source\\\/\",\"name\":\"cPanel Server Sending Spam? Find the Source in Exim\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/security\\\/cpanel-server-sending-spam-find-source\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/security\\\/cpanel-server-sending-spam-find-source\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/cpanel-server-sending-spam-find-source.webp\",\"datePublished\":\"2026-11-17T20:05:53+00:00\",\"description\":\"cPanel server sending spam? Use the Exim queue and log to find the hacked mailbox, PHP script or forwarder, stop it, clear the queue and get delisted.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/security\\\/cpanel-server-sending-spam-find-source\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hostandtech.com\\\/kb\\\/security\\\/cpanel-server-sending-spam-find-source\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/security\\\/cpanel-server-sending-spam-find-source\\\/#primaryimage\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/cpanel-server-sending-spam-find-source.webp\",\"contentUrl\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/cpanel-server-sending-spam-find-source.webp\",\"width\":1200,\"height\":630,\"caption\":\"cPanel server sending spam: Exim queue count with the three usual sources, hacked mailbox, PHP script and forwarder\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/security\\\/cpanel-server-sending-spam-find-source\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Server Sending Spam? How to Find the Source in WHM and Exim\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\",\"name\":\"Host And Tech knowledge base\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\",\"name\":\"Host And Tech knowledge base\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/logo-dark.png\",\"contentUrl\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/logo-dark.png\",\"width\":1134,\"height\":395,\"caption\":\"Host And Tech knowledge base\"},\"image\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/stshostandtech\",\"https:\\\/\\\/x.com\\\/stshostandtech\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/person\\\/b6fa79c48ddaba71af32e395c5b017ee\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/hostandtech.com\\\/kb\"],\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/author\\\/admin_fjj7qydm\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"cPanel Server Sending Spam? Find the Source in Exim","description":"cPanel server sending spam? Use the Exim queue and log to find the hacked mailbox, PHP script or forwarder, stop it, clear the queue and get delisted.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/","og_locale":"en_US","og_type":"article","og_title":"cPanel Server Sending Spam? Find the Source in Exim","og_description":"cPanel server sending spam? Use the Exim queue and log to find the hacked mailbox, PHP script or forwarder, stop it, clear the queue and get delisted.","og_url":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/","og_site_name":"Host And Tech knowledge base","article_publisher":"https:\/\/www.facebook.com\/stshostandtech","article_published_time":"2026-11-17T20:05:53+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/11\/cpanel-server-sending-spam-find-source.webp","type":"image\/webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@stshostandtech","twitter_site":"@stshostandtech","twitter_misc":{"Written by":"admin","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/#article","isPartOf":{"@id":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/"},"author":{"name":"admin","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/person\/b6fa79c48ddaba71af32e395c5b017ee"},"headline":"Server Sending Spam? How to Find the Source in WHM and Exim","datePublished":"2026-11-17T20:05:53+00:00","mainEntityOfPage":{"@id":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/"},"wordCount":1293,"commentCount":0,"publisher":{"@id":"https:\/\/hostandtech.com\/kb\/#organization"},"image":{"@id":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/#primaryimage"},"thumbnailUrl":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/11\/cpanel-server-sending-spam-find-source.webp","keywords":["cPanel security","email deliverability","email spam","Exim","WHM"],"articleSection":["Server Security"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/","url":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/","name":"cPanel Server Sending Spam? Find the Source in Exim","isPartOf":{"@id":"https:\/\/hostandtech.com\/kb\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/#primaryimage"},"image":{"@id":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/#primaryimage"},"thumbnailUrl":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/11\/cpanel-server-sending-spam-find-source.webp","datePublished":"2026-11-17T20:05:53+00:00","description":"cPanel server sending spam? Use the Exim queue and log to find the hacked mailbox, PHP script or forwarder, stop it, clear the queue and get delisted.","breadcrumb":{"@id":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/#primaryimage","url":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/11\/cpanel-server-sending-spam-find-source.webp","contentUrl":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/11\/cpanel-server-sending-spam-find-source.webp","width":1200,"height":630,"caption":"cPanel server sending spam: Exim queue count with the three usual sources, hacked mailbox, PHP script and forwarder"},{"@type":"BreadcrumbList","@id":"https:\/\/hostandtech.com\/kb\/security\/cpanel-server-sending-spam-find-source\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hostandtech.com\/kb\/"},{"@type":"ListItem","position":2,"name":"Server Sending Spam? How to Find the Source in WHM and Exim"}]},{"@type":"WebSite","@id":"https:\/\/hostandtech.com\/kb\/#website","url":"https:\/\/hostandtech.com\/kb\/","name":"Host And Tech knowledge base","description":"","publisher":{"@id":"https:\/\/hostandtech.com\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hostandtech.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hostandtech.com\/kb\/#organization","name":"Host And Tech knowledge base","url":"https:\/\/hostandtech.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/05\/logo-dark.png","contentUrl":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/05\/logo-dark.png","width":1134,"height":395,"caption":"Host And Tech knowledge base"},"image":{"@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/stshostandtech","https:\/\/x.com\/stshostandtech"]},{"@type":"Person","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/person\/b6fa79c48ddaba71af32e395c5b017ee","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/hostandtech.com\/kb"],"url":"https:\/\/hostandtech.com\/kb\/author\/admin_fjj7qydm\/"}]}},"_links":{"self":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts\/358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/comments?post=358"}],"version-history":[{"count":1,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts\/358\/revisions"}],"predecessor-version":[{"id":363,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts\/358\/revisions\/363"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/media\/352"}],"wp:attachment":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/media?parent=358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/categories?post=358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/tags?post=358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}