Please note: fetchpop is deprecated and replaced by fetchmail which is documented at http://james.apache.org/server/2.3.0/fetchmail_configuration.html.
This is a summary of my experiences setting up fetchpop:
It is possible to get loops with fetchpop if not carefully configured (try to send a mail from a local account to another local account + the fetchpopped account and see what happens).
The remarks in the config file say that you should set up james to handle mail for the domain of the fetchpopped account. This does not seem to me to be a good idea because I imagine it would stop me from sending mail to that domain.
This is how I did it, and it seems to work:
<fetchpop enabled="true"> <fetch name="myfetchtask"> ....more config.... </fetch> </fetchpop> ...more... <processor name="root"> ...spam handling... <!-- handle pop fetched adresses --> <mailet match="FetchedFrom=myfetchtask" class="ToProcessor"> <processor> myfetchtask </processor> </mailet> <!-- Send remaining mails to the transport processor for either local or remote delivery --> <mailet match="All" class="ToProcessor"> <processor> transport </processor> </mailet> </processor> <processor name="myfetchtask"> <!-- any local recipients, kill it - fetched domain is not local --> <mailet match="RecipientIsLocal" class="Null"/> <!-- Now forward my fetched account to my local account --> <mailet match="RecipientIsemail@example.com" class="Forward"> <forwardto>my.local.account@localhost</forwardto> </mailet> <!-- If the recipient is for a local account, deliver it locally --> <mailet match="RecipientIsLocal" class="LocalDelivery"/> <!-- now kill all remaining recipients - fetched mail should not be resent --> <mailet match="All" class="Null"/> </processor>
Note that my james server is *not* configured to handle mail for my.fetched.domain
This seems to be a lot of work, but it proved to be necessary.
Any comments about this? -- Torbjörn Gannholm
This seems still not to be perfect, mailing lists going to my fetched account don't seem to work properly. Anyone who works it out better, please post here. -- Torbjörn Gannholm