Solved

JavaMail and spam

Posted on 2011-03-03
6
1,381 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
Industry Leaders: 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!

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jsp insert to database example 2 65
JAVA API design with micro service cloud in mind 1 82
Github api to fetch the number of collaborators in a git repo 1 33
Java List 4 42
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

730 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