Mail "Delete'" pref. won't 'stick'

I use an iCloud email account on two Macs, an iPad & iPhone 5. On all devices, I have the preference for 'Remove deleted messages' set to "Never". I was surprised yesterday to see that I had no messages older than one week in the trash. I checked each device and found that, on the iPhone, the preference had changed to "after one week". All other devices still said "never". I didn't change the preference on the iPhone, but I realise that, if one device is set to delete the messages, then they're gone from the server, and therefore all other devices.
On the iPhone, I changed the preference back to "never". I checked it again this morning, and it had again changed to "after one week"! I again changed it to "never", closed the Settings app then re-opened it and checked that the preference was still set to "after one week", and it was, so I closed Settings again, and this time forced it to quit before restarting it. When I checked the preference it had again reverted to "after one week".
Restarting the phone and resetting the phone also both have the same effect, i.e. any time the Settings app restarts, the preference for 'Remove deleted messages' is set to "after one week".
I use the Trash in Mail the same was as the Finder trash: I expect to be able to find things in there until I empty the trash, and this problem has caused me to lose some messages I wanted to refer back to.
Does anyone know why just this one device won't allow me to store deleted mail messages on the server indefinitely?
Thanks in advance,
Steve  = : ^ )

Wow, very cool, thank you!
You literally have to make an edit, with a clip In/Out duration different from your Sequence In/Out duration, select an option (I would choose Ignore Source Out Point) and select to Always Use this Choice, only then will the Preference change.
So, once I've made this choice (which was the default in FCP) is there any way to perform a Fit to Fill without resetting the preference?

Similar Messages

  • System Prefs won't stick

    I have a couple of Mac G-5 towers that have annoying quirks in the OS that I wonder if someone can help me solve. Both of them are running Leopard 10.5.8. One of the Macs has two hard drives in it, which I named A and B. I do all my work with Drive A, and it is assigned as the startup disk. I keep an OS on Drive B so that I can start up with it and use it to repair A if I ever have to.
    So Disk A is assigned as the startup disk (and I clicked the little lock icon shut), but about half the time, when I start up the Mac, it will select Disk B to start up with. When that happens, I have to go to the system Preferences and choose A all over again, even though it is already shown as the startup disk. On the restart, it will usually start up correctly with A. But couple of startups later, the computer goes back to choosing Drive B as the startup disk again. This is getting tiresome. Short of throwing the System folder off of Drive B, how can I force this Mac to always use A as the startup disk?
    Mac G-5 #2 also has an annoying habit: after I arrange a folder's window the way I want with the View Options, the next time the Mac starts up, the windows go back to the way they were before. For example, in the View Options, I set a folder's window to arrange items by Name, to show the icons at a large size, and to Show Info for the items in the folder. But the next time I open that folder, the icons have all gone back to the way they were before: tiny icons randomly scattered all over the window, with no info shown. How can I make these folder windows stay the way I set them?
    I tried Disk Utility's "Repair Permissions" and "Repair Disk" on these drives, but these quirks persist. Is there any way to make a Mac stick to the assigned startup disk and window arrangements?

    Hi Tom,
    On the startup...
    Might be time to replace the PRAM Battery, 4 years is close to their lifespan, far less if ever without AC power, & can cause strange startup problems...
    See which one your G5 has...
    http://eshop.macsales.com/item/Newer%20Technology/CR2032/ 
    http://eshop.macsales.com/item/Newer%20Technology/BAA36VPRAM/
    On #2's issue...
    Safe Boot , (holding Shift key down at bootup), use Disk Utility from there to Repair Permissions, test if things work OK in Safe Mode.
    Then move these files to the Desktop for now...
    /Users/YourUserName/Library/Preferences/com.apple.finder.plist
    /Users/YourUserName/Library/Preferences/com.apple.systempreferences.plist
    /Users/YourUserName/Library/Preferences/com.apple.desktop.plist
    /Users/YourUserName/Library/Preferences/com.apple.recentitems.plist
    Reboot & test.
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.

  • Column order in Mail (or From column won't stick)

    Not my first post about this, but thought I'd try again. Back in January I was asking if anyone else had the issue where the From column just won't stay on the left side. I like From, Subject, Date, To. But one way or another, the From column jumps over to the left of To. ALL THE TIME.
    Anyway, I switched to Entourage and have been using it for 8 months. But I was missing some Apple-gui-goodness and thought I'd try Mail again.
    One day has passed, same problem.
    So I know there's at least a few of you with this problem, but now my question is this - does not -everyone- have this problem, or just nobody else cares? Do YOU have this issue, and if so, why are you not pulling your hair out?
    It's also during research like this when I see just how inaccessible Apple support really is. I've bought Applecare on every Mac I've ever owned, yet I just can't bring myself to spend an hour with someone on the phone with a...uhhh....well, an accent I have trouble understanding. Not to mention the mind-numbing-madness of rebooting, deleting prefs, root user, blah blah blah. I've tried it all.
    Maybe I just needed to vent.
    I'm going back to Entourage, because Mail is still a POS (it's Junk filtering is basically worthless as well, compared to Entourage, but I'd live with it if the stinking columns would stay put).
    But please tell me, how is it that there's not thousands of people screaming and complaining about this? Am I just one of the cursed????? Sigh.
    Quadcore G5 2.5Ghz   Mac OS X (10.4.7)   ENTOURAGE USER. AGAIN.

    JF, I did understand you. It seems you've misunderstood me, though.
    My desired arrangement:
    FROM / SUBJECT / DATE / TO
    And that's what I've been using these 4 days without a hitch. My preferred arrangement is this:
    Subject / From / To / Date
    move on if you wish, I was kind of hoping for some fresh
    insight - nothing personal
    It seems you missed the smiley. I'm willing to figure out what's going on here, and that's the reason I've been trying to reproduce the problem. But I can't, that's all. I'm just wondering whether, according to your observations, I should leave the settings that way a few more days before giving up.
    Also note that the -only- other column visible is the 'dot'
    column (message status?) that you can't remove anyway.
    In my case, I also have visible (both before and after making the change) Flags on the left and Size / Attachments on the right, i.e. my preferred arrangement is this:
    Flags / Read Status / Subject / From / To / Date / Size / Attachments
    What I've been using the last 4 days (and am still using) is this:
    Flags / Read Status / From / Subject / Date / To / Size / Attachments
    I clicked on the 'Drafts' mailbox, then back to the Inbox
    Just tried it. No change. Your preferred arrangement sticks for me no matter what...

  • Gmail won't open in Firefox (and I've already reset it and deleted prefs.js)

    Gmail won't open in Firefox. I get this error:
    The page isn't redirecting properly
    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    Steps I've taken:
    1) Reset Firefox preferences
    2) Deleted prefs.js
    Help!

    If clearing cookies doesn't work then it is possible that the <i>cookies.sqlite</i> file that stores the cookies is corrupted.
    Rename (or delete) <b>cookies.sqlite</b> (cookies.sqlite.old) and delete other present cookie files like <b>cookies.sqlite-journal</b> in the Firefox profile folder in case the file cookies.sqlite got corrupted.
    *http://kb.mozillazine.org/Cookies
    *https://support.mozilla.org/kb/Deleting+cookies

  • Mail settings won't stick, how to fix?

    The column settings in Mail suddenly won't stick. Probably a corrupt preference? What's the best way to deal with the problem?
    Thanks,
    iHope

    Well, in theory, if we backup the whole shmeer, we can at least go back to where we are now...
    Quit Mail. First I'd backup these two Mail folders, by right clicking on them in the Finder, then choose Archive/Compress.
    Users/YourUserName/Library/Mail
    Users/YourUserName/Library/Mail Downloads
    Right click on that Mail folder, choose archive, you'll get everything in the folder, and the folder itself in a file called Mail.zip, move it to a safe place, same for the Mail Downloads folder... only the plist is separate.
    Try dragging this file to the desktop in case we need to put it back later...
    /Users/YourUserName/Library/Preferences/com.apple.mail.plist
    (May or may not require you to setup your account(s) again.)
    Then In your home folder, try moving this +folder & file+ to the Desktop then reboot...
    First, Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, then move these +folder & file+ to the Desktop.
    Move this Folder to the Desktop...
    /Users/YourUserName/Library/Caches/Mail/
    Move this file to the Desktop...
    /Users/YourUserName/Library/Mail/Envelope Index
    These too...
    /Users/YourUserName/Library/Mail/<[email protected]>/.mboxCache.plist
    /Users/YourUserName/Library/Mail/Mailboxes/.mboxCache.plist
    Reboot.

  • "Show Script menu in menu bar" setting won't stick

    Hi all,
    I'm starting some Applescript development, and I'd like to make some scripts available in the Scripts menu. I checked the box to "Show Script menu in menu bar" from within the prefs for AppleScript Editor, but it doesn't work. When I close AppleScript Editor, relaunch it, and look at the prefs again, the box is unchecked. I deleted the relevant preference files from my Library and recreated them by launching AppleScript Editor, but the setting just won't stick.
    Any ideas?
    -Tim

    Taylor,
    The preference that I'm looking at is within AppleScript Editor, the program I use to write new AppleScripts. Script Editor was the previous name of the same application. When I check the "Show Script menu in menu bar" in the AppleScript Editor prefs and close with window. The box is unchecked the next time I open the AppleScript Editor application, and the Script menu never appears in my menu bar. Everything works fine on my iMac at home. The problem seems to be isolated to my MBP. Weird.
    -Tim

  • Updated my mac to mountain lion 10.8.3 and now my app store, mail or facetime won't open. Also, I am not longer able to play videos through firefox. I tried downloading the combo for mountain lion and it refuses to install? Can anyone help me?

    updated my mac to mountain lion 10.7.8.3 and now my app store, mail or facetime won't open. Also, I am not longer able to play videos through firefox. I tried downloading the combo for mountain lion and it refuses to install saying that I need to see developer. Whenever I try to open my appstore, mail or facetime it says that the programmes need to be installed and might not be compatible with this version of mac operating system. Can anyone help me?

    It's not a bad install of Mountain Lion. I've had the same thing happen to me, but it affected not only Mail, but a variety of other programs including iPhoto and MS Office, where I had to delete preferences, caches, and reinstall the OS as well as the program itself. I'm still having issues with Mail, so I've gone to another program.
    Everything was fine upon the initial install. I restarted my iMac about two weeks after the install, and that's when the issues began to happen. I've reinstalled Mountain Lion twice, but the same issues arise.
    As I mentioned above, you'll need to figure out which preferences are causing the issue, then reinstall the program, as a fresh reinstallation will do you no good unless you wipe the drive completely.
    Here's a thread that helped me with iPhoto:
    https://discussions.apple.com/thread/4794375?start=0&tstart=0

  • Problem in Mail deletion in POP3

    Hi
    I am using Pop3.
    I opened folder using
    folder.open (Folder.READ_WRITE);
    setting flag for deletion
    mimeMessages.setFlag (Flags.Flag.DELETED, true);
    then in finally block closing the folder
    if (mailbox.isConnected ()) {
    if(folder != null && folder.isOpen()) {
    try {
    folder.close (true);
    sometimes it is not deleting the messages.
    Please suggest something.
    Thanks
    Atal

    I am sorry but what do u mean by this? can u please explain in detail.
    actually most of times it works fine but in few cases mail deletion is failing.
    In my code: after folder.close (true); I just take a dump that comes successfully.
    The MailBox folder has been closed after deleting the ToBeDeleted Mails, if any, by folder.close method.
    MessageId of 1 th message which has been marked for Deletion : 1150475083.23686.prod-util-1.aspdeploy.com,S=57857
    MessageId of 2 th message which has been marked for Deletion : 1150475117.23813.prod-util-1.aspdeploy.com,S=6808
    MessageId of 3 th message which has been marked for Deletion : 1150475120.23818.prod-util-1.aspdeploy.com,S=9425
    MessageId of 4 th message which has been marked for Deletion : 1150475140.23852.prod-util-1.aspdeploy.com,S=6121
    these 4 messages were marked for deletion.
    then close called. after
    The MailBox folder has been closed after deleting the ToBeDeleted Mails, if any, by folder.close method.
    message, it again tries to retrieve the folder with messages
    Retrieving messages for mailbox ..
    MessageId of the: 1 th message is 1150475083.23686.prod-util-1.aspdeploy.com,S=57857
    MessageId of the: 2 th message is 1150475117.23813.prod-util-1.aspdeploy.com,S=6808
    MessageId of the: 3 th message is 1150475120.23818.prod-util-1.aspdeploy.com,S=9425
    MessageId of the: 4 th message is 1150475140.23852.prod-util-1.aspdeploy.com,S=6121
    MessageId of the: 5 th message is 1150475338.13255.prod-util-2.aspdeploy.com,S=7458
    MessageId of the: 6 th message is 1150475387.13339.prod-util-2.aspdeploy.com,S=6394
    MessageId of the: 7 th message is 1150475393.13357.prod-util-2.aspdeploy.com,S=59238
    MessageId of the: 8 th message is 1150475553.13615.prod-util-2.aspdeploy.com,S=86236
    first 4 messages are same which were not deleted.
    I have just attached the code. If you want to have a look then plz.
    thanks
    atal
    package com.deploy.email;
    import com.baltimore.jpkiplus.vaults.Vault;
    import com.baltimore.jpkiplus.x509.JCRYPTO_X509Certificate;
    import com.baltimore.jsmt.smime.JSMTException;
    import com.baltimore.jsmt.smime.SMIMEv2;
    import com.deploy.email.api.EmailException;
    import com.deploy.email.api.InitException;
    import com.deploy.email.api.ReceivedMessage;
    import com.deploy.email.config.LogicalMailboxConfiguration;
    import com.deploy.email.config.MailConfiguration;
    import com.deploy.email.config.PhysicalMailboxConfiguration;
    import com.deploy.email.util.SecureEmailHelper;
    import com.sun.mail.pop3.POP3Folder;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.BufferedReader;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.util.ArrayList;
    import java.util.Enumeration;
    import java.util.HashMap;
    import java.util.List;
    import java.util.Vector;
    import javax.mail.Address;
    import javax.mail.AuthenticationFailedException;
    import javax.mail.Flags;
    import javax.mail.Folder;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Part;
    import javax.mail.Store;
    import javax.mail.UIDFolder;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import javax.naming.NamingException;
    import org.apache.log4j.Logger;
    * This class spawns a thread for each mailbox and pulls messages from those mailboxes at a specified interval.
    * Use start to initialize and stop to end the threads
    * Bug Fixes
    * - 8399 Broke out the mailServer into two separate potential servers; sendMailServer and receiveMailServer
    * This class was updated to reflect the receiveMailServer setting
    * 04/25/03 John Gemski
    * - 10619 Added support for the Lotus Notes Client as per the 3.x fix. Copied logic from 3.x as detailed
    * by Hari in the bug report
    * 08/13/03 John Gemski
    * - Added Email Client Calendaring support - John Gemski 10/21/2003
    * @see com.deploy.email.EmailChannel
    public class RetrieveMail implements Runnable {
    /** Used to tell the threads when to stop */
    private static boolean keepRunning=true;
    //anish For nationwide
    private int maximumsizeofinbox=-1;
    /** The messages on the mail server that have been pulled but not deleted */
    private HashMap messagesOnServer;
    /** These are the mailbox types. Will only be one here for the Azetra impl */
    private static List logicalMailboxes;
    /** The list of running threads. Need to be tracked so they can be interrupted upon stop */
    private static ArrayList receiveThreads;
    /** A reference to the EmailChannel object, which may contain updated information. */
    private static EmailChannel emailChannel = EmailChannel.getInstance();
    private static Logger log = Logger.getLogger(EmailChannel.LOGGER_MODULE_NAME);
    // Thread variables
    /** the configuration for the physical mailbox from which the emails are being pulled. */
    private PhysicalMailboxConfiguration tPhysicalMailbox;
    /** the logical type (OLJB, ScanWorld, Task Response, Resume) that the physical mailbox thread is pulling for */
    private String tLogicalType;
    /** JavaMail Store */
    private Store mailbox;
    // Acceptable Protocols to retrieve mail from the mail server.
    public static final int RECEIVE_MAIL_PROTOCOL_POP3 = 0;
    public static final int RECEIVE_MAIL_PROTOCOL_IMAP = 1;
    public static final int NUM_RECEIVE_MAIL_PROTOCOLS = 2;
    public static String [] RECEIVE_MAIL_PROTOCOL_NAME;
    /** Indicates whether or not the Secure Email feature is enabled. */
    private static boolean secureEmailEnabled =false;
    static {
    RECEIVE_MAIL_PROTOCOL_NAME = new String [NUM_RECEIVE_MAIL_PROTOCOLS];
    RECEIVE_MAIL_PROTOCOL_NAME [RECEIVE_MAIL_PROTOCOL_POP3] = "pop3";
    RECEIVE_MAIL_PROTOCOL_NAME [RECEIVE_MAIL_PROTOCOL_IMAP] = "imap";
    // FIX for socket hang issue (FIX PR 14253) while processing the mail
    public static final String SOCKET_READ_ERROR = "No inputstream from datasource";
    /** Constructor for new RetrieveMail thread.
    * @param phys_config the mailbox configuration for a specific physical mailbox (i.e. [email protected])
    * @param logical_type the logical type for this mailbox ("Resumes", "OLJB", "ScanWorld", or "TaskResponse")
    private RetrieveMail(PhysicalMailboxConfiguration phys_config, String logical_type) {
    this.tPhysicalMailbox = phys_config;
    this.tLogicalType = logical_type;
    * Retrieve email messages from a mail server for the particular physical mailbox indicated with the thread
    * @throws EmailException if any fatal error occurs with the retrieval or processing of the incoming emails
    private void retrieveMessages () throws EmailException {
    Vector msgVector = new Vector ();
    Vector deleteMsgVector = new Vector ();
    ReceivedMessage [] recMessages;
    MailConfiguration mailConfig = emailChannel.getMailConfiguration();
    long maxReceivedEmailSize = mailConfig.getMaximumReceiveSize();
    //Anish for Bug 20366 for Nationwide Patch 06
    maximumsizeofinbox = mailConfig.getMaximumsizeofinbox();
    // Synchronize on the mailbox object for the mailbox from which we
    // are going to retrieve messages. We don't want more than one
    // thread connected to a mailbox at a time, but we don't want to
    // prevent multiple different threads from being connected to
    // multiple different mailboxes simultaneously.
    synchronized (mailbox) {
    boolean throwingException = false;
    Folder folder = null;
    try {
    /* Fix for 8399 - use the getReceiveMailServer call instead of the
    * getMailServer call
    // Connect to the server for receiving mail.
    mailbox.connect (mailConfig.getReceiveMailServer(),
    tPhysicalMailbox.getMailboxName(),
    tPhysicalMailbox.getMailboxPassword());
    // We are only interested in the "INBOX" folder.
    folder = mailbox.getFolder ("INBOX");
    // Open with write permissions as well, so we can delete messages from the server
    folder.open (Folder.READ_WRITE);
    // Anish for Bug 20366 for Nationwide Patch 06
    //int numMessages = folder.getMessageCount ();
    int numMessages1 = folder.getMessageCount ();
    int numMessages = 0;
    //log.info("Anish123 " + maximumsizeofinbox);
    if (maximumsizeofinbox < 0)
    numMessages = numMessages1;
    else
              if (numMessages1 > maximumsizeofinbox) {
              numMessages = maximumsizeofinbox;
              //log.info("Anish try 1 " + numMessages1);
              else {
              numMessages = numMessages1;
              //log.info("Anish try 2 " + numMessages);
    //     log.info("Anish try 4 " + numMessages);
    // End by anish
    if (numMessages > 0) { // There are messages to retrieve
    Message [] messagesRaw = folder.getMessages ();
    // We need to cast the messages to MIME message objects so
    // that we can access some MIME message-specific functionality.
    MimeMessage [] mimeMessages = new MimeMessage [numMessages];
    for (int i = 0; i < numMessages; i++) {
    mimeMessages = (MimeMessage) messagesRaw [i];
    // We can only get messages totalling maxReceivedMessageSize bytes.
    // Calculate how many messages we may get and still stay under the limit.
    int numMessagesToRetrieve = 0;
    int i = 0;
    if( maxReceivedEmailSize > 0) {
    int totalSize = 0;
    numMessagesToRetrieve = 0;
    boolean reachedLimit = false;
    while ((i < numMessages) && !reachedLimit) {
    int messageSize = mimeMessages[i].getSize ();
    int newTotalSize = totalSize + messageSize;
    if (newTotalSize > maxReceivedEmailSize) {
    //if this is the first message then break out and process it
    if( i == 0 ) {
    i++;
    totalSize = newTotalSize;
    reachedLimit = true;
    else {
    totalSize = newTotalSize;
    i++;
    numMessagesToRetrieve = i;
    i = 0;
    else {
    numMessagesToRetrieve = mimeMessages.length;
    while( i < numMessagesToRetrieve )
    boolean gotMessage = false;
    String uniqueID = null;
    if( numMessagesToRetrieve > 0 ) {
    // Get the ID for the message
    uniqueID = getUniqueID (mimeMessages[i], folder);
    //By Anurag for Req#2907 to add Debugging Logs start
    log.info("MessageId of the: " + (i+1) + " th message is " + uniqueID);
    //By Anurag for Req#2907 to add Debugging Logs End
    // Check if we have previoiusly retrieved this message.
    Object value = messagesOnServer.get (uniqueID);
    gotMessage = (value != null);
    if (!gotMessage) { // Make sure message is filled in.
    boolean processMessage = true;
    try {
    if(secureEmailEnabled) {
    ByteArrayOutputStream os = new ByteArrayOutputStream();
    mimeMessages[i].writeTo(os);
    InternetAddress[] senders = (InternetAddress[])mimeMessages[i].getFrom();
    InternetAddress[] recipients = (InternetAddress[])mimeMessages[i].getRecipients (Message.RecipientType.TO);
    Exception lastException = null;
    Vault v = null;
    for (int countRecipients = 0; countRecipients < recipients.length; countRecipients++) {
    lastException = null;
    v = null;
    // try to get the recipient's address from the Vault hash table
    log.info("Trying to get Vault for address: " + recipients[countRecipients].getAddress ());
    v = SecureEmailHelper.getVault (recipients[countRecipients].getAddress ());
    // we can't decrypt if we don't have a private key from the vault!
    if (v == null) {
    log.info("The PFX file for the email account: " + recipients[countRecipients].getAddress () + " is not found or invalid. Please correct.");
    lastException = new EmailException(EmailException.REASON_UNKNOWN, "The PFX file for the email account: " + recipients[countRecipients].getAddress () + " is not found or invalid. Please correct.");
    else {
    break;
    // if we came out with all exceptions, throw the last one we received.
    if (lastException != null) {
    log.error(lastException.getMessage(), lastException);
    throw lastException;
    SMIMEv2 smimer = new SMIMEv2(v);
    // Set up input and output streams to read an S/MIME message
    byte[] originalMessageBytes = os.toByteArray();
    String origMessStr = new String(originalMessageBytes);
    // The SMIMEv2 can't handle extra characters.
    // Noticed that messages contained an "+OK", which was causing problems
    // removed the entire line
    if(origMessStr.startsWith("+OK")) {
    int index = origMessStr.indexOf("\n");
    origMessStr = origMessStr.substring(index+1);
    byte[] revMessageStr = origMessStr.getBytes();
    ByteArrayInputStream input_source = new ByteArrayInputStream(revMessageStr);
    ByteArrayOutputStream output_sink = null;
    boolean smimeRecognized=true;
    boolean wasSigned=false;
    boolean wasEncrypted=false;
    // Making changes to reflect Baltimore's suggestion about layers
    ByteArrayInputStream newMessage = null;
    boolean done=false;
    // According to Baltimore, there can be two layers of encryption
    // inner and outer. It could be encrypted & signed, with it being either
    // encrypted on the outer layer and signed on the inner, or vice versa.
    // We want to ensure that this loop breaks out after either
    // 1. there were 2 layers sign/encrypted or encrypted/signed
    // 2. there was an error
    int layers=0;
    while(!done && layers < 2) {
    output_sink = new ByteArrayOutputStream();
    layers++;
         try {
    // This step must be don't before any cryptographic operations. It lets the SMIMEv2 class
    // figure out what it has as an input and where to place the output
    smimer.attachStreams(input_source, true, output_sink, false, false);
    catch (JSMTException jse) {
    // This is common since unencrypted and unsigned data cannot perform this function
    // Ideally, Baltimore says to use the type SMIMEv2.TYPE_DATA, but it never gets this
    // far since this fails.
    // We will skip the attempts to decrypt/verify the signature, since we know we won't
    // be able to interpret what type of message it is.
    smimeRecognized=false;
    // Will only be one layer
    done=true;
         log.debug("SMIME recognized: " + smimeRecognized);
    if(smimeRecognized) {
    // Get the S/MIME message type
    int nextdata = smimer.getMessageType();
    log.info("SMIME message type: " + nextdata);
    if (nextdata == smimer.TYPE_SIGNED) { // Signed message
    wasSigned=true;
    boolean matchedSender = false;
    // Didn't know you could have multiple "from" in an email address
    // Right now, only one of the "froms" has to have a certificate
    for(int s=0; s < senders.length; s++) {
    // get the sender's address
    String from_sender = senders[s].getAddress();
    try {
    // retrieve the certificates from the LDAP
    JCRYPTO_X509Certificate[] senderCerts = null;
    senderCerts = SecureEmailHelper.getCertificatesFromLDAP(from_sender);
    if(senderCerts!=null) {
    // verify() needs to take in a chain of certificates
    com.baltimore.jsmt.pkcs7.CertificateChain cc= new com.baltimore.jsmt.pkcs7.CertificateChain();
    // create certificate chain
    for(int k=0; k < senderCerts.length; k++) {
    cc.addCertificate(senderCerts[k]);
    // verify the Certificate Chain against the message's certs
    if(smimer.verify(cc)) {
    // found a match, the message was verified
    matchedSender=true;
    break;
    else
    log.error("Could not verify the sender" + from_sender);
    done=true;
    catch(NamingException ne) {
    log.error("There was a problem connecting to the LDAP for " + from_sender,ne);
    done=true;
    // if none of the senders matched, we need to not process
    // the email message, since it will be unreadable
    if(!matchedSender) {
    StringBuffer sendString = new StringBuffer();
    for(int s=0; s < senders.length; s++) {
    String from_sender = senders[s].getAddress();
    sendString.append(" : " );
    sendString.append(from_sender);
    processMessage = false;
    log.error("Could not find certificate for any of the senders" + sendString.toString());
    done=true;
    else if (nextdata == smimer.TYPE_ENVELOPED) { // Encrypted message
    log.debug("SMIME Encrypted message!");
    wasEncrypted = true;
    try {
    log.debug("SMIME Decrypting message...");
    // Decrypts the message
    smimer.openEnvelope();
    catch (JSMTException jse) {
    // Could not decrypt message
    log.error("Could not decrypt message: " + jse.getMessage (), jse);
    processMessage = false;
    done=true;
    else {
    log.debug("Unrecognized type");
    // doesn't seem to get here since Baltimore toolkit doesn't accept
    // nonencrypted, nonsigned emails (it should though). Keep here for future
    // releases of the toolkit
    done = true;
    // Now that we have output_sink,
    // retrieve the bytes
    byte[] processedBytes = output_sink.toByteArray();
    newMessage = new ByteArrayInputStream(processedBytes);
    input_source = new ByteArrayInputStream(processedBytes);
    else {
    // only for the first time around, revert to original
    if(layers==1) {
    // Keep original message
    newMessage = new ByteArrayInputStream(revMessageStr);
    log.debug("wasSigned: " + wasSigned + " wasEncrypted: " + wasEncrypted);
    // create the mime message again
    mimeMessages[i] = new MimeMessage(emailChannel.getSession(),newMessage);
    mimeMessages[i].setFrom (senders[0]);
    mimeMessages[i].setRecipients (Message.RecipientType.TO, recipients);
    // decrypted/verified data is automatically written to output_sink
    input_source.close();
    output_sink.close();
    // If the message wasn't signed, we can still process the message
    // if the settings allow the server to process unsigned messages
    // If not, set the flag to not process this message
    if(!tPhysicalMailbox.getAcceptUnsignedEmail() && !wasSigned) {
         log.info("Server configuration does not allow unsigned emails.");
    processMessage = false;
    // If the message wasn't encrytped, we can still process the message
    // if the settings allow the server to process unencrypted messages
    // If not, set the flag to not process this message
    if(!tPhysicalMailbox.getAcceptUnencryptedEmail() && !wasEncrypted) {
    log.info("Server configuration does not allow unencrypted emails.");
    processMessage = false;
    if(processMessage) {
    MimeMessage m = mimeMessages[i];
    if( maxReceivedEmailSize > 0 && m.getSize() > maxReceivedEmailSize ) {
    try {
    m = constructDummyMsg( m, m.getSize() );
    catch (Exception e) {
    // Add message to a list of messages to be deleted after
    // finished retrieving messages.
    deleteMsgVector.addElement (uniqueID);
    ReceivedMessage receivedMessage =
    new ReceivedMessage (m, uniqueID);
    msgVector.addElement (receivedMessage);
    else {
    log.info("Email could not be processed.");
    deleteMsgVector.addElement (uniqueID);
    catch (EmailException ee) {
    log.error("Email Exception", ee);
    deleteMsgVector.addElement (uniqueID);
    } // mail socket hang fix
    catch (javax.mail.MessagingException e) {
    String message = e.getMessage();
    // if it's a socket hang issue due to network outage, we want to logout and refetch the messages.
    if (message.equals(SOCKET_READ_ERROR)) {
    log.error("Socket timed out. Closing the connection", e);
    messagesOnServer.clear();
    throw new EmailException(

  • Boldface won't "stick" in database document

    I'm using a large database document in AppleWorks in which some text is boldfaced. Boldface won't "stick" in those fields now -- if I boldface some text, it returns to lightface as soon as I move out of the field. If I enter a field where the text is already boldfaced, it immediately returns to lightface. I've tried closing the document, restarting AppleWorks and restarting the computer, and the problem continues.
    I'm running a MacBook with OSX v. 10.4.11 and AppleWorks 6.2.9.
    Thanks for any help.

    "Is there a way to export all of the data in the file to a new file without copying and pasting pieces of it or carrying over the corrupt data?"
    Create a new DB document with the same fields in the same order as the old one.
    Open the old one, show all records in "List" view.
    Go file > Save as... ASCII Text (or Text, whichever is available in the list of Save as choices).
    Switch to the new DB
    Click on the single (empty) record in the DB to select it, then go Edit > Clear to delete the record.
    Go file >Insert... to open the Open dialogue.
    Navigate to and select the Text file you saved above. Click Open.
    Check to see that the imported data has gone into the correct fields. If it has, you're done. If it hasn't, then the Tab order of the fields in the two DBs does not match. Revise the tab order of one so that they are the same in both DBs, then repeat the process above.
    Regards,
    Barry

  • Mail.app: Signatures Won't Save in one POP Account

    Hi,
    Looked high and low for a solution to this. Searched Apple discussions and macosxhints and googled the problem but so far no joy. This is not a major problem but it is quite annoying.
    There are multiple email accounts set up in Mail.app (Version 3.6 (936)) on my MacBook Pro, running Mac OS 10.5.8. All except one account will save all my signatures. In all I have ten signatures, all of which disappear between launches of mail from a POP gmail account. I add them back at each launch and the next time I open Mail they're gonzo. So, I add them back again. I tried moving the placement of the account in the side-bar, still no-go. I have set Mail.app prefs not to apply the sigs automatically. I choose when and if I use a signature.
    To add them I do as I have done to the other email accounts: select all of them and drag and drop them onto the email account in the Signature pane of Mail.app's preferances.
    More info: all the sigs are all rtf formatted, most of the accounts are POP, though three are IMAP. No other account is affected except this one gmail account (I have other gmail POP accounts and other non-gmail POP accounts. This is the second to oldest POP account. The problem has only occurred since a recent Apple security update. Though I can't say that is the problem or just a coincident.
    If all else fails, just as a work-around, is there an "applescriptable" way to add sigs to mail?
    Thanks

    I'm afraid I don't have a solution, but I do have a similar problem...
    Since upgrading to Mountain Lion none of my signatures will stay where I put them, or they disappear. Previous to the upgrade everything was working perfectly.
    I'll assign a signature to a particular e-mail address and usually within a day, when I go back to send an e-mail from that address there is no signature available to be selected in the e-mail composing window. When I check in Mail Prefs I see that the signature has disappeared completely from the e-mail address to which it was assigned and is now listed under "All Signatures", but these are not available to any of the e-mail addresses when composing e-mails.
    An identical problem occurs on another iMac I use in my office, which is also synced with iCloud.
    I've tried a number of times to delete all the signatures and start again, both on one computer and on both, but nothing seems to work.
    Does anyone have any ideas?...

  • Mail suddenly just won't open

    All of a sudden the Mail program just won't open.
    I click on the logo in the dock, the icon briefly flashes, then nothing.
    I've tried double clicking the program through the Finder but still no response.
    I've tried to find a way to re-install the Mail program without having to re-install a whole bunch of other programs but so far can't find away to do it.
    Any ideas what the best option would be?
    And... which came first: The chicken or the egg?
    Peace to all!

    Mail dumps a whole lot of files in several places in your user library folder which it needs to run. If these get corrupted then Mail might get confused and simply not open, which is what i'm guessing and hoping your problem is. Before you go messing around with such files, run a permissions check from disk uility and if you really want repair the disk. Please read the whole post then act accordingly.
    The first file you want to look at is from your home folder (the house with your user account written under it) library>caches and the folder mail. just move it to your desktop and see if mail launches.
    If no go up to the library again and open preferences folder and move the mail preference file (com.apple.mail.plist) to your desktop and again see if mail launches.
    If this doesn't work then move the mail folder inside the library folder to your desktop and again see if mail works. This should in effect wipe mail and give it a clean slate, it will prompt you like the first time you ever set up mail for user account details, etc.
    If this doesn't work, please tell me anything else you can that might help. If you have valuable data (attachments, certain content in e-mails) then i can try and help you retrieve them from the files you moved to your desktop, so don't delete them until you are 120% sure you don't need them.
    hope that helps
    report back soon
    Don King Resurrected

  • Default paper size won't stick in Snow Leopard

    Hi,
    I have a Mac which prints to a usb laser, which is on the network. Since Snow Leopard the default paper size won't stick. Every time I print I have to change it from US Letter to A4. It's ok on the Mac which host the printer. Both Macs are on Snow Leopard. (I have ensured that the Region is appropriate and set the Default Paper Size in the Printer prefs.)
    Anyone any ideas?

    I had a similar problem and none of the above solutions worked. However, with the help of my daughter, we figured it out (at least it worked for me).
    Go to Apple Preferences/Print & Fax.
    Pick your printer.
    Ensure the 'Default paper size' is correct.
    Click on the 'Options & Supplies' button, then 'Driver'.
    On the Fit to Page menu, choose 'Nearest Size and Scale'
    All the programs now use the default paper and size.
    I hope this helps.
    Don

  • Desktop & Screen saver prefs won't load

    Desktop & Screen saver prefs won't load

    First follow the instructions in this support article.
    If an iPhoto or Aperture library is the source of your desktop pictures, it may need to be rebuilt, or you may need to update the application to the latest version.
    Otherwise, continue as below.
    Back up all data.
    In the Finder, hold down the option key and select
              Go ▹ Library
    from the menu bar. From the Library folder, delete the following item, if it exists:
              Caches/com.apple.systempreferences
    and move the following items to the Desktop, if they exist:
              Application Support/Dock/desktoppicture.db
              Preferences/com.apple.desktop.plist
    Launch System Preferences and test. If you still have the issue, put the items you moved to the Desktop back where they came from and post again. Otherwise, delete the items.

  • I'm having problems with excessive email usage on my iphone 4/ios 7. Just noticed that (settings/usage) it was using 900  mb. I deleted all my mail, deleted the mail account, and it still says it's using 661 mb. My ipad uses a fraction of that.

    I'm having problems with excessive email usage on my iphone 4/ios 7. Just noticed that it (settings/usage) was using 900+ mb. I deleted all my mail, deleted the mail account, turned the phone off and back on, downloaded any remaining mail on the server to Outlook on my computer, and it still says it's using 661 mb. My ipad uses a fraction of that.
    Background: I recently (December) bought an ipad and set up icloud for contacts and calendar, but NOT mail. My email provider is Verizon. I use computer, iphone, and ipad to check my email; eventually I download it from the server using Outlook on the computer and then delete any remaining emails from the phone and ipad. I can't find info on this problem anywhere.

    Howdy there COUGAR444,
    It sounds like your iPad all of a sudden seems to be restarting out of no where. If you haven't called AppleCare yet, I would start with quitting either the app that seems to be causing the issue, or all the apps if a single doesn't seem to be the culprit. 
    iOS: Force an app to close
    Double-click the Home button.
    Swipe left or right until you have located the app you wish to close.
    Swipe the app up to close it.
    When you have done that restart the device and test the issue again:
    iOS: Turning off and on (restarting) and resetting
    If the issue persists, backup your device to iTunes, then restore it as new and verify that it works. 
    How to erase your iOS device and then set it up as a new device or restore it from backups
    If it does, then restore your backup to either verify it still works and the software just needed reinstalled, or isolate the issue to the backup file itself. 
    Thank you for using Apple Support Communities.
    Regards,
    Sterling

  • Mac mail 4.5 won't open now 10.6.8 combo update installed

    I have been having problems updating software and it was suggested that I installed the 10.6.8 combo update, this i have done and since then my mac mail 4.5 won't open - 'you can't use this version of Mail with this version of Mac OS X ' message!!
    What is the simplest way of resolving this problem please?
    Thanks
    Julie

    Hello, just ran accross your query.
    Was Mail ever moved out of the Applications folder?
    http://support.apple.com/kb/TS4424?viewlocale=en_US&locale=en_US

Maybe you are looking for

  • How can i transfer my purchased items to a new apple ID?

    I currently have an apple ID that i use for all my iMessages and everything else i do except for my app and itunes purchase. I know we don't have the option to merge 2 apple Id's yet so i was wondering if there is a way to transfer what I've already

  • Can you trade in your ipod touch 4 gen for the 5th gen

    about 1 year ago i brought the 4gen ipod touch but i would like to get the ipod touch 5gen can you trade it in and pay the diffrence if not i will have to get the nexus 7 32GB

  • About F-28 transaction

    Hi all, I want to send e-mail once accounting document get posted through F-28 transaction. Can anybody tells me hows it possible? if you know user-exit for that then please tell me Thanks, Siddharth

  • Populating a segment in the target idoc based on dif

    Hi We have E1MARCM, E1MBEWM and ZE1MARCM (constum segment) in the material IDOC and we map the idoc to similar idoc which has same sement in the target idoc material idoc. ZE1MARCM segment is the custom segment and is the subsegment of E1MARCM. while

  • Does anyone know what to???

    does anyone know what to do when the droid charge starts telling you the the apps that you had are no longer installed on the phone and it wont allow you to  access whats needed to redownload the apps or access the internet. I mean the camera has eve