Gnus development mailing list
 help / color / mirror / Atom feed
* Has anyone created code for reply to author on yahoogroups?
@ 2014-09-07 20:20 Steinar Bang
  2014-09-08  0:45 ` lee
  0 siblings, 1 reply; 7+ messages in thread
From: Steinar Bang @ 2014-09-07 20:20 UTC (permalink / raw)
  To: ding

Some time ago yahoogroups started changing the From emails, so that
emails from me to a yahoogroups list, looks like: 
 "Steinar Bang sb@dod.no [somelist]" <somelist@yahoogroups.com>
(where "somelist" is the name of a yahoogroups mailing list).

This meant that my old gnus setup for the mail group in gnus, which was
to do "f" to reply to the list and "r" to reply only to the author, no
longer worked.

Has anyone here created code to make "r" extract the sender email
address from the From field and reply directly to that?

If not, any ideas for the most elegant and simple solution?

Thanks!




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Has anyone created code for reply to author on yahoogroups?
  2014-09-07 20:20 Has anyone created code for reply to author on yahoogroups? Steinar Bang
@ 2014-09-08  0:45 ` lee
  2014-09-08  7:18   ` Steinar Bang
  0 siblings, 1 reply; 7+ messages in thread
From: lee @ 2014-09-08  0:45 UTC (permalink / raw)
  To: ding

Steinar Bang <sb@dod.no> writes:

> Some time ago yahoogroups started changing the From emails, so that
> emails from me to a yahoogroups list, looks like: 
>  "Steinar Bang sb@dod.no [somelist]" <somelist@yahoogroups.com>
> (where "somelist" is the name of a yahoogroups mailing list).
>
> This meant that my old gnus setup for the mail group in gnus, which was
> to do "f" to reply to the list and "r" to reply only to the author, no
> longer worked.
>
> Has anyone here created code to make "r" extract the sender email
> address from the From field and reply directly to that?
>
> If not, any ideas for the most elegant and simple solution?

Look at the group setup (Gc in the group buffer) and set up the mailing
list address?  I do that for lists, and it works fine, plus I have


(setq message-subscribed-address-functions
      '(gnus-find-subscribed-addresses))


in .gnus, though I'm not too sure about this having the effect I would
assume it has.


-- 
Knowledge is volatile and fluid.  Software is power.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Has anyone created code for reply to author on yahoogroups?
  2014-09-08  0:45 ` lee
@ 2014-09-08  7:18   ` Steinar Bang
  2014-09-08 20:25     ` lee
  0 siblings, 1 reply; 7+ messages in thread
From: Steinar Bang @ 2014-09-08  7:18 UTC (permalink / raw)
  To: ding

>>>>> lee <lee@yun.yagibdah.de>:

> Look at the group setup (Gc in the group buffer) and set up the mailing
> list address? 

No, that won't help.  Setting to-address and (broken-reply-to . t) in
the group parameters work with the old style at yahoogroups and other
mailing list agents, where a reply-to header redirects repliers to the
list. 

What Yahoogroups now does, is to mangle the sender, so that the actual
email address there is the list address.  The address of the sender is
made part of the "real name"-part of the From-field:
 "Steinar Bang sb@dod.no [somelist]" <somelist@yahoogroups.com>

> I do that for lists, and it works fine, plus I have

> (setq message-subscribed-address-functions
>       '(gnus-find-subscribed-addresses))

> in .gnus, though I'm not too sure about this having the effect I would
> assume it has.

I don't know... what effect do you think it has...? :-)

(If you always reply, or post, inside the list's mail group, or if you
do 'C-u a' on top of the list's mail group, then you don't need it, I
think)




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Has anyone created code for reply to author on yahoogroups?
  2014-09-08  7:18   ` Steinar Bang
@ 2014-09-08 20:25     ` lee
  2014-09-09  5:16       ` Steinar Bang
  2014-09-09  5:22       ` Steinar Bang
  0 siblings, 2 replies; 7+ messages in thread
From: lee @ 2014-09-08 20:25 UTC (permalink / raw)
  To: ding

Steinar Bang <sb@dod.no> writes:

>>>>>> lee <lee@yun.yagibdah.de>:
>
>> Look at the group setup (Gc in the group buffer) and set up the mailing
>> list address? 
>
> No, that won't help.  Setting to-address and (broken-reply-to . t) in
> the group parameters work with the old style at yahoogroups and other
> mailing list agents, where a reply-to header redirects repliers to the
> list. 
>
> What Yahoogroups now does, is to mangle the sender, so that the actual
> email address there is the list address.  The address of the sender is
> made part of the "real name"-part of the From-field:
>  "Steinar Bang sb@dod.no [somelist]" <somelist@yahoogroups.com>

Yahoo needs to fix their broken setup.

Other than that, you could pipe the mails through a perl script that
fixes the headers.  The Email::Simple module does a pretty good job at
reading them.  If you use an IMAP account, Net::IMAP::Client works well,
too --- only you may have to put in delays when fetching messages
consecutively because otherwise you may obtain a message that has no
body.  It goes like this:


sub fix_data {
  my ($msgbody) = @_;
  #
  # $msgbody is a string containing the complete message with all
  # headers
  #
  my @h_subject = decode('MIME-Header', $email->header('Subject'));
  my $fixed = [do something here and return fixed message];
  return $fixed;
}


  my $imap = Net::IMAP::Client->new(
				    server => SERVER,
				    user => USER,
				    pass => PASS,
				    ssl => 1,
				    ssl_verify_peer => 0,
				    port => 993)
    or die "connection to imap server failed";

  $imap->login or die "login failed\n";
  $imap->select('INBOX');

  foreach my $id ($imap->search('ALL')) {
    foreach my $msg (@$id) {
      my $data = $imap->get_rfc822_body($msg);
      my $fixed = fix_headers($$data);
      [somehow put fixed message as a new one on IMAP server];
      #
      # delete the original message
      #
      $imap->add_flags($msg, '\\Deleted');
      sleep(20);
    }
  }
  $imap->expunge;
  $imap->logout;


If you have the messages in nnml storage or the like, it's much easier
of course.

>> I do that for lists, and it works fine, plus I have
>
>> (setq message-subscribed-address-functions
>>       '(gnus-find-subscribed-addresses))
>
>> in .gnus, though I'm not too sure about this having the effect I would
>> assume it has.
>
> I don't know... what effect do you think it has...? :-)

IIRC it should make it so that I do not need to configure the groups I'm
using for mail from mailing lists.

> (If you always reply, or post, inside the list's mail group, or if you
> do 'C-u a' on top of the list's mail group, then you don't need it, I
> think)

I do either F, a or, rarely, R.


-- 
Knowledge is volatile and fluid.  Software is power.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Has anyone created code for reply to author on yahoogroups?
  2014-09-08 20:25     ` lee
@ 2014-09-09  5:16       ` Steinar Bang
  2014-09-09  5:22       ` Steinar Bang
  1 sibling, 0 replies; 7+ messages in thread
From: Steinar Bang @ 2014-09-09  5:16 UTC (permalink / raw)
  To: ding

>>>>> lee <lee@yun.yagibdah.de>:

>> I don't know... what effect do you think it has...? :-)

> IIRC it should make it so that I do not need to configure the groups I'm
> using for mail from mailing lists.

You still would have to set to-address, or something in the group
parameters, unless I'm misreading things...?




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Has anyone created code for reply to author on yahoogroups?
  2014-09-08 20:25     ` lee
  2014-09-09  5:16       ` Steinar Bang
@ 2014-09-09  5:22       ` Steinar Bang
  2014-09-21 12:44         ` Steinar Bang
  1 sibling, 1 reply; 7+ messages in thread
From: Steinar Bang @ 2014-09-09  5:22 UTC (permalink / raw)
  To: ding

>>>>> lee <lee@yun.yagibdah.de>:

> Yahoo needs to fix their broken setup.

Quite.  I'm wondering if hiring a dedicated VPS and setting it up with
mailman wouldn't be simpler than dealing with yahoogroups' quirks...

The recent From-stuff is actually simple, compared to the problems I
have had with just getting people subscribed to the lists.

> Other than that, you could pipe the mails through a perl script that
> fixes the headers. 

That might be an idea... thanks for the heads up.  My yahoogroups'
filtering already has subject tag stripping in them.

> The Email::Simple module does a pretty good job at reading them.  If
> you use an IMAP account, Net::IMAP::Client works well, too --- only
> you may have to put in delays when fetching messages consecutively
> because otherwise you may obtain a message that has no body.

I use dovecot with procmail(*) for mail filtering, so I would just put
the fix in there.


(*) I know it's old, ancient actually, but it works and setting up mail
    filtering is boring...




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Has anyone created code for reply to author on yahoogroups?
  2014-09-09  5:22       ` Steinar Bang
@ 2014-09-21 12:44         ` Steinar Bang
  0 siblings, 0 replies; 7+ messages in thread
From: Steinar Bang @ 2014-09-21 12:44 UTC (permalink / raw)
  To: ding

>>>>> Steinar Bang <sb@dod.no>:
>>>>> lee <lee@yun.yagibdah.de>:


>> Other than that, you could pipe the mails through a perl script that
>> fixes the headers. 

> That might be an idea... thanks for the heads up.  My yahoogroups'
> filtering already has subject tag stripping in them.
[snip!]
> I use dovecot with procmail(*) for mail filtering, so I would just put
> the fix in there.

Ok, now I've fixed the Yahoogroups.

I changed this:
 :0
 * ^TO_my-mailing-list@(intl.)?(e[Gg]roups|yahoogroups).com
 {
         :0 Afhw
         | /bin/sed -e "s/\[my-mailing-list\] //g"
 }

into this:
 :0
 * ^TO_my-mailing-list@(intl.)?(e[Gg]roups|yahoogroups).com
 {
         :0 Afhw
         | /usr/bin/perl -ne "s/(^From: \".+) \[my-mailing-list\]\" .*/\1\"/ig; s/(^From: \")'([^']+)'/\1\2/g;s/ ([A-za-z0-9.]+@[A-za-z0-9.]+)\"/\" <\1>/g;s/(^From: .*)\"([A-za-z0-9.]+@[A-za-z0-9.]+)\"/\1<\2>/g; if (/^Subject: /) {s/\[my-mailing-list\] //ig;} print"
 }

> (*) I know it's old, ancient actually, but it works and setting up mail
>     filtering is boring...

Speaking of ancient, my .procmailrc file also have this recipe, dating
back to the late ninties, but last touched in May of 2014, because of
the Android email client:
 #
 # Fix Subject RE/SV/AW line for MSExchange/MSMail/MSOutlook
 # Also fix Subject field for Norwegian android mailer ("Vedr").
 # No X-Mailer field to rely on, unfortunately!
 # Remove MSE quotes of type "'Real Name'"
 #
 :0 fhw
 | /usr/bin/perl -ne "s/\?[Ww]indows-1252\?/?iso-8859-1?/g; s/^(Subject:)\s+(S[Vv]:\s*|AW:\s*|Ad:\s*|Vedr:\s*|R[eE](\(\d+\))?:\s*)+/\1 Re: /g;s/^(Subject:)\s+(=\?((iso|ISO)-8859-1|us-ascii)\?Q\?)((S[Vv]|AW|Ad|R[eE](\(\d+\))?)(:|=3[Aa])_*)+/\1 \2Re:_/g; s/\042\'([^\']*)\'\042/\042\1\042/g ; print"

(The answer to the question "How many ways are there to break an email
header?", seems to be "inifinitly many"...)




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-09-21 12:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-07 20:20 Has anyone created code for reply to author on yahoogroups? Steinar Bang
2014-09-08  0:45 ` lee
2014-09-08  7:18   ` Steinar Bang
2014-09-08 20:25     ` lee
2014-09-09  5:16       ` Steinar Bang
2014-09-09  5:22       ` Steinar Bang
2014-09-21 12:44         ` Steinar Bang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).