[imapfilter-devel] Error: attempt to index field 'INBOX'
Alejandro Jakubi
jakubi at df.uba.ar
Sun Oct 21 03:57:39 EEST 2007
David,
> Imapfilter uses LUA, which is a quite featureful language. Anything
> that imapfilter can't do, you can write in LUA. If you don't like the
Yes, googling a bit I have got that impression. But, if I have to choose, I
would prefer right now an automatization of the mail processing tasks (those
that I do currently via Pine filter rules), even if partial (because "recipes"
are not readily available to implement everything). Later on I will go into
learning LUA for adding what is left.
> messages you'd like to see. If you don't know how to get information
> such as the current date and time, you should go do some reading about
> LUA, as this is really beyond the scope of imapfilter.
No, currently I do not know. It would be wonderful a pointer to an explanation
on that.
> So, if imapfilter is not giving you the behavior you want, such as
> moving and deleting messages properly, you just have to be a little more
> clever about how you apply the flags you've been told about. Such as:
This trick is working fine. Thank you very much.
> I believe that the -l flag redirects the output that any print()
> statements would produce, to the specified file. Because imapfilter's
> messages are just regular print() statements, just like your own script
My first problem here is that I do not see documented what exactly this
print() command does and what are its parameters and options. Ie I see it
"used" in the man pages but not "explained". Perhaps I am missing something
obvious.
> Ah, you have hit upon a common misconception. There is no such thing as
> one process "holding" a folder, in IMAP. IMAP is a shared resource, and
> therefore you can have multiple processes all connected to the same
> folder at the same time. They will not be aware of each other's
> connections, and they cannot prevent each other from making changes to
> the folder. This can lead to some timing bugs! If you are going to
> have multiple IMAP clients connected at once, you should keep this in
> mind when writing your scripts.
It seems to me that this is rather an issue of wording. Not being an expert in
IMAP parlance I have put quotes to "holding" as a way to convey the idea,
betting that it was not the proper technical term. But the kind of problems
that you describe seems to include the one that prompted my question:
When Pine has the remote INBOX open and imapfilter executes, accessing also to
this INBOX, Pine produces this error message:
"[MAIL FOLDER INBOX CLOSED DUE TO ACCESS ERROR]"
and I have to reopen the remote INBOX.
In fact the system manager has warned me about this problem of using
imapfilter, by stating that Pine requires "exclusive access" to the INBOX.
I have not checked the documentation of Pine about this subject yet.
So, as Pine "does not like" to share the resource, what about imapfilter?
Nevertheles, in automatic mode, I plan to set imapfilter so that it filters a
few times a day, so that the probability of collision would be rather small.
> Hmm, my man page tells me that this option now defaults to "true", but
> this was not always the case. Best to be sure about it rather than make
> assumptions.
Do you mean version 2.x default?
Is there a way to query the value of all the options?
> Someday you might make a mistake and expunge the folder before checking
> all the messages. But, as long as you are aware of the risk, it is your
> decision to make.
Yes, I am aware of this risk. For these particular messages, the probability
of loosing a nonspam message by accidental erasure is quite small anyway, so
that it is worth for me taking this risk.
> Are you a member of this mailing list? I am not sure if I should simply
> reply to the list, or continue to CC you on these replies.
I am member of this list (I beleived that I could not post otherwise). But I
would very grateful if you could continue CC to my address on your replies
because the messages via the list server arrive here rather corrupted (in
formating and with missing spaces between some words).
Alejandro
More information about the Imapfilter-devel
mailing list