bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-mailutils] Scheme procedure mu-message-copy


From: Sergey Poznyakoff
Subject: Re: [bug-mailutils] Scheme procedure mu-message-copy
Date: Wed, 06 Jun 2012 18:17:38 +0300

Chris Hall <address@hidden> ha escrit:

> I hope you don't mind my sending this directly,

No problem, you're quite welcome.

> Then, after some googling, in the Debian repository on my server I find
> RSS2Email, a cool little Python script that fetches RSS feed articles
> and mails them using the local mailer.

Ah, that's interesting!

> So, *lots* of incoming mails that need to be sorted into folders - GNU
> Mailutils, maidag and Guile to the rescue!

Nice to hear:)

> Now I'm wondering if there might be a way to use Maidag in LMTP mode for
> this, i.e., point RSS2Email at it somehow? Would that be possible?

Yes. of course.  Maidag can operate in LMTP mode as well.  I'll describe
it in a separate mail later, when I'm back home.

> And also have Maidag sort it into folders?

Yes, that's the kind of job for extension script (be it Guile or Sieve).

> I've also attached a version of my Maidag delivery script. I've only
> used it once so far, but it worked great. I'm thinking it could be
> generalized a bit more, plus I need to wrap a 'catch' around

I'll take a look today in the evening.

> (mu-mailbox-append-message target-mailbox message)
> 
> because on 4 (out of 67) messages, it didn't work.
> 
> I'm wondering if maybe there is mailbox locking issue?

Yes, you are right. The error message shows:

> Jun  6 11:21:57 kaikala maidag[8600]: ERROR: Throw to key `mailutils-error' 
> with args `("mu-m\
> ailbox-append-message" "Cannot append message ~A to mailbox ~A" (#<message 
> "address@hidden
> d.com" "Wed Jun  6 06:21"  56 2546 > #<mailbox 
> mbox:///home/chris/mail/mailboxes/RSS/Atlantic\
> /mBoX-mSgDaTa (0)>) (4106))'.

The last number (4106) is Mailutils error number (analogous to the
errno).  Error 4106 stands for "Conflict with previous locker" and is
set when Mailutils times out while trying to lock a mailbox.  You
can find a list of errors in include/mailutils/errno.h.  A textual
description of an error code can be obtained using mu-strerror function
in Guile (it understands libc errno numbers as well).

The usual way to cope with such errors is by configuring locking timeout
and number of retries.  This is done in configuration file, using the
following statements:

locking {
  # Default locker flags (E=external, R=retry, T=time, P=pid).
  flags <arg: string>;
  # Set timeout for acquiring the lock.
  retry-timeout <arg: number>;
  # Set the maximum number of times to retry acquiring the lock.
  retry-count <arg: number>;
  # Expire locks older than this amount of time.
  expire-timeout <arg: number>;
  # Use external locker program (if E flag is set).
  external-locker <prog: string>;
};

> I've gotta hand it to you, Sergey: email systems, and *especially* the
> messages that flow through them, are a *huge* challenge: well done!

Thanks for the good words!

Regards,
Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]