I am trying to setup Apache James v2.3.1 as a SMTP Server on Windows in our Continuous Integration environment, but am unable to get non-localhost originated emails to work.
Here is what works: Client on localhost sends an email to [email protected] using Apache James running on localhost. This worked great without any modifications to James. Here is what is not working: Client on localhost sends an email to [email protected] using Apache James running on server A. When I first attempted this, the smtpserver log had the following error: ERROR smtpserver: Rejected message - 10.9.5.176 not authorized to relay to gmail.com [to:[email protected] <to%[email protected]>] [ from:[email protected] <from%[email protected]>] This is understandable and I am glad James is setup to be restrictive like this. Here from:[email protected] <from%[email protected]> is a made up from email address that doesn't exist. Hopefully that isn't the issue. Based on the James documentation I updated the config.xml to include the source IP address as an authorizedAddress: <authorizedAddresses>10.9.5.176,127.0.0.0/8</authorizedAddresses> Then the ERROR not longer happens and now I get a successful message: INFO smtpserver: Successfully spooled mail Mail1249399497977-0 from [email protected] on 10.9.5.176 for [[email protected]] Even though it appears James successfully "spooled" the email, I never receive an email at [email protected]. This is the same message I see when it does work, so not sure what I am missing. I am sure its a configuration issue.
