Skip to main content

Mail Delivery Reports UI Mixes Sender and From Address

Comments

10 comments

  • cPRex Jurassic Moderator

    Hey hey!  I sent a message from webmail on my personal system and I see this in the /var/log/exim_mainlog file (with irrelevant lines edited out)

    12:55:07 SMTP connection from (host.hostname.com) [::1]:53168 D=0s closed by QUIT
    12:55:07 1vsPHv-00000006yiU-3J7r Sender identification U=username D=domain.com S=email@domain.com
    12:55:07 1vsPHv-00000006yiU-3J7r SMTP connection outbound 1771350907 1vsPHv-00000006yiU-3J7r sender-address@domain.com.com destination-address@domain.com
    2026-02-17 12:55:08 1vsPHv-00000006yiU-3J7r => recipient-address.com (recipient-address.com) <destination-address.com> R=lookuphost T=remote_smtp H=mx-att.mail.am0.yahoodns.net [98.138.3.192] X=TLS1.3:TLS_AES_128_GCM_SHA256:128 CV=yes C="250 ok dirdel"

    and this is what I'd expect.  All good so far.

    In the email itself I see the following headers:

    Return-Path: <sender@domain.com>
    From: <sender@domain.com>

    Looks good there.

    Let's check the Mail Delivery Reports page now - same address as you said.

    NOW...I sent from the same address through a script.  I actually have a cron script that sends a message for me so I had one to reference.  I get the email address in the "From" column and the cPanel username as the Sender.

    Do you have the "Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak)" enabled in Tweak Settings?  That would prevent unauthenticated mail from leaving the server and may help to clear these up or at least make the page more clear when they do happen.  If not, it seems to just be working that way because it's reporting the user sending the message which is how the script makes the connection to Exim.

     

    1
  • vatra

    Yes, Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak) is ON for me. When sending from Webmail or through a client via cP SMTP, the Sender and From Address in the Mail Delivery Reports (MDR) match in the received email's source and MDR. But when a script sends an email, they are swapped in the MDR.

    BTW, I know that aligning MAIL_FROM (Sender in the MDR) and From header (From Address in the MDR) is not a cP issue. I solved it with the following code in WP.

    add_action('phpmailer_init', function($phpmailer) {
    $phpmailer->Sender=$phpmailer->From;
    });

    You should use more RFC-friendly names in the MDR column headers:
    Sender = Envelope Sender or Envelope From or MAIL_FROM or Return-Path
    From Address = this can stay the same

    Sometimes it is very confusing in MDR to find out who sent what and who received it for forwarded mail, for example.

    0
  • cPRex Jurassic Moderator

    But then I feel like we'll run into people asking "what is an Envelope Sender" when they see those names.

    Let me run this by some other people and see if I can get some more thoughts.

    0
  • cPRex Jurassic Moderator

    Is there any chance you could include a screenshot of what you're seeing just so I can make sure we're all on the same page?

    0
  • vatra

    But then I feel like we'll run into people asking "what is an Envelope Sender" when they see those names.

    That is true as well.

    Is there any chance you could include a screenshot of what you're seeing just so I can make sure we're all on the same page?

    Sure, no problem. Where can I send it?

    0
  • vatra

    I just feel like the Sender in the MDR should be the address that is visible in the From field of an email. This is the most intuitive title. This is currently the From Address in the MDR.

    And the Envelope From, currently the Sender in the MDR, can be Mailbox or at least the cPanel User.

    0
  • cPRex Jurassic Moderator

    Let me poke some people and I'll get back to you!

    1
  • vatra

    Great!

    BTW, I just rethought my logic on those renaming suggestions, and I see why this would be a hard decision to make, mainly because the Sender (basically MAIL_FROM) can display the same From Address or a cP user account's default address.

    0
  • cPRex Jurassic Moderator

    No good news on my end - at this point it doesn't look like they want to make adjustments to that page.

    1
  • vatra

    That's OK. We're ruffling feathers at least. :)

    0

Please sign in to leave a comment.