Reputation: 1420
Hi I am using apache james email server 2.3.2 for email sending thrugh my Java application I have setup it and using JavaMail API 1.4. I am tring to send emails to gmail/yahoo etc mail servers.
I could sent mail to accunts on localhost(account on locally running James ) but not to outside email servers.
I have changed /apps/config.xml also. I have my sample MyMailet on james. It is not throwing any exception. but mailet*.log is like:
13/06/12 15:20:13 INFO James.Mailet: MyMailet#init called
13/06/12 15:20:13 INFO James.Mailet: RemoteAddrNotInNetwork: Authorized addresses: [127.0.0.1/255.255.255.255]
13/06/12 15:20:13 INFO James.Mailet: RemoteDelivery: Total number of delayTime attempts exceeds maxRetries specified. Increasing maxRetries from 1 to 6
13/06/12 15:20:17 INFO James.Mailet: MyMailet#service callednull from test@localhost
13/06/12 15:20:23 INFO James.Mailet: RemoteDelivery: Attempting delivery of Mail1339581017690-0 to host 192.168.15.186 at 192.168.15.186 for addresses [[email protected]]
13/06/12 15:20:23 INFO James.Mailet: RemoteDelivery: null
13/06/12 15:20:23 INFO James.Mailet: RemoteDelivery: Temporary exception delivering mail (Mail1339581017690-0:
13/06/12 15:20:23 INFO James.Mailet: RemoteDelivery: Storing message Mail1339581017690-0 into outgoing after 0 retries
dnsserver*.log is like:
13/06/12 15:20:13 INFO dnsserver: DNS Server is: 192.168.15.3
james*.log like:
13/06/12 15:20:13 INFO James: JAMES init...
13/06/12 15:20:13 INFO James: Local host is: IISD27
13/06/12 15:20:13 INFO James: Handling mail for: 97.74.180.1
13/06/12 15:20:13 INFO James: Handling mail for: iisd27
13/06/12 15:20:13 INFO James: Handling mail for: gmail.com
13/06/12 15:20:13 INFO James: Handling mail for: 74.125.236.182
13/06/12 15:20:13 INFO James: Handling mail for: 74.125.236.181
13/06/12 15:20:13 INFO James: Handling mail for: 127.0.0.1
13/06/12 15:20:13 INFO James: Handling mail for: localhost
13/06/12 15:20:13 INFO James: Local users repository opened
13/06/12 15:20:13 INFO James: Private Repository LocalInbox opened
13/06/12 15:20:13 INFO James: JAMES ...init end
and cofig.xml is like:
<processor name="transport">
<mailet match="All" class="RemoteDelivery">
<outgoing> file://var/mail/outgoing/ </outgoing>
<gateway>192.168.15.186</gateway>//My IP addresss. Tried with smtp.gmail.com also
<gatewayPort>25</gatewayPort>
<gatewayusername>user123</gatewayusername>
<gatewayPassword>pass123</gatewayPassword>
<!-- Set the HELO/EHLO name to use when connectiong to remote SMTP-Server -->
<mail.smtp.localhost>myMailServer</mail.smtp.localhost>
</mailet>
</processor>
Upvotes: 2
Views: 5706
Reputation: 1762
I think problem caused by this:
Email servers before accepting any mail do a reverse dns query. They check the ip for domain that the email came from and the ip that email is really came from.
If ip of domain and ip of email sender does not match, mail servers think that email is junk or spam.
Here since your domain (I don't know what is it :-? ) is not a valid address when Email server send a reverse dns query does not get an IP and think your mail is junk or spam.
For more information check this: http://wiki.junkemailfilter.com/index.php/Fixing_Reverse_DNS
Upvotes: 2