Steve Brewin wrote:
Hi,

I'm trying to use HasMailAttribute to save a backup
of each mail fetched from an external POP3 server.

Using James 2.2.0a10.

In james-fetchmail.xml I have:

<fetchmail enabled="true>
    <fetch name="fetchfromexternal">

and in config.xml:

<processor name="transport">
    <mailet match="HasMailAttribute=fetchfromexternal"
            class="ToRepository">
       <repositoryPath>db://maildb/backup/fetched/</repositoryPath>
       <passThrough>true</passThrough>
    </mailet>

Fetched mails are delivered to the appropriate recipients,
but no backup mails are created.

Can you see what I'm doing wrong?

Steen


Steen,

In fetchmail the attributes are always prefixed by the package name to avoid
collisions. The name of the attribute you want is
"org.apache.james.fetchmail.taskname". The value of this attribute is the
name of the fetch task, "fetchfromexternal" in this case.

To match mail from all fetch tasks, you need...

      <mailet match="HasMailAttribute=org.apache.james.fetchmail.taskname"
              class="ToRepository">

To match mail from a particular fetch task is a little harder at the moment
as I don't believe there is a matcher that matches on the value of an
attribute as yet.

-- Steve

I've changed that but it still doesn't work. What I've noticed is that the mail that is delivered to the appropriate inbox has no mail attributes. The database field 'message_attributes' is NULL. Shouldn't it contain the mail attributes?

Steen


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to