You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Aleksey Medvedev (JIRA)" <se...@james.apache.org> on 2009/12/28 09:28:29 UTC
[jira] Created: (JAMES-941) FetchMail initializes some mail
attributes with "null" values, which are then ignored by HasMailAttribute
matcher.
FetchMail initializes some mail attributes with "null" values, which are then ignored by HasMailAttribute matcher.
------------------------------------------------------------------------------------------------------------------
Key: JAMES-941
URL: https://issues.apache.org/jira/browse/JAMES-941
Project: JAMES Server
Issue Type: Bug
Components: FetchMail
Affects Versions: 2.3.2
Reporter: Aleksey Medvedev
Priority: Minor
I needed to resend all messages delivered by FetchMail to users, who are not defined to James, into postmaster's mailbox. To do so I've added a new mailet with HasMailAttribute matcher to process messages with "org.apache.james.fetchmail.isUserUndefined" attribute. But this mailet has never been actually invoked in spite of the aforementioned attribute presence.
In the FetchMail's source code I've found that all attributes which do not assume some particular value, are initialized by nulls:
if (isUserUndefined())
aMail.setAttribute(getAttributePrefix() + "isUserUndefined", null);
But HasMailAttribute matcher ignores attributes with null values:
if (mail.getAttribute (attributeName) != null) {
return mail.getRecipients();
}
If I assign arbitrary not null value to the attribute like this
aMail.setAttribute(getAttributePrefix() + "isUserUndefined", "true");
the matcher works fine and my mailet is then invoked.
Thereby we have some incorrectly initialized attributes which are definitely ignored by matchers (and possibly cause some other troubles).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[jira] Resolved: (JAMES-941) FetchMail initializes some mail
attributes with "null" values, which are then ignored by HasMailAttribute
matcher.
Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
[ https://issues.apache.org/jira/browse/JAMES-941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Norman Maurer resolved JAMES-941.
---------------------------------
Resolution: Fixed
Fix Version/s: 3.0-M1
Assignee: Norman Maurer
> FetchMail initializes some mail attributes with "null" values, which are then ignored by HasMailAttribute matcher.
> ------------------------------------------------------------------------------------------------------------------
>
> Key: JAMES-941
> URL: https://issues.apache.org/jira/browse/JAMES-941
> Project: JAMES Server
> Issue Type: Bug
> Components: FetchMail
> Affects Versions: 2.3.2
> Reporter: Aleksey Medvedev
> Assignee: Norman Maurer
> Priority: Minor
> Fix For: 3.0-M1
>
>
> I needed to resend all messages delivered by FetchMail to users, who are not defined to James, into postmaster's mailbox. To do so I've added a new mailet with HasMailAttribute matcher to process messages with "org.apache.james.fetchmail.isUserUndefined" attribute. But this mailet has never been actually invoked in spite of the aforementioned attribute presence.
> In the FetchMail's source code I've found that all attributes which do not assume some particular value, are initialized by nulls:
> if (isUserUndefined())
> aMail.setAttribute(getAttributePrefix() + "isUserUndefined", null);
> But HasMailAttribute matcher ignores attributes with null values:
> if (mail.getAttribute (attributeName) != null) {
> return mail.getRecipients();
> }
> If I assign arbitrary not null value to the attribute like this
> aMail.setAttribute(getAttributePrefix() + "isUserUndefined", "true");
> the matcher works fine and my mailet is then invoked.
> Thereby we have some incorrectly initialized attributes which are definitely ignored by matchers (and possibly cause some other troubles).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org