Mail bouncing from the Microsoft Exchange Server.

Hi  All,
           This is Brajesh from Mobinius Technologies. When ever  we are sending mails to our client those  who are using Microsoft exchange server. Our mail are getting rejected as spam content . How to resolve this
issue. Please help us.   

Hi,
According to your description, I understand that failed to send message to recipient and rejected as a spam.
If I misunderstand your concern, please do not hesitate to let me know.
I want to double confirm whether all account or some special account contain this domain experience this question, how about internal and external mail flow?
If this issue only occur on some special recipient, it indicate that target domain may be configured to reject your message, I recommend to contact its administrator to change the setting.
Otherwise, please try to enable protocol log to get more details about this issue. More details about Protocol logging, for your reference:
https://technet.microsoft.com/en-us/library/aa997624(v=exchg.150).aspx
Best Regards,
Allen Wang
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
Allen Wang
TechNet Community Support

Similar Messages

  • TCP packet out of state: First packet isn't SYN & Outlook is trying to retrieve data from the Microsoft Exchange Server [CAS-ARray]

    We are transitioning from Exchange 2003 to Exchange 2010.  We found Outlook online mode (non-cached mode) have many warning "Outlook is trying to retrieve data from the Microsoft Exchange Server [CAS-ARray]", usually happen when users tried to open
    address book but sometimes even normal operation like click the Send button.  The problem does not affect OWA and extremely rare when Outlook is running in cached mode.  Check the firewall logs, we notice a lot of "TCP Packet Out of State" drops.
    We have a lot from the CAS/HT to DC/GC on TCP_3268 and LDAP.  And the errors are "TCP packet out of state: First packet isn't SYN" with tcp_flags FIN-ACK, PUSH-ACK.
    We also have a lot from CAS/HT to the Outlook Clients on the static RPC port (TCP_59933).   And the errors are "TCP packet out of state: First packet isn't SYN" with tcp_flags FIN-ACK, PUSH-ACK and RST-ACK, ACK.
    This happens even on Outlook 2010 which I though it has TCP Keep Alive implmented to keep the session active within 1 hour. 
    Can somebody tell me if these out-of-state are the cause of our problem?  And how to fix it?
    THANK 1,000,000

    Hello AndyHWC,
    I did some consulting with our CAS team and received the following feedback to your post:
    It is difficult to determine what is causing resets without seeing the captures first hand however, the concern is that you are seeing dropped packets on the firewall logs.  Where is this firewall located?
    Based on the description "Check the firewall logs, we notice a lot of "TCP Packet Out of State" drops." and "We have a lot from the CAS/HT to DC/GC on TCP_3268 and
    LDAP." indicates to me that the firewall is between CAS and GC.  This not supported under any circumstances and would explain the issue they are seeing with clients trying to "retrieve data from the GC".
    If there is not a firewall between the GC and CAS then a Microsoft support engineer would need to have concurrent Netmon Captures from client, CAS, GC during the
    issue to analyze.  If only one GC exists consider adding another GC to handle the client requests and for fault tolerance.
    Also verify that all NIC card drivers are updated to the latest driver version
    More information about firewalls with Exchange 2007/2010
    http://msexchangeteam.com/archive/2009/10/21/452929.aspx
    http://technet.microsoft.com/en-us/library/bb232184(EXCHG.80).aspx
    You can install the Client Access server role on an Exchange 2007 computer that is running any other server roles except for the Edge Transport server role. You
    cannot install the Client Access server role on a computer that is installed in a cluster. Installation of a Client Access server in a perimeter network is not supported.
    http://technet.microsoft.com/en-us/library/dd577077(EXCHG.80).aspx
    “The Installation of a Client Access Server in a Perimeter Network Is Not Supported
    Issue You may want to install an Exchange 2007 Client Access server in a perimeter network. However, this type of installation is not supported in Exchange
    2007.
    Cause The Exchange 2007 Client Access server role is not supported in any configuration in which a firewall is located between the Client Access server
    and a Mailbox server or a domain controller. This includes firewall devices, firewall programs, or any program or device that is designed to restrict traffic between two network locations.
    For correct operation, Client Access servers require typical domain connectivity to domain controllers and global catalog servers. Because any devices
    or programs that restrict or reduce access to domain controllers or global catalog servers may affect the correct operation of the Client Access server, we do not support this type of configuration.
    Resolution To resolve this issue, move the Client Access servers to the internal network. For more information about the ports that Exchange 2007 uses
    for various services, see Data Path Security Reference.”
    Thanks,
    Kevin Ca - MSFT
    Kevin Ca - MSFT

  • Missing the "Microsoft Exchange Server Auth Certificate"

    Hi Everyone,
    I have a single Exchange box.    
    Was integrating my Lync and Exchange and noticed some issues after configuring my Lync pre-reqs: http://technet.microsoft.com/en-us/library/jj721919.aspx
    Following the line of communication and event logs, I quickly saw that the error was not on my Lync Server, but on my Exchange.  The "Microsoft Exchange Server Auth Certificate" that is created during Ex2013 install was missing.
     It was not there to give out tokens for the Server to Server authentication required to integrate Lync, Exchange, and Sharepoint.
    Running Get-AuthConfig: http://technet.microsoft.com/en-us/library/jj215766(v=exchg.150).aspx
    pointed to a thumbprint that did not exist anymore.  
    I confirmed this by checking the local cert store (local computer>personal>certificates), looking in the ECP (servers>certificates), and also running Get-ExchangeCertificate
    In my Exchange Server event log, I found the following errors: 
    Log Name: Application
    Source: MSExchange Certificate Deployment
    Date: 6/8/2014 4:00:50 AM
    Event ID: 2005
    Task Category: General
    Level: Warning
    Keywords: Classic
    User: N/A
    Computer: server.domain.com
    Description:
    Federation or Auth certificate not found: ED2C3E86EBE821AAC2C0DEA85CAB5787E2CAC5F3. Unable to find the certificate in the local or neighboring sites. Confirm that the certificate is available in your topology and if necessary, reset the certificate on the Federation
    Trust to a valid certificate using Set-FederationTrust or Set-AuthConfig. The certificate may take time to propagate to the local or neighboring sites.
    Event Xml:
    2005
    3
    1
    0x80000000000000
    2391484
    Application
    server.domain.com
    ED2C3E86EBE821AAC2C0DEA85CAB5787E2CAC5F3
    AND
    Log Name: Application
    Source: MSExchange OAuth
    Date: 6/8/2014 1:25:41 PM
    Event ID: 2004
    Task Category: Configuration
    Level: Warning
    Keywords: Classic
    User: N/A
    Computer: server.domain.com
    Description:
    Unable to find the certificate with thumbprint ED2C3E86EBE821AAC2C0DEA85CAB5787E2CAC5F3 in the current computer or the certificate is missing private key. The certificate is needed to sign the outgoing token.
    Event Xml:
    2004
    3
    2
    0x80000000000000
    2397430
    Application
    server.domain.com
    ED2C3E86EBE821AAC2C0DEA85CAB5787E2CAC5F3
    Googling has only produced one article that is about another issue that I would have found further down the line if I wasn't testing within the pre-reqs.  The solution is the same, but the article is somewhat poorly written and does not respond to all
    the comments enough to leave one feeling it's 100% correct.  
    http://blogs.technet.com/b/jenstr/archive/2012/11/22/getting-internal-server-error-500-when-creating...
    The broad strokes are clear:
    The fix is to create a new "Microsoft Exchange Server Auth Certificate" by using the following sequence of cmdlets In EMS on the MBX server:
    1. New-ExchangeCertificate -KeySize 2048 -PrivateKeyExportable $true -SubjectName "cn= Microsoft Exchange Server Auth Certificate" -FriendlyName "Microsoft Exchange Server Auth Certificate" -Services smtp
    Do not accept to replace the SMTP certificate when prompted
    2. Note the thumbprint of the new certificate. Let us assume it is 7A39541F8DF58D4821967DD8F899B27410F7C081
    3. $a=get-date
    4. Set-AuthConfig -NewCertificateThumbprint 7A39541F8DF58D4821967DD8F899B27410F7C081 –NewCertificateEffectiveDate $a
    Accept to continue despite the fact that the certificate effective date is not 48 hours into the future
    5. Set-AuthConfig –PublishCertificate
    6. Make sure to remove any potential reference to the previous certificate (which might not exist anymore) by doing Set-AuthConfig -ClearPreviousCertificate.
    Remember to do iisreset on both CAS and MBX servers. Then finally, you can try to re-issue the New-CsPartnerApplication cmdlet.
    65 Million Dollar question:
    Is the syntax in part 1 correct?  Two people says to add the domain?  Jens responds, but it's vague.  What would the correct command look like?  I do not know where to add the -DomainName within the command and which name I
    should add?  The FQDN of the CAS?
    New-ExchangeCertificate -KeySize 2048 -PrivateKeyExportable $true -SubjectName "cn= Microsoft Exchange Server Auth Certificate" -FriendlyName "Microsoft Exchange Server Auth Certificate" -DomainName server.domain.com -Services
    smtp
    Thank you everyone

    Hi,
    Yes, we need to specify a valid FQDN for either the Subject or the DomainName parameter. Please run the following command:
    New-ExchangeCertificate -KeySize 2048 -PrivateKeyExportable $true -SubjectName "cn= Microsoft Exchange Server Auth Certificate" -FriendlyName "Microsoft Exchange Server Auth Certificate" -DomainName server.domain.com -Services
    smtp
    Then following the other steps in your posting to re-create the Microsoft Exchange Server Auth Certificate.
    Regards,
    Winnie Liang
    TechNet Community Support

  • How do I read a Email from the MS exchange server

    could any one tell me as to how i could read the mail from the exchange server and store it in a seperate folder.

    I have an application which reads the mail from our mail server and then writes the body of the message into a file and then deletes the email anf those values are then read from that file and stored into the database .
    Here is the code which pops the mail from the exchange server and then stores it into a file .
    import javax.mail.*;
    import com.sun.mail.pop3.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import java.util.*;
    * Title:
    * Description:
    * Copyright: Copyright (c) 2001
    * Company:
    * @author
    * @version 1.0
    public class SunMailConnection implements Runnable{
         boolean suspendFlag;
         ErrorLogWriter log = new ErrorLogWriter("SunMail.log");
         public SunMailConnection() {
              this.start() ;
         public void run(){
              try {
                   int start = 1;int end = -1;
                   String host = "cyde-cehh-exh1";//the local exchange server name AND DOESNT WORK IF U CONNECT TO EXT MAIL SERVER DIRECTLY
                   //DUE TO SECURED AUTHORISATION
                   //String host ="http://www.conergy-electronics.de";
                   String username ="SunReader\\Sun\\saa";
                   String password = "xxxxx";
                   // Create empty properties
                   Properties props = new Properties();
                   props.put("mail.protocol.store","pop3");
                   // Get session
                   Session session = Session.getDefaultInstance(props, null);
                   Provider[] p = session.getProviders();
                   //for (int i=0;i<p.length;i++) System.out.println(p.getProtocol());
                   // Get the store
                   Store store = session.getStore("pop3");
                   store.connect(host, username, password);
                   // Get folder
                   Folder folder = store.getFolder("INBOX");
                   if (folder == null || !folder.exists()) {
                        //System.out.println("Invalid folder: " + folder.getName());
                        log.write("Invalid folder: " + folder.getName()) ;
                        System.exit(1);
                   folder.open(Folder.READ_WRITE);
                   //Get the number of Unread Messages
                   int count = folder.getUnreadMessageCount();
                   if (count == 0) { // No messages in the source folder
                        //System.out.println(folder.getName() + " is empty");
                        // Close folder, store and return
                        folder.close(false);
                        store.close();
                        return;
                   if (end == -1)
                        end = count;
                   // Get the message objects to copy
                   log.write("Test");
                   Message[] msgs = folder.getMessages(start, end);
                   //System.out.println("Moving " + msgs.length + " messages");
                   //log.write("Moving " + msgs.length + " messages") ;
                   if (msgs.length != 0) {
                        //If there is any mail
                        //System.out.println(msgs.length );
                        //read mail from server into files
                        MoveMessageTo saveFile = new MoveMessageTo(msgs);
                        if(saveFile.createdFile=true){
                             folder.setFlags(msgs,new Flags(Flags.Flag.SEEN),true);
                             //delete flag set here to remove the email from INBOX
                             folder.setFlags(msgs, new Flags(Flags.Flag.DELETED), true);
                        //folder.expunge(); //removes messages marked as deleted
                        //check for deleting messages
                        for (int i = 0; i < msgs.length; i++) {
                             if (!msgs[i].isSet(Flags.Flag.DELETED))
                                  log.write("Message # "+msgs[i]+" not deleted.");
                             //else System.out.println("Message "+i+"-is deleted") ;
                   // Close connection
                   folder.close(true);
                   // dfolder.close(false);
                   store.close();
                   //this.start() ;
              }catch (Exception ex) {
                   ex.printStackTrace() ;
              //this.t.start();
         public void start(){
              try {
                   while(this!= null){
                        this.run() ;
                        Thread.sleep(15000);//every 15 seconds
              }catch (Exception ex) {
                   ex.printStackTrace();
         public void exit(){
              this.exit();
              System.out.println("Exit");
         public static void main(String[] args) {
              SunMailConnection sunMail = new SunMailConnection();
    This is to show the messages
    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    public class msgshow {
    static String protocol;
    static String host = null;
    static String user = null;
    static String password = null;
    static String mbox = "INBOX";
    static String url = null;
    static int port = -1;
    static boolean verbose = false;
    static boolean debug = false;
    static boolean showStructure = false;
    static boolean showMessage = false;
    public static void main(String argv[]) {
         int msgnum = -1;
         int optind;
         protocol = "pop3";
         host="cyde-cehh-exh1";
         user="SunReader\\Sun\\saa";
         password="xxxxxx";
         mbox="INBOX";
         /*for (optind = 0; optind < argv.length; optind++) {
         if (argv[optind].equals("-T")) {
              protocol = argv[++optind];
         } else if (argv[optind].equals("-H")) {
              host = argv[++optind];
         } else if (argv[optind].equals("-U")) {
              user = argv[++optind];
         } else if (argv[optind].equals("-P")) {
              password = argv[++optind];
         } else if (argv[optind].equals("-v")) {
              verbose = true;
         } else if (argv[optind].equals("-D")) {
              debug = true;
         } else if (argv[optind].equals("-f")) {
              mbox = argv[++optind];
         } else if (argv[optind].equals("-L")) {
              url = argv[++optind];
         } else if (argv[optind].equals("-p")) {
              port = Integer.parseInt(argv[++optind]);
         } else if (argv[optind].equals("-s")) {
              showStructure = true;
         } else if (argv[optind].equals("-m")) {
              showMessage = true;
         } else if (argv[optind].equals("--")) {
              optind++;
              break;
         } else if (argv[optind].startsWith("-")) {
              System.out.println(
    "Usage: msgshow [-L url] [-T protocol] [-H host] [-p port] [-U user]");
              System.out.println(
    "\t[-P password] [-f mailbox] [msgnum] [-v] [-D] [-s]");
              System.out.println(
    "or msgshow -m [-v] [-D] [-s] < msg");
              System.exit(1);
         } else {
              break;
         try {
         // if (optind < argv.length)
         // msgnum = Integer.parseInt(argv[optind]);
              //msgnum = 5;
         // Get a Properties object
         Properties props = System.getProperties();
         // Get a Session object
         Session session = Session.getDefaultInstance(props, null);
         session.setDebug(debug);
         if (showMessage) {
              MimeMessage msg = new MimeMessage(session, System.in);
              dumpPart(msg);
              System.exit(0);
         // Get a Store object
         Store store = null;
         if (url != null) {
              URLName urln = new URLName(url);
              store = session.getStore(urln);
              store.connect();
         } else {
              if (protocol != null)
              store = session.getStore(protocol);
              else
              store = session.getStore();
              // Connect
              if (host != null || user != null || password != null)
              store.connect(host, port, user, password);
              else
              store.connect();
         // Open the Folder
         Folder folder = store.getDefaultFolder();
         if (folder == null) {
              System.out.println("No default folder");
              System.exit(1);
         folder = folder.getFolder(mbox);
         if (folder == null) {
              System.out.println("Invalid folder");
              System.exit(1);
         // try to open read/write and if that fails try read-only
         try {
              folder.open(Folder.READ_WRITE);
         } catch (MessagingException ex) {
              folder.open(Folder.READ_ONLY);
         int totalMessages = folder.getMessageCount();
         if (totalMessages == 0) {
              System.out.println("Empty folder");
              folder.close(false);
              store.close();
              System.exit(1);
         if (verbose) {
              int newMessages = folder.getNewMessageCount();
              System.out.println("Total messages = " + totalMessages);
              System.out.println("New messages = " + newMessages);
              System.out.println("-------------------------------");
         if (msgnum == -1) {
              // Attributes & Flags for all messages ..
              Message[] msgs = folder.getMessages();
              // Use a suitable FetchProfile
              FetchProfile fp = new FetchProfile();
              fp.add(FetchProfile.Item.ENVELOPE);
              fp.add(FetchProfile.Item.FLAGS);
              fp.add("X-Mailer");
              folder.fetch(msgs, fp);
              for (int i = 0; i < msgs.length; i++) {
              System.out.println("--------------------------");
              System.out.println("MESSAGE #" + (i + 1) + ":");
              dumpEnvelope(msgs[i]);
              // dumpPart(msgs[i]);
         } else {
              System.out.println("Getting message number: " + msgnum);
              Message m = null;
              try {
              m = folder.getMessage(msgnum);
              dumpPart(m);
              } catch (IndexOutOfBoundsException iex) {
              System.out.println("Message number out of range");
         folder.close(false);
         store.close();
         } catch (Exception ex) {
         System.out.println("Oops, got exception! " + ex.getMessage());
         ex.printStackTrace();
         System.exit(1);
         System.exit(0);
    public static void dumpPart(Part p) throws Exception {
         if (p instanceof Message)
         dumpEnvelope((Message)p);
         /** Dump input stream ..
         InputStream is = p.getInputStream();
         // If "is" is not already buffered, wrap a BufferedInputStream
         // around it.
         if (!(is instanceof BufferedInputStream))
         is = new BufferedInputStream(is);
         int c;
         while ((c = is.read()) != -1)
         System.out.write(c);
         pr("CONTENT-TYPE: " + p.getContentType());
         String filename = p.getFileName();
         if (filename != null)
         pr("FILENAME: " + filename);
         * Using isMimeType to determine the content type avoids
         * fetching the actual content data until we need it.
         if (p.isMimeType("text/plain")) {
         pr("This is plain text");
         pr("---------------------------");
         if (!showStructure)
              System.out.println((String)p.getContent());
         } else if (p.isMimeType("multipart/*")) {
         pr("This is a Multipart");
         pr("---------------------------");
         Multipart mp = (Multipart)p.getContent();
         level++;
         int count = mp.getCount();
         for (int i = 0; i < count; i++)
              dumpPart(mp.getBodyPart(i));
         level--;
         } else if (p.isMimeType("message/rfc822")) {
         pr("This is a Nested Message");
         pr("---------------------------");
         level++;
         dumpPart((Part)p.getContent());
         level--;
         } else if (!showStructure) {
         * If we actually want to see the data, and it's not a
         * MIME type we know, fetch it and check its Java type.
         Object o = p.getContent();
         if (o instanceof String) {
              pr("This is a string");
              pr("---------------------------");
              System.out.println((String)o);
         } else if (o instanceof InputStream) {
              pr("This is just an input stream");
              pr("---------------------------");
              InputStream is = (InputStream)o;
              int c;
              while ((c = is.read()) != -1)
              System.out.write(c);
         } else {
              pr("This is an unknown type");
              pr("---------------------------");
              pr(o.toString());
         } else {
         pr("This is an unknown type");
         pr("---------------------------");
    public static void dumpEnvelope(Message m) throws Exception {
         pr("This is the message envelope");
         pr("---------------------------");
         Address[] a;
         // FROM
         if ((a = m.getFrom()) != null) {
         for (int j = 0; j < a.length; j++)
              pr("FROM: " + a[j].toString());
         // TO
         if ((a = m.getRecipients(Message.RecipientType.TO)) != null) {
         for (int j = 0; j < a.length; j++)
              pr("TO: " + a[j].toString());
         // SUBJECT
         pr("SUBJECT: " + m.getSubject());
         // DATE
         Date d = m.getSentDate();
         pr("SendDate: " +
         (d != null ? d.toString() : "UNKNOWN"));
         // FLAGS
         Flags flags = m.getFlags();
         StringBuffer sb = new StringBuffer();
         Flags.Flag[] sf = flags.getSystemFlags(); // get the system flags
         boolean first = true;
         for (int i = 0; i < sf.length; i++) {
         String s;
         Flags.Flag f = sf[i];
         if (f == Flags.Flag.ANSWERED)
              s = "\\Answered";
         else if (f == Flags.Flag.DELETED)
              s = "\\Deleted";
         else if (f == Flags.Flag.DRAFT)
              s = "\\Draft";
         else if (f == Flags.Flag.FLAGGED)
              s = "\\Flagged";
         else if (f == Flags.Flag.RECENT)
              s = "\\Recent";
         else if (f == Flags.Flag.SEEN)
              s = "\\Seen";
         else
              continue;     // skip it
         if (first)
              first = false;
         else
              sb.append(' ');
         sb.append(s);
         String[] uf = flags.getUserFlags(); // get the user flag strings
         for (int i = 0; i < uf.length; i++) {
         if (first)
              first = false;
         else
              sb.append(' ');
         sb.append(uf[i]);
         pr("FLAGS: " + sb.toString());
         // X-MAILER
         String[] hdrs = m.getHeader("X-Mailer");
         if (hdrs != null)
         pr("X-Mailer: " + hdrs[0]);
         else
         pr("X-Mailer NOT available");
    static String indentStr = " ";
    static int level = 0;
    * Print a, possibly indented, string.
    public static void pr(String s) {
         if (showStructure)
         System.out.print(indentStr.substring(0, level * 2));
         System.out.println(s);
    This code is to move the message into a file
    import javax.mail.*;
    import com.sun.mail.pop3.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import java.util.*;
    import java.io.*;
    //This class copies the content of the received e-mail into files. The file names are given by
    //the urgent flag value and the subject
    public class MoveMessageTo {
         boolean createdFile = true;
         static final byte urgentFlagPos=13;
         public MoveMessageTo() {
         public MoveMessageTo(Message[] msgs) {
              if(msgs.length != 0)
              try {
                   for(int i = 0;i<msgs.length ;i++){
                        //Reads the content of the mail into an Object
                        Object currMultipart = msgs[i].getContent();
                        //converts this object into a String and then to a byte array, so we can read the urgnet flag
                        String content=(String)currMultipart;
                        byte[] testBytes=content.getBytes();
                        //The urgent flag is the first digit in the filename
                        StringBuffer fileName=new StringBuffer();
                        if (testBytes.length>urgentFlagPos)
                             fileName.append(new Byte(testBytes[urgentFlagPos]).toString());
                        //Then comes the subject of the e-mail
                        String mailSubject=msgs[i].getSubject();
                        if (mailSubject.length()>0)
                             fileName.append(mailSubject);
                        else fileName.append("noSubject");
                        fileName.append(".dat");
                        //create a directory to save the files
                        File baseDir = new File("c:/EMails/New");
                        baseDir.mkdirs();
                        //create file for with the subject as name
                        File eFile = new File(baseDir+"/"+fileName.toString());// creates a file by name of email subject
                        //Opening an stream for writting to the files
                        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(eFile));
                        ObjectOutputStream oos = new ObjectOutputStream(bos);
                        //Writing the message body to the file
                        oos.writeObject(currMultipart) ;
                        //Closing the stream
                        oos.flush() ;
                        oos.close() ;
                        createdFile = true;
              }catch (Exception ex) {
                   createdFile = false;
                   System.out.println("eFile is not created ");
                   ex.printStackTrace() ;
         public static void main(String[] args) {
              MoveMessageTo moveMessageTo1 = new MoveMessageTo();
    This code is if there is an error in reading a file it will write those error into the file
    import java.io.*;
    import javax.swing.*;
    import java.awt.Color;
    import javax.swing.border.*;
    //This class appends an error message to the log file
    public class ErrorLogWriter {
         //JPanel jPanel2 = new JPanel();
         //Border border1;
         String logDirectory="c:/EMails/log/";
         File errFile; //= new File(errDir+"/"+"errorLog.dat");
         //The constructor initializes the errFile given the filename
         public ErrorLogWriter(String fileName) {
              errFile=new File(logDirectory+fileName);
              /*try {
                   jbInit();
              }catch(Exception e) {
                   e.printStackTrace();
         public void write(String writeStr){
              try {
                   //Creates directory if doesn't exist
                   File errDir = new File(logDirectory);
                   errDir.mkdirs() ;
                   //If the directory exists...
                   if(errDir.isDirectory()){
                        //File errFile = new File(errDir+"/"+"errorLog.dat");
                        byte[] lastContent=new byte[0];
                        //If there is already a file with this name: Read its content so it can be preserved
                        if (errFile.exists()){
                             FileInputStream fis=new FileInputStream(errFile);
                             //Read everything into the byte array
                             lastContent=new byte[fis.available()];
                             fis.read(lastContent);
                        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(errFile));
                        PrintWriter oos = new PrintWriter(bos);
                        String newWriteString=new String(lastContent);
                        writeStr.trim() ;
                        //Appends the new string to the old content
                        newWriteString+=writeStr;
                        newWriteString+="\n";
                        //writes everthing back to the file
                        oos.write(newWriteString) ;
                        oos.flush();
                        oos.close();
              }catch (Exception ex) {
                   ex.printStackTrace() ;
         public static void main(String[] args) {
              ErrorLogWriter log = new ErrorLogWriter("logerror.log");
              log.write("Hello Log!") ;
    All these file are in one package called SunMail and i run this in jbuilder in 4.0 ,I get the following error
    eFile is not created
    java.lang.ClassCastException: javax.mail.internet.MimeMultipart
         at MoveMessageTo.<init>(MoveMessageTo.java:26)
         at SunMailConnection.run(SunMailConnection.java:86)
         at SunMailConnection.start(SunMailConnection.java:118)
         at SunMailConnection.<init>(SunMailConnection.java:21)
         at SunMailConnection.main(SunMailConnection.java:133)
    I know the it would be difficult if anyone could help me out it would be a great favour !!!
    pls help me out of this !!!!

  • Mail Receive from outside in Exchange server 2010 (Accepted Domain)

    Hello All
    Two Exchange 2010 server running existing environment. in front of two exchange server have McAfee firewall. This McAfee Firewall receive the mail from outside and send it to Exchange 2010 server.
    for example abc.com is working well to send and receive mail using exchange server. recently i have add
    Accepted Domain which is bcd.com.   But this Accepted Domain can not receive mail from outside. I have configure MX record, Accepted Domain and also mail point. but the problem is that mail cannot receive from outside
    domain. i have also several time modify the receive connector but abc.com work but bcd.com not work
    Please suggest.
    Error:
    firewall.abc.com rejected your message to the following email addresses:
    [email protected] ([email protected])
    firewall.abc.com gave this error:
    <[email protected]>... Relaying denied
    Your message wasn't delivered due to a permission or security issue. The address may only accept email from certain senders or another restriction may be preventing delivery. For more tips to resolve this issue see
    DSN code 5.7.1 in Exchange Online. If the problem continues contact your help desk.

    Have you checked the SMTP protocol log on the Exchange server? Do you see the 5xx status code in the log when a message is sent to the @bcd.com domain?
    If you see the 5xx status code for that domain, check the "Accepted domains" and verify that you didn't make any typos in the domain name. If it looks okay then stop and start the transport service on the Exchange servers and retest.
    If you don't see the 5xx status message for that domain you should check the machine firewall.bcd.com and verify that it's configured to accept e-mail for the @bcd.com domain. I'm guessing that the firewall.bcd.com machine is acting as a SMTP proxy and not
    as a SMTP relay. However, if there are SMTP log files on that machine you should check them and see which IP address is returning the 5xx status message.
    --- Rich Matheisen MCSE&I, Exchange MVP

  • Calendar/Mail not syncing via Microsoft Exchange server

    Hello...
    I know, I know. Not another Exchange server question....
    But here goes....
    I

    ****.... return button..
    My iTouch has all the right settings from my IT department who uses a Exchange 2003 server.
    User name, password, server is right - at least we think it's right.
    Once I try to get Mail on my iTouch, it comes up with a "Cannot Get Mail - the connection to the server failed' error.
    I'm actually trying to sync my Entourage Calendar mostly. All setting are right under the preferences in Entourage for syncing. And my iCal on my computer creates a mirror image of my Entourage calendar.
    I can sync up the Calendar through iTunes, but don't really want to do this. Would rather have this happen WiFi.
    Is there anything I'm missing?
    I've reset my setting on my iTouch too. Done all that...read all the discussions, articles...
    The only level that it stops me at is getting mail. The odd thing was yesterday it sent a couple of test emails I created last week. ODD!
    Trying to get at least 75% of the capability out of this great technology.
    Thanks,
    Adam

  • How to quickly recover from the broken Exchange Server VM due to Windows Update patch or Service Pack ?

    Folks,
    I'm planning to apply the Exchange Server 2010 Service Pack 3 and also applying the Cumulative Update 7 along with Windows Update which haven't been done since the past two years (~100+ patches).
    So in this case it I cannot afford to lose any of the Exchange Server due to the bad updates or broken server due to patches. At The moment all of the VMs currently running on VMware:
    HT/CAS role Windows NLB:
    PRODMAIL01-VM
    PRODMAIL02-VM
    Mailbox Server stand-alone non-DAG:
    PRODMBX01-VM
    PRODMBX02-VM
    Domain Controllers:
    PRODDC01
    PRODDC02
    My questions are:
    1. When taking the VMware snapshot for easy roll-back, do I have to take the entire 2 sets of the domain controller as well?
    2. Assuming I have done the Schema Update successfully and moving on to apply the SP3 to the HT/CAS server role, do I have to take both of the mailbox server VMs snapshot as well?
    3. Can I disconnect the virtual NIC inside the guest OS to safely take snapshot before applying the patches or service pack ? or do I have to let the network to be always connected during the Service Pack or CU patch process ?
    Any kind of suggestion for a better way to quickly roll back broken Exchange server due to patching would be greatly appreciated.
    Thanks,
    /* Server Support Specialist */

    not only not recommended, not supported:
    https://technet.microsoft.com/en-us/library/jj619301(v=exchg.150).aspx
    Some hypervisors include features for taking snapshots of virtual machines. Virtual machine snapshots capture the state of a virtual machine while it's running. This feature enables you to take multiple snapshots of a virtual machine and then revert the
    virtual machine to any of the previous states by applying a snapshot to the virtual machine. However, virtual machine snapshots aren't application aware, and using them can have unintended and unexpected consequences for a server application that maintains
    state data, such as Exchange. As a result, making virtual machine snapshots of an Exchange guest virtual machine isn't supported.
    The only supported way to recover a lost Server is gracefully through Setup either Add/Remove programs or recoverserver option
    https://technet.microsoft.com/en-us/library/dd876880(v=exchg.150).aspx
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • Can someone help with my Mail not working with my Microsoft Exchange server?

    I am trying to set up my Mail account. I am using the Microsoft Exchange server. I've been using Entourage, but wanted to switch to using the Mac's Mail. I used the same settings I had with Entourage, but with Mac Mail I'm getting this error: MFEWSErrorDomain error 56. From some of the other posts I saw, it seems as though no one has any answers, but I figured I'd ask anyway.

    There is no single cause of this problem and hence no single solution. There are several suggestions in this thread, if you haven't come across it, one of which might help:
    https://discussions.apple.com/thread/3953623?start=0&tstart=0
    Regards.

  • Microsoft Exchange server / OSX / Mail / entourage

    Just a quick question about this, as a friend of my Dad's has been giving him grief because he doesn't ever receive receipts that emails have been received / opened / read etc.
    As far as I know Apple Mail doesn't support Microsoft Exchange Server, but Entourage does - but is it as simple as my Dad using Entourage, or does it need to on a network using Microsoft Exchange Server?
    And if so, does this mean that two, common or garden home PC users using Windows Mail or Outlook wouldn't get email receipts from each other either?

    what would the situation be with two, bog standard home PCs using XP/Vista and Outlook Express/Windows Mail - would they generate and receive receipt notifications with each other?
    Windows Mail and Outlook Express both support receipts (do a web search to find more information and instructions). But they will get receipts only if the receiving email client supports them, so the recipient must also be running one of those two applications or one of the other rare email applications that does. And receipts in Internet-standard email really doesn't mean much; it may return even if the email is selected, or, as is apparently the case with both Outlook Express and Windows Mail, the recipient can disallow sending back the receipt which if true rather defeats the purpose.
    where does the Microsoft Exchange Server come into it, which was what I thought powered these?
    It may or may not. Both Outlook Express and Windows Mail are standard email applications and work with any standard email server. If the ISP/company/organization is using Exchange and has it set up for POP and/or IMAP, you can use any email application with the server including OE or Windows Mail. But you don't get any of the features an Exchange Server provides: shared calendaring, "real" delivery/read receipts (ones the user can't disallow), etc. For those you must use Outlook.

  • Microsoft Exchange Server.  Possible to erase from PC server if incorrect settings at home?

    Is it possible to erase e-mail off of a Microsoft Exchange server if you have the wrong settings check on Mac Mail at home? 
    I have auto discover checked.  I'm missing 2 weeks of SENT mail but 3 weeks and several months before that are still showing.  Noticed under MacMail/Preferences/MailBehaviors/Store Sent Mail box checked on Mac laptop/desktop BUT drop down underneat that "delete messages when" was clicked to either one week old or one month old.  Wouldn't they still remain on the server because of auto discover (or is auto discover just for settings how the mail flows back and forth)?  Assumming that drop down menu box was incorrect, it still doesn't explain why sent e-mail prior to 2 weeks ago (about 3 months worth of mail in my sent folder) remains on all devices.  Does mailbox behavior effect the server?  I'd think it only effects whatever device it is on and what we have set on our servers from Exchange is dictactes?  The desktop had the same drop down marked "never".  This is the first time I've experienced any problems.   I know some kind of a Microsoft update was performed at the office over the weekend.
    No one else uses Mac but myself at home.  Not using iCloud at this time (removed as we had this new server installed in March).

    Hi Somya,
    Looks like you are deep into Information Broadcasting. I am sure you must have seen this, still sharing with you -
    SAP Notes -
    875136 - Node ID is missing in the status message for RFC connection
    455140 - Configuration E-mail, fax, paging/SMS via SMTP 
    regards
    Vikash

  • What are the /rpc/ and /ews/ folders used for in Microsoft Exchange Server?

    I come across these two folders constantly when seeing the Microsoft Exchange server externally (other folders are usually /owa/, /powershell/ and /ecp/.
    I've looked everywhere online I can think of but cannot find an easy-to-understand description that clearly understands it.
    I notice that both folders are blocked by login boxes which are usually either Basic or NTLM authentication, why is this? Should they be hidden completely from external access?
    Any help will be much appreciated, this is also my first post so apologies for any conventions I've missed. 

    More information here
    http://blogs.msdn.com/b/mvpawardprogram/archive/2013/03/18/virtual-directories-exchange-2013.aspx
    http://technet.microsoft.com/en-us/library/gg247612(v=exchg.150).aspx
    DJ Grijalva | MCITP: EMA 2007/2010 SPA 2010 | www.persistentcerebro.com

  • IPhone 6 setup in Microsoft Exchange Server

    Currently there is one cell phone in our office set-up on the
    Microsoft Exchange Server.  It can receive e-mails but cannot always send e-mails from the cell phone.  Recently, we tried setting-up an iPhone
    6 with the Microsoft Exchange Server and it can send an e-mail from the iPhone; but cannot receive e-mails on the iPhone. Also, the e-mails sent from the iPhone, do not show-up on the user's desktop.  Please
    help.<o:p></o:p>

    Regarding the one that can't send, what happens when they try?
    Regarding the one that doesn't show up in the desktop machine, what client is in use on the desktop machine, what version and service pack, and how is it configured to connect?
    And what version, service pack and rollup or cumulative update is installed on the Exchange server?
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • Microsoft Exchange server and Mailbox box prompt after migration

    We are getting prompted to click OK when we open Outlook on the Microsoft Exchange server and Mailbox dialog box.
    We just migrated from 2007 exchange to 2013 exchange and the people with windows 7 seem to be able to access exchange through outlook 2010 without getting prompted.  Also people who are getting prompted are not able to access public folders and our
    XP.  Those using windows 7 can access public folders.

    Hi,
    From your description, I would like to clarify the following thing:
    Windows XP does not like msstd:*.domain and must use msstd:server.domain instead.
    So I recommend you set this by updating the CertificateName via EMS.
    1. If you use a wildcard certificate, please run the following cmdlet:
    Set-OutlookProvider EXPR –CertPrincipalName msstd:*.contoso.com
    2. If not please run the Set-OutlookProvider EXPR –CertPrincipalName msstd:$null cmdlet. Once done, repair Outlook profiles and check results.
    Besides, when there is a Windows XP user, we recommend SAN certificate not wildcard certificate.
    Hope my clarification is helpful.
    If there are any problems, please feel free to let me know.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

  • How do I find out my Microsoft Exchange Server name (I overwrote it by mistake!) for using Outlook

    While trying to associate an email account with the Outlook account on my personal laptop I inadvertently overwrote the Microsoft Exchange Server name on the screen.  I am now unable to get into Outlook at all.  Can anyone advise how I can find
    it?Any help appreciated
    Cheers Dave
      

    Hi Dave,
    You need to type the server name that was assigned by your mail administrator for the server running Exchange. So please ask your administrator for the Server name. Thanks for your understanding.
    For more information, here is an article for your reference.
    Add or remove an e-mail account
    https://support.office.com/en-ca/article/Add-or-remove-an-e-mail-account-ff7c7735-6117-4b0d-aef6-8aa8a072f60f
    Hope this can be helpful to you.
    Best regards,
    Amy Wang
    TechNet Community Support

  • 1st Generation iPhone-Microsoft Exchange Server

    Hi-
    I have a first generation iPhone and want to use the Microsoft Exchange Server to download my work email and calendar. I have tried several times going through the process of entering email address, log in, password, domain, and sever. Each time I get an error message that says 'exchange account verification failed'. I have walked through this with 2 other people on their 3G iPhones and it works perfectly. Am I having trouble with this because I'm using the 1st Generation iPhone? Any assistance or troubleshooting with this would be awesome!
    Thanks!

    What version of the iPhone OS are you running? Check Settings > General > About. MS Exchange support is not available on pre-v2.0 versions. Original iPhones running v2.x are able to connect to MS Exchange servers (assuming the server is set to allow that access, which in your case since other iPhones are accessing it, it seems to be).

Maybe you are looking for

  • Creating a view

    Hi, I am creating a view on two tables(CDPOS and CDHDR) with certain join conditions. While activating the view, a get an error "Table CDPOS is not transparent" Kindly help on this. With Thanks and Regards Mukul

  • Dreamweaver Flash Media Skins

    Is there a way to select external skins for Flash media in Dreamweaver? In Dreamweaver 8, I only have the selection of 3 different kind of skins...all internal to the video. Does anyone know a solution to this? Thank you.

  • Oracle BAM KPI purgin scripts

    Hello I am new to BAM (business Activity Monitoring). I am trying to do purging of data objects using i command/ or icommand webservice. Can some one please let me know how to do a step by step to do the purging, I am new to scripting can you please

  • Can You Help with an iWeb Nav Bar Not Displaying Problem?

    Hi Everyone, I have had a website that I created with iWeb and have successfully hosted with me.com (Mobile Me) for the past 8 months. I added a new page yesterday and ever since then, the Nav Bar has stopped appearing on any browser. This happens on

  • Using a HTTP destination through a HTTP proxy

    Hi there! I have written a Web Dynpro application that connects to a web service using a web service model. The request is configured to use a HTTP destination by means of the _setHTTPDestinationName() method. I configured the HTTP destination in the