Note: I added brackets [] where the real data would go, and parenthesis () where I am adding comments for your benefit.
My LibresourceMail.properties file looks like:
mail.factory.name libresourceMail
mail.factory.type javax.mail.Session
mail.from libresource@[myDomainName].com
mail.smtp.host [myComputerName]
mail.smtp.port 25
(I assume that these two lines below aren't needed)
#mail.authentication.username [jamesAdminUserName]
#mail.authentication.password [jamesAdminUserPassword]
My %JAMES_HOME%/apps/james/SAR-INF/config.xml looks like:
(this is only the pieces that I modified)
<servernames autodetect="true" autodetectIP="true">
<servername>myDomainName.com</servername>
<servername>myOtherDomainName.com</servername>
</servernames>
...
(I run on a nat, so the 'myComputerIP' is not my public ip.)
<mailet match="RemoteAddrNotInNetwork=127.0.0.1,[myComputerIP]" class="ToProcessor">
<processor> relay-denied </processor>
<notice>550 - Requested action not taken: relaying denied</notice>
</mailet>... <dnsserver>
<servers>
<server>[dns ip address]</server>
<server>[alternate dns ip address]</server>
</servers>
<autodiscover>false</autodiscover>
<authoritative>true</authoritative>
</dnsserver>... <remotemanager>
<port>4555</port>
<handler>
<helloName autodetect="false">[myComputerName.myDomainName.com]</helloName>
<administrator_accounts>
<account login="[jamesAdminUserName]" password="[jamesAdminUserPassword]"/>
</administrator_accounts>
<connectiontimeout> 60000 </connectiontimeout>
</handler>
</remotemanager>
(I replaced the same elements as above (remotemanager tag) for tags: pop3server, smtpserver, and nntpserver)
...
So, If setup, within libresource, the users email of (for example) myUser@myDomainName.com, and within james I add the username of 'myUser' and set forwarding for user 'myUser' to go to myUser@gmail.com the mail will be delivered by james. However, if I setup, within libresource, the users email of myUser@gmail.com the mail is never sent. In fact, if I watch the james outgoing folder, I can see mail going into the outgoing directory when mail is successful, but when mail fails there hasn't been any mail sent from libresource to the outgoing folder in james.
Any Ideas?