Article View: news.software.nntp
Article #81849mailpost exits with 0 when it should not
From: Jon Bendtsen
Date: Wed, 02 Sep 2009 11:27
Date: Wed, 02 Sep 2009 11:27
41 lines
1962 bytes
1962 bytes
Hi mailpost exists with 0 when it should not. I just ran the bash code below. for mail in $(grep -l "^To: .*bad@@example.com" *); do ../p.sh $mail bad.example done And I got the following inews failed: inews: no space after colon in "X-MS-Exchange-Organization-Mes..." inews: article not posted So, I wanted to take a look at the mail that had this problem. news@dknntp:~/Maildir/new$ grep -l "^To: .*bad@example.com" * BUT THEY ARE ALL GONE?? Sure, my p.sh script deletes the file, but _ONLY_ if it was posted successfully. cat p.sh #!/bin/bash group="$2" post="$1" cat "$post" | /usr/lib/news/bin/mailpost -a approved $group && rm "$post" So it should ONLY delete mails that was successfully posted, which leads to mailpost should not return 0 when there was an error. JonB
Technical Details
Message-ID:
<h7lkqm$947$1@munin.diku.dk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!news2.euro.net!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!aotearoa.belnet.be!news.belnet.be!news.net.uni-c.dk!munin.diku.dk!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <h7lkqm$947$1@munin.diku.dk> Subject: mailpost exits with 0 when it should not Date: Wed, 02 Sep 2009 13:27:18 +0200 From: Jon Bendtsen <noone@example.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!news2.euro.net!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!aotearoa.belnet.be!news.belnet.be!news.net.uni-c.dk!munin.diku.dk!not-for-mail Newsgroups: news.software.nntp Organization: Department of Computer Science, University of Copenhagen Lines: 41 NNTP-Posting-Host: tyr.diku.dk Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: munin.diku.dk 1251890838 9351 130.225.96.226 (2 Sep 2009 11:27:18 GMT) X-Complaints-To: news@diku.dk NNTP-Posting-Date: Wed, 2 Sep 2009 11:27:18 +0000 (UTC) User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812)