Bouncing email in OSX Mountain Lion (10.8)

In Snow Leopard, the Mail app had a seldom-used, but very useful (to me), feature called “Bounce”.

Basically, when you bounce an email it sends an automated message to the sender stating that an error occured and their message was not delivered. This was often useful to send spam back to the sender, informing them your email address “isn’t valid”.

This feature was removed in Lion, but it can be easily recreated by using Apple Script. The original source tested it in Lion & Mountain Lion. I’ve confirmed it in Mountain Lion (10.8.2 as of this writing), but haven’t tested in 10.7.

Steps to recreate “Bounce”:

1. Open the automator app
2. Make a new service
3. In the main window (right-column), select “no input” in “Mail” for the ‘Service receives’ selectbox
4. Drag “Get Selected Mail Items” into the workflow from the pane on the left
5. Drag “Run Applescript” into the workflow
6. Insert the following code:

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

7. Save as “Bounce” (or whatever you’d like to call it)

The service is now created, so to test it:

1. Open Mail
2. Select a message (probably a good idea to send yourself a message so you can verify the response!)
3. Click the “Mail” menu up top –> “Services” –>”Bounce”. A bounced notification will be sent to the sender.

Original Source

Linux bridged network VMware Fusion OSX

Bridged network configuration with VMware Fusion 3 and a Macbook Pro’s Internal Wireless Card

For one of my development set ups, I use a virtual machine of CentOS through VMware Fusion 3 on a host of Mac OSX Snow Leopard running on a Macbook Pro.

My host uses the Airport (Wireless card) for its internet and my VM needs access to its internet to push to the development Git repository. My host also needs access to my Virtual Machine’s web server for testing the site before committing.

Pretty basic setup, all in all, so here it is:

I have VMware Fusion configured as a Bridged network with the internal wireless card. This will bind my Host’s wireless card (en1) to the ethernet of the virtual machine (eth0).

Note: The wireless card will be interpreted as an ethernet port in the Virtual Machine. If you want it to be interpreted as a wireless card, then you’ll have to use a USB wireless card.

1. Configure the network interface, set the IP address and the netmask:

ifconfig eth0 up 192.168.0.200 netmask 255.255.255.0

2. Add a route to the default gateway (router)… 192.168.0.1 is my router’s IP and eth0 is my card from the virtual machine:

route add default gw 192.168.0.1 eth0

3.
a) Add our DNS entry so we can resolve host names to IP addresses:

vi /etc/resolv.conf

b) Add the following to the /etc/resolve.conf file:

nameserver 192.168.0.1

Save, quit vi.

Check to make sure it worked!


ping google.ca

And there we have it!

This information was found from the following link, and this may offer more details if you need it:

http://www.fdlinux.com/networksetuphowto.html

That’s all you need for networking, but there’s one more step to allow the host to access the virtual machine’s website.

4. Edit the /etc/hosts file to resolve the chosen name to the VM’s web server:

192.168.0.200 local.dev.com

Now, when typing in “local.dev.com” in a web browser on the host’s machine it will load the virtual machine’s web server… assuming your virtual machine’s web server is configured correctly (which is beyond the scope of this article).