silently ignore duplicate inews via mailpost

Julien ÉLIE julien at
Fri Dec 18 22:10:43 UTC 2020

Hi Harald,

> CUSTOMER_BOSS: "|/usr/lib/news/bin/mailpost -c 15 -b /var/tmp -x To:CC 
> example.projects.CUSTOMER_BOSS"
> The header I received within the mailpost failure message was
> From: anja at (Anja)
> Newsgroups: example.projects.CUSTOMER_BOSS
> Message-ID: <35ad3dd8-c2bb-8f7b-2615-17e95aadf212 at>
> As you can see, Anja posted the article twice: Once per Newsgroup 
> integration
> in Thunderbird, and once via the "short" EMail alias. I cannot blame 
> Anja here.
> She just clicked on [reply to all].

OK, that's pretty clear.

> Question was whether it would be possible to silently ignore the
> duplicate article without sending a mailpost failure EMail?

Is the subject of the mailpost failure mail "inews failed: inews: cannot 
send article to server: 441 435 Duplicate inews: article not posted"?

Unfortunately, there's currently no way to silent that error without 
modifying the mailpost script.  The "-n" flag to mailpost prevents both 
postings and sending mail errors (and not only that second part).

Is it possible for you to modify mailpost?

If that is the case, near line 538, just change:

if (@inews) {
     chomp @inews ;
     mailArtAndDie ("inews failed: @inews") ;


if (@inews) {
     chomp @inews ;
     mailArtAndDie ("inews failed: @inews")
         unless ($inews[0] =~ /441 435 Duplicate/g);

I believe it will fix the problem you're facing.
Please tell me if that does the trick (now that you know how to 
reproduce it, you may try to trigger it).

Julien ÉLIE

« – Ordre est donné d'enquêter dans tout le secteur, afin d'identifier
     et de confondre les légions à la solde de Pompée !
   – S'ils n'ont pas de signes distinctifs, ça ne sera pas facile mon
     général ! » (Astérix)

More information about the inn-workers mailing list