You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Steen Jansdal <sj...@buanco.dk> on 2003/03/06 10:18:03 UTC
FetchPOP and recipients
Hi,
I'm totally new with this James mail server, so
please bear with me if I'm talking nonsense.
In my company we have a lot of external mailboxes
that has to be fetched via POP3, and I can see that
James can do that with the fetchpop component.
But I think its difficult to setup in which mailbox
these mails should land.
So I made a little hack. I added the possibility to
specify recipients of fetchpop'ed mails:
<fetchpop enabled="false">
<!-- You can have as many fetch tasks as you want, but each must
have a -->
<!-- unique name by which it identified -->
<fetch name="mydomain.com">
<!-- Host name or IP address -->
<host>mail.mydomain.com</host>
<!-- Account login username -->
<user>username</user>
<!-- Account login password -->
<password>pass</password>
<!-- How frequently this account is checked - in
milliseconds. 600000 is every ten minutes -->
<interval>600000</interval>
<!-- Specify zero, one or more recipients ->
<recipients>joe@mydaim.com,ann@mydomain.com</recipients>
</fetch>
</fetchpop>
This feature required some small changes i FetchPOP.java, but
it actually worked :-)
What do you think?
Are you interested in implementing this feature. I can send you
my patched FetchPOP.java
best regards
Steen
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
Re: FetchPOP and recipients
Posted by Steen Jansdal <sj...@buanco.dk>.
Danny Angus wrote:
> Steen,
>
> Thanks for this, but I'm sorry to say that we probably won't use it, Fetch is undergoing some re-writing at the moment to extend it to
include IMAP accounts as well, but even so your idea breaks the
principle by which fetch works;
>
> Fetch is intended to insert mail into James' spool where it will pass through mailets and matchers.
> It is intended by design that mail fetched by fetch will be routed by being filtered by mailets and processed by matchers.
> A special matcher exists for this purpose it is used to match mail (only once as it strips its header to prevent looping) fetched by a named "fetch", it is intended that you use this matcher and a forward, redirect or alias mailet to route the fetched mail to its new destination.
>
> Don't be disheartened, we like getting contributions, if you do anything else _do_ post it.
>
> d.
>
Danny,
That you won't use it is quite allright with me, but a little
sad for me, since then I have to maintain this patch myself.
I forgot to tell you that this <recipients> tag are optional.
If it isn't there mails are handled in the exact same way as
before.
The only thing this patch do is attach a list of recipients
to the mail, in the exact same way mails smtp'ed to James
have a list of recipients attached. They are still sent to
the spooler, and mailets and matchers can still be used.
Steen
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
RE: FetchPOP and recipients
Posted by Danny Angus <da...@apache.org>.
Steen,
Thanks for this, but I'm sorry to say that we probably won't use it, Fetch is undergoing some re-writing at the moment to extend it to include IMAP accounts as well, but even so your idea breaks the principle by which fetch works;
Fetch is intended to insert mail into James' spool where it will pass through mailets and matchers.
It is intended by design that mail fetched by fetch will be routed by being filtered by mailets and processed by matchers.
A special matcher exists for this purpose it is used to match mail (only once as it strips its header to prevent looping) fetched by a named "fetch", it is intended that you use this matcher and a forward, redirect or alias mailet to route the fetched mail to its new destination.
Don't be disheartened, we like getting contributions, if you do anything else _do_ post it.
d.
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org