6 Replies Latest reply on Jun 13, 2005 4:47 PM by Andrew Oliver

    Forwarder listener

    Tom Elrod Master

      I have coded a listener for forwarding e-mails. I needed it for M2, which I am running, so the code is compatible for that (although originally coded for what is at HEAD, so just commented the changes while making it compatible for M2).

      If you want it, let me know who I can e-mail the source to.

        • 1. Re: Forwarder listener
          Andrew Oliver Master

          Ummm...don't you have commit access? :-)

          • 2. Re: Forwarder listener
            Tom Elrod Master

            I can commit it off the M2 tag that I built it on (since this is what I needed it for). Unless this was a branch (which would be pretty pointless anyways), it will break the current code.

            I am not sure how properly test the listener with the current code base without installing and running a full on mail server, which I am not going to do. If you can direct me to some documentation (or just tell me and I'll doc it when done) on how to run a simple test to exercise the listener, I can do that.

            • 3. Re: Forwarder listener
              Andrew Oliver Master

              it is a branch. don't think its useful though to commit to m2. I guess we'll have to wait until someone wants to develop it to completetion.

              • 4. Re: Forwarder listener
                Michael Barker Apprentice

                Create a patch against head and submit it. I can have a look at it.

                Mike.

                • 5. Re: Forwarder listener
                  Tom Elrod Master

                  I committed to HEAD. Class is org.jboss.mail.maillistener.ForwarderMailListener and it's interface.

                  The configuration entry to jboss-service.xml would look something like:

                   <!-- Custom listener for forwarding e-mails -->
                   <mbean code="org.jboss.mail.maillistener.ForwarderMailListener"
                   name="jboss.mail:type=MailServices,name=ForwarderListener">
                   <attribute name="Configuration">
                   <forwarding>
                   <forward originalAddress="admin@acme.com">bob@acme.com</forward>
                   <forward originalAddress="abc.org">jane@acme.com</forward>
                   <forward originalAddress="webadmin">katie@abc.org</forward>
                   </forwarding>
                   </attribute>
                   </mbean>
                  


                  The value for the orginalAddress attribute can either be the user name, domain, or a the full e-mail address to match on. The value for the forward element has to be the full e-mail address of where to forward.


                  • 6. Re: Forwarder listener
                    Andrew Oliver Master

                    thank you!