On Sun, 2005-02-20 at 11:10 -0800, Richard E Miles wrote: > On Sun, 20 Feb 2005 00:52:56 -0700 > Craig White <craigwhite@xxxxxxxxxxx> wrote: > > > On Sun, 2005-02-20 at 14:31 +0800, HaJo Schatz wrote: > > > On Fri, 2005-02-18 at 00:20 -0700, Craig White wrote: > > > > I just manually cleaned off 460+ emails from my ISP's mailbox that I > > > > 'fetch' mail from. > > > > > > > > they were logging in my fetchmail log as... > > > > > > > > fetchmail: incorrect header line found while scanning headers > > > Same here. After each fetchmail-run (which fetches the legit mails and > > > leaves some rubbish behind), I run a small script which telnets into the > > > POP3 account and deletes all remaining mail @ the ISP. I'm assuming here > > > that the badly formatted mails are spam anyhow. > > ---- > > can I look at the script - I only need the part after the login - I > > simply don't know the commands to speak IMAP once I am logged in and > > searches on the internet have been fairly unclear. In my case, they > > indeed were all spam that I deleted. and since I started this thread a > > few days ago, there are now 8 of them already. > > > > It appears that they have a null character in the header which fetchmail > > must not like and from Mike Klimke's explanation and going back through > > the email exchange, it appears that my ISP's smtp server is rather > > liberal (some might say broken) in what it accepts for email. > > > As an added note, you shouldn't need to write a script to erase your email from > your isp. Put expunge 1 in your .fetchmailrc file. That will erase the mail > for each message received. ---- that's not a recommended option for fetchmail... -e <count> | --expunge <count> (keyword: expunge) Arrange for deletions to be made final after a given number of messages. Under POP2 or POP3, fetchmail can- not make deletions final without sending QUIT and ending the session -- with this option on, fetchmail will break a long mail retrieval session into multiple subsessions, sending QUIT after each sub-session. This is a good defense against line drops on POP3 servers that do not do the equivalent of a QUIT on hangup. Under IMAP, fetchmail normally issues an EXPUNGE command after each deletion in order to force the deletion to be done immedi- ately. This is safest when your connection to the server is flaky and expensive, as it avoids resending duplicate mail after a line hit. However, on large mailboxes the overhead of re- indexing after every message can slam the server pretty hard, so if your connection is reliable it is good to do expunges less frequently. Also note that some servers enforce a delay of a few seconds after each quit, so fetchmail may not be able to get back in immediately after an expunge -- you may see "lock busy" errors if this happens. If you specify this option to an integer N, it tells fetchmail to only issue expunges on every Nth delete. An argument of zero suppresses expunges entirely (so no expunges at all will be done until the end of run). This option does not work with ETRN or ODMR. script makes more sense to me. Craig