Undo Yahoo's Rewrite of From Header Using KMail

Yahoo’s spoof of the “From” header is an annoyance:

  • clutters the message list displayed by KMail

  • clicking on “From” in the message window does no longer open an editor window with “To” header set to the original sender, but the new mail goes to the spoofed address.

In mail sent from Yahoo servers the original “From” is now moved to “X-Original-From" x-header. So I want to replace the spoofed “From” by the value of “X-Original-From". How can I do this using KMail? Any other suggestion how handle this problem?

On 2014-10-06 10:26, karlmistelberger wrote:
>
> Yahoo’s spoof of the “From” header is an annoyance:

I don’t have any yahoo mail, so I haven’t noticed. What have they done?

> the value of “X-Original-From". How can I do this using KMail? Any
> other suggestion how handle this problem?

Other. With formail.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Hi
I don’t see that here with mail sent from a yahoo account, maybe it’s you ISP spoofing the headers (maybe running some spam filtering)?

They are making people unhappy: 'Yahoo! Breaks! Every! Mailing! List! In! The! World!' says email guru • The Register

They replace a well formed From: Rainer Niemand <rainer.niemand@t-online.de>

by From: “‘Rainer Niemand’ rainer.niemand@t-online.de [Group-Name]” <group-name-noreply@yahoogroups.de>

> the value of “X-Original-From". How can I do this using KMail? Any
> other suggestion how handle this problem?

Other. With formail.

formail works fine for me as my inbox is mbox. I defined the following filter in KMail:

From contains yahoogroups.de
Action pipe through program: formail -i From     # rename From to Old-From
Action pipe through program: formail -R X-Original-From From     # rename X-Original-From to From

This restores original From and saves Yahoo’s spoof to Old-From

Many thanks and kind regards

Karl

That seems to be Yahoo-Groups mail rather than Yahoo mail.

Mailing lists have been doing something similar to this since mailing lists were invented. The standards say that they should add a “Reply-To:” header, instead of munging the “From:” header. But a variety of mailing list management software has been munging “From:” headers from before Yahoo existed.

Somewhat along the lines of nrickert’s post and based only on what is in your original post,

Your problem is the manner in which your mail is being routed through Yahoo mail.

If mail is simply routed through an SMTP Smarthost, the original headers are preserved and nothing is altered.
But, if the mail is forwarded through a User’s mail account (I’m guessing you’re authenticating to Yahoo for permission to forward), then the mail is not simply routed but “re-sent.” In this case the new sender is the Yahoo mail account which is why your mail header has changed.

Yahoo’s SMTP Smarthost mail not send mail any other way, but if it supports what I described (simple re-routing mail instead of resending) I hope with this information you can find the relevant documentation to do it that way.

HTH,
TSU

On 2014-10-06 19:36, karlmistelberger wrote:

>> Other. With formail.
>
> formail works fine for me as my inbox is mbox. I defined the following
> filter in KMail:

Wow. I did not know you could use formail in kmail.

> This restores original From and saves Yahoo’s spoof to Old-From
>
> Many thanks and kind regards

Interesting! Thanks for sharing.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Actually I don`t use Yahoo mail, but I subscribed to a Yahoo Group. I send mail from my account at “M-net”, a service provider completely different from Yahoo to “Group-Name <group-name@yahoogroups.de>” and receive mail from the same address. I only undo the changes Yahoo makes to the “From” header of mail received from them. I am not interested in the reasons why they are doing this. They are pretending, that they need to make this. I am not convinced and will refrain from using my mail account at Yahoo.

By mistake some filter rules were deleted from kmail. Which files need I to restore from backup?