Yes we can bounce email from Mail.app

Posted by joy


Up until somewhat recently, Mac OS X mail.app had the handy feature of being able to manually bounce email. Technically, the mail bounces with a new header created, but still.

There are the Mail.app email bounce instructions from Lechnyr.

First, we need to add the ability to bounce email back into OS X’s Mail.app program. To accomplish this:

  1. Run the Automator program, located in your /Applications folder.
  2. When prompted to choose a type for your document, select Service and click the Choose button. You’ll now have a window that you can drag and drop various actions in to.
  3. Using the drop down menus at the top, make certain to indicate that the service receives no input in the Mail application.
  4. Drag Get Selected Mail Items into the workflow window.
  5. Next, drag Run AppleScript into the workflow window.
  6. Enter in some code (below) and save the workflow with a meaningful name such as, Bounce Message.

Here’s the AppleScript to copy and paste into the Automator workflow.


on run {input, parameters}
tell application "Mail"
repeat with eachMessage in input
bounce eachMessage
delete eachMessage
end repeat
end tell
end run

After you’ve saved the workflow, you’ll see this in your Mail.app menu. And yes, it does work in OS X Yosemite.

Bounce Workflow in Mail.app menu


4 Responses to “Yes we can bounce email from Mail.app”

  1. Ricardo Reitzbaum Says:

    Does NOT work in El Capitan’s Mail program. Applescript runs without error messages, but emails do not get bounced (or reliably deleted even!). Rats!

  2. joy Says:

    Ricardo…

    Ack, I haven’t tested the script in El Capitan (still have Yosemite) but…I can tell you what I see when using it.

    1) The “bounce” isn’t real per se as what it does is create a new set of headers for the send back rather than a distinct Delivery Status Notification (DSN code) or bounce code, but it’s good enough for some email systems to see it as a bounce.

    2) The script doesn’t delete the original email, instead the message is put into the trash folder after the manual “bounce.”

  3. reg Says:

    Hi and thanks ofr this great tip. I followed the instructions and altough I thought it worked all that happens is it deletes the selected message and transfers it to my trash bin. There is no “bounce” message sent to the originating email address selected.

    Any idea what could be wrong?

    I copied the code exactly as you advised and deleted everything else in the script apart from what you have quoted.

    I am running Yosemite OS X

    Cheers Reg

  4. peter austin Says:

    I’m not a programmer but trying to input code into Mac Workflow to send as a bounced email message. This was code I was given. And I have two questions:

    1. I don’t know what to do at {input, parameters}

    on run {input, parameters}
    tell application “Mail”
    repeat with eachMessage in input
    bounce eachMessage
    delete eachMessage
    end repeat
    end tell
    end run

    2) And I would also like the bounced message text to read as below but I don’t know where to write it into the code:

    I’m sorry to have to inform you that your message could not
    be delivered to one or more recipients. It’s attached below.

    For further assistance, please send mail to postmaster.

    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.

    The mail system

    : iafrica.com
    Reporting-MTA: dns; mta10-dc01.cm.synaq.com
    X-Postfix-Queue-ID: 5344B14825E
    X-Postfix-Sender: rfc822; castleb@iafrica.com
    Arrival-Date: Fri, 3 Feb 2017 14:13:48 +0200 (SAST)

    Final-Recipient: rfc822; castleb@iafrica.com
    Original-Recipient: rfc822;castleb@iafrica.com
    Action: failed
    Status: 5.0.0
    Diagnostic-Code: X-Postfix; iafrica.com}

Leave a Reply