Getting from address as Kernel overflow user
We send some emails to users with a daily cron. This is a PHP script using PHPmailer.
The users receive these mails as coming from Kernel Overflow User. We want to remove this. The message should appear to come from the username we set in the From directive.
How to achieve this?
-
There is an extra sender header added which we want to avoid.
0 -
Hey there! Just to confirm, the "From" address in the header and in the recipient's mail client shows as "Kernel Overflow" ? Is that correct?
If so, that sounds like the PHP script is encountering some type of error when it runs, leading to that showing up as the sender. Normally we'd expect this to be "nobody" or a cPanel username.
Could you try running the cron without the mail function to see if you get any errors there?
0 -
Checked. There is no error in the script.
We have the From Address set correctly. However, an additional header gets added - "sender" with value Kernel Overflow user <nobody@servername.com"
We are using PHPmailer.
0 -
Return-Path: <nobody@server.com>
Delivered-To: rbothra@example.com
Received: from server.com
by server.com with LMTP
id MKL/MrKdamUUSBUAwVFGGA
(envelope-from <nobody@server.com>)
for <rbothra@example.com>; Sat, 02 Dec 2023 08:30:02 +0530
Return-path: <nobody@server.com>
Envelope-to: rbothra@example.com
Delivery-date: Sat, 02 Dec 2023 08:30:02 +0530
Received: from nobody by server.com with local (Exim 4.96.2)
(envelope-from <nobody@server.com>)
id 1r9GEc-005r1D-2Z;
Sat, 02 Dec 2023 08:30:02 +0530
To: rbothra@example.com
Subject: B'day and anniversary lists.
X-PHP-Script: www.example.com/portal/send-bday-intimation1.php for ip
X-PHP-Originating-Script: 1006:PHPMailer.php
Date: Sat, 2 Dec 2023 08:30:02 +0530
From: Web Team <noreply@example.com>
Message-ID: <QPuNtEdWSR95ywDhWNMce1xmyzEGcksEkAuAStSk@www.example.com>
X-Mailer: PHPMailer 6.0.5 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: text/html; charset=iso-8859-1
Sender: Kernel Overflow User <nobody@server.com>This Sender header needs to be turned off.
0 -
Thanks for the additional details. While there isn't a way to turn that off, it looks like your PHPMailer is not authenticating and sending as the "nobody" user. If you configure authentication for the tool, that will fix this issue.
This also indicates that you don't have the "Prevent 'nobody' from sending mail" in WHM >> Tweak Settings enabled, which can allow spam to leave your server.
0 -
The 'nobody' user *is* the kernel overflow user. IIRC, if you don't setup the authentication details for SMTP within PHPMailer, it will try to use 'nobody' for sending the mail, so perhaps that is what is occurring? Anyways, as long as you are sending the mail as 'nobody', that is an accurate description of things in the Sender header.
It would likely be easier to configure your script to send via SMTP as an account you've created for the purpose of mailings like this rather than to fiddle with Exim's system filters to disable Sender headers, so that's probably the better thing to do. There too you have the benefit of not potentially disabling Sender headers globally on the server (probably a bad idea unless you *specifically* want to send spam) and instead only have the "problem" of needing to setup a filter for whatever user you created to drop all incoming mail (as a proper "noreply" mail address is usually going to do).
1
Please sign in to leave a comment.
Comments
6 comments