Make apache james accept incoming mail addressed to any subdomain

346 Views Asked by At

I have an apache james server and am using the following in the domainlist.xml:

<domainlist class="org.apache.james.domainlist.jpa.JPADomainList">
   <autodetect>true</autodetect>
   <autodetectIP>true</autodetectIP>
   <defaultDomain>localhost</defaultDomain>
   <domainnames>
     <domainname>foo.bar.com</domainname>
   </domainnames>
</domainlist>

Currently if I send mail into this james server addressed to [email protected] the mail is accepted. If I send something to [email protected] the mail is rejected. If I added an additional domain as follows:

<domainname>baz.bar.com</domainname>

the email to [email protected] is accepted. What I really want is some way to get the james server to just accept mail given to any subdomain of bar.com, although I would also be okay with it accepting anything.

I went through all of the configurations in fetchmail.xml and set "reject" to be "false" for everything except the blacklist filter, but that did not allow my [email protected] email to get through.

I am running the default configurations, with the addition of a new class at the head of the processor chain:

  <processors>
    <processor state="root" enableJmx="true">
       <mailet match="All" class="test.LogIncoming" />

This LogIncoming just prints a bunch of details about the email to the log, but it isn't getting called when the inbound email's "to" domain isn't in the domainlist.xml.

I thought it might work to make a custom implementaiton of the DomainList class, but I was hoping that there might exist something that will allow a wildcard subdomain.

0

There are 0 best solutions below