HAAA!!! Cracked it!!! (It's amazing what a night's sleep can do:)
Could someone please have a look at the attached patch and commit
it if it's OK ?
What I've done (in uip/replsbr.c) ...
1) in replout(), there's a call to ismymbox(NULL), which was only
being called if '-nocc me'. I need this to be always called, or
at the least when '-group', since it's purpose seems to be to
initialise the alternate-mailboxes list.
2) in insert(), this bit:
if (ismymbox (np))
ccme = 0;
was surrounded by #ifdef ISI. ISI isn't mentioned anywhere else
in the code. Anyone know what it is ?
I'd really appreciate if someone could idiot-proof this and check
it in - will make my mh-life much more pleasant!
TIA,
~Iain
Iain MacDonnell - Sun UK - SunPS IT Operations - Project Specialist writes:
: Iain MacDonnell - Sun UK - SunPS IT Operations - Project Specialist writes:
: : Uggh ... brain fried ... need caffeine ... looking at insert() in replsbr.c
+ ,
: : it doesn't look like is does any checking with alternates:
: :
: : for (mp = &mq; mp->m_next; mp = mp->m_next) {
: : if (!strcasecmp (np->m_host, mp->m_next->m_host)
: : && !strcasecmp (np->m_mbox, mp->m_next->m_mbox))
: : return 0;
: : }
:
: I thought the fix might be as simple as adding:
:
: if (ismymbox(mp->m_next) && ismymbox(np)) return 0;
:
: but it seems that ismymbox() doesn't work here - it seems to be comparing
: each new entry to what's been inserted in the to/cc list already - as if
: the two lists are interfering with eachother.
:
: Can anyone who knows the code better help me out ?
:
: ~Iain
:
:
:
:
: PS, example:
:
: for (immp = &immq; immp->m_next; immp = immp->m_next) {
: if (!strcasecmp (np->m_host, immp->m_next->m_host)
: && !strcasecmp (np->m_mbox, immp->m_next->m_mbox))
: return 0;
:
: printf("%s %d\n%s %d\n", np->m_mbox, ismymbox (np), immp->m_next->m_m
+ box, ismymbox(immp->m_next));
:
: }
: printf("---\n");
:
:
: smithers:~$ grep Altern .mh_profile
: Alternate-Mailboxes: iain.macdonnell, dseven@*
: smithers:~$ repl -group -editor /bin/cat
: ---
: jpeek 0
: Iain.MacDonnell 0
: ---
: jpeek 0
: Iain.MacDonnell 0
: nmh-workers 1
: Iain.MacDonnell 0
: nmh-workers 1
: jpeek 0
: ---
: im50766 1
: Iain.MacDonnell 0
: im50766 1
: jpeek 0
: im50766 1
: nmh-workers 1
: ---
: From: Iain MacDonnell - Sun UK - SunPS IT Operations - Project Specialist <Ia
+ [EMAIL PROTECTED]>
: To: Iain MacDonnell - Sun UK - SunPS IT Operations - Project Specialist
: <[EMAIL PROTECTED]>
: cc: Jerry Peek <[EMAIL PROTECTED]>, [EMAIL PROTECTED], im50766
: Subject: Re: repl -group and alternate-mailboxes (fwd)
: In-Reply-To: Message from Iain MacDonnell - Sun UK - SunPS IT Operations - Pr
+ oject Specialist <[EMAIL PROTECTED]>
: of "Tue, 02 Nov 1999 17:11:07 GMT." <[EMAIL PROTECTED]
+ .COM>
: --------
:
:
:
:
: What now?
:
*** uip/replsbr.c.old Wed Nov 3 10:32:23 1999
--- uip/replsbr.c Wed Nov 3 10:39:13 1999
***************
*** 133,141 ****
if (cptr)
cptr->c_text = getcpy(cp);
}
- if (!ccme)
- ismymbox (NULL);
/*
* pick any interesting stuff out of msg "inb"
*/
--- 133,141 ----
if (cptr)
cptr->c_text = getcpy(cp);
}
+ ismymbox (NULL);
+
/*
* pick any interesting stuff out of msg "inb"
*/
***************
*** 395,404 ****
}
mp->m_next = np;
- #ifdef ISI
if (ismymbox (np))
ccme = 0;
- #endif
return 1;
}
--- 395,402 ----