Solved

JavaMail and spam

Posted on 2011-03-03
6
1,425 Views
Last Modified: 2012-05-11
Hi,

I have upgraded java mail to version 1.4.4. And i notice that my messages are recognized as spam.
Normal sending is ok, but clone of message dont.
I do something like:

MimeMessage newMsg = new MimeMessage(org_msg);
      newMsg.setRecipients(Message.RecipientType.TO, addr);
      newMsg.setRecipients(Message.RecipientType.CC, new Address[0]);
      newMsg.setRecipients(Message.RecipientType.BCC, new Address[0]);
      newMsg.saveChanges();

0
Comment
Question by:lavitz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 35026144
Usually in Spam-Marked Mails you can see a comment of the filter telling you exactly why the mail was treated as spam.
Did you have a look at this? If not I doubt we can guess the reason for this.
0
 

Author Comment

by:lavitz
ID: 35036278
Here is spam log

 pts rule name              description
---- ---------------------- --------------------------------------------------
 3.1 BAD_ENC_HEADER         Message has bad MIME encoding in the header
 0.1 FORGED_RCVD_HELO       Received: contains a forged HELO
 4.0 RCVD_HELO_IP_MISMATCH  Received: HELO and IP do not match, but should
 1.5 RCVD_NUMERIC_HELO      Received: contains an IP address used for HELO
-2.6 BAYES_00               BODY: Bayesian spam probability is 0 to 1%
                            [score: 0.0000]
 0.0 HTML_MESSAGE           BODY: HTML included in message
 0.0 MIME_HTML_ONLY         BODY: Message only has text/html MIME parts
 2.3 HTML_TINY_FONT         RAW: body contains 1 or 0-point font
 1.3 FROM_EXCESS_BASE64     From: base64 encoded unnecessarily
-3.5 AWL                    AWL: From: address is in the auto white-list


0
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 35036316
Well I guess having a look at this, it seems that the mime-encoding set in the header is not set or incorrect and the ip-address sent in the HELO command of the SMTP connection is wrong (if the remote server uses the name provided by the HELO to lookup the IP of the sender and this check fails). This usually happens when your sending server has local names and ip-addresses (it is inside a local network which accesses the internet via NAT or a Proxy).
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 35036325
From the 4th response your server is propably sending it's local IP adress, which the recieving host cannot access.
0
 

Author Comment

by:lavitz
ID: 35175259
Iam not responsible for making mails. Java mail do this. Iam interested why changing java version make mail spam
0
 
LVL 20

Accepted Solution

by:
ChristoferDutz earned 500 total points
ID: 35381546
Well I think the problem is that your Application is sending emails. And naturally your machine is posting it's local IP address in the EHLO SMTP command (Lets say you have the local ip 10.10.10.123) If you now use a Gateway (10.10.10.1 with the ip 1.2.3.4 from the Internet) then the remote Server will recieve an EHLO from the IP 1.2.3.4 but will say that he's 10.10.10.123 in the EHLO. This is the reason for your spam-rating.

I think the best solution (The one I allways use) is to use your fully configured company mailserver, create a dedicated account for your application (or a shared one to support all your applications) and to make the SMTP Server relay the mails to the final destination ... this way you should no longer have these problems.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
The viewer will learn how to implement Singleton Design Pattern in Java.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question