This works for me - I have a similar setup. However i am not using james' forwardingDestination user field.
I'm not sure how this forwarding works: I dont know if james accepts mail based on the initial hostname, or based on the forwardingDestination hostname. I am using a VirtualUserTable which can forward emails. Emails come into the system for [EMAIL PROTECTED] and get entered into the mail processor as [EMAIL PROTECTED] - so as long as mydomain.com is in the hostnames block it works. They then go through the processor, and get changed to the forward address. Daniel. > -----Original Message----- > From: Ricardo Cortes [mailto:[EMAIL PROTECTED] > Sent: 15 November 2004 21:05 > To: James Users List > Subject: RE: Relaying Denied Error with JavaMail > > > What I'm actually trying to do is the following: > > 1. Have all user information registered in MySQL, including a > forward email address. > > 2. When an email is sent via JavaMail to James, I'd like James > to look up the user in the MySQL database and then forward the > message to the email address it finds in the MySQL database (the > email is arbitrary - yahoo.com, gmail.com, hotmail.com, you name > it). Thus, the message is never stored in James, only forwarded. > > 3. Eventually, I'd like to persist a few fields from the message > to the MySQL database via a Mailet but I'd like to get 1. and 2. > working first. > > Anyone know if this configuration is possible? > > -----Original Message----- > From: Hes Siemelink [mailto:[EMAIL PROTECTED] > Sent: Monday, November 15, 2004 4:14 AM > To: James Users List > Subject: RE: Relaying Denied Error with JavaMail > > > As I understand it, you are trying to relay a message to yahoo.com > through James on your local machine. This is not permitted by default, > because that would make James an "open relay" and very vulnerable for > spam. > > You can tell James that it should accept mail from certain hosts for > relaying in the config file. > > Open the config.xml and search for the following (it's in the smtpserver > section): > > <!-- > Authorize specific addresses/networks. > If you use SMTP AUTH, addresses that match those specified > here > will be permitted to relay without SMTP AUTH. If you do > not use > SMTP AUTH, and you specify addreses here, then only > addresses that > match those specified will be permitted to relay. > > Addresses may be specified as a an IP address or domain > name, > with an optional netmask, e.g., 127.*, 127.0.0.0/8, > 127.0.0.0/255.0.0.0, and localhost/8 are all the same. > --> > <authorizedAddresses>127.0.0.1, localhost</authorizedAddresses> > > I think you want to add 10.70.14.101 here. > > Good luck > > Hes. > > -----Original Message----- > From: Ricardo Cortes [mailto:[EMAIL PROTECTED] > Sent: Friday, November 12, 2004 18:22 > To: James Users List > Subject: Relaying Denied Error with JavaMail > > Hi there, > > I finally got James up and running and I'm trying to test it out using > the JavaMail client from the IBM James article. I currently have James > setup to get the user information from a MySQL database. I went ahead > and inserted one record in this table. Here are the values: > > username: test > pwdHash: null > pwdAlgorithm: null > useForwarding: 1 > forwardingDestination: [EMAIL PROTECTED] > usealias: null > alias: null > > I know that my JavaMail client is connecting to the server ok because > when James isn't running I get an error connecting to port 25. That's > cool. However, when I try to connect with the James server started via > JavaMail, I get the error below. I modified the RemoteAddrNotInNetwork > mailet match to include all IPs on my network and the domain and I'm > still getting relaying denied errors. I also tried starting James with > the DEBUG logging turned on but nothing relevant got logged. Any help > would be fantastic.................. > > Thanks, > Ricardo > > Creating MailClient for test... > Sending message to test... > SENDING message from [EMAIL PROTECTED] to [EMAIL PROTECTED] > > javax.mail.SendFailedException: Invalid Addresses; > nested exception is: > class com.sun.mail.smtp.SMTPAddressFailedException: 550 - > Requested action not taken: relaying denied > > at > com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1130) > at > com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:525) > at javax.mail.Transport.send0(Transport.java:151) > at javax.mail.Transport.send(Transport.java:80) > at MailClient.sendMessage(MailClient.java:51) > at JamesConfigTest.main(JamesConfigTest.java:18) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav > a:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor > Impl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > com.intellij.rt.execution.application.AppMain.main(AppMain.java:78) > Exception in thread "main" > Process finished with exit code 1 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
