I have found that there are certain cities you can and can't kill an enemy before you take a portal.
* Cenarion Circle will teleport you back and slay you for attacking an enemy in town and portaling.
* Gadgetzan won't do anything to you if you attack or kill an enemy before you take the portal.
* Booty Bay Unknown as of now
* Light Hopes Chapel Unknown as of now
How to do it
Step 1.
Have a mage in your party open a portal to any major city
Step 2.
Have everyone in your party/raid stand near the portal and cast any offensive spell they want on the opposing faction (Alliance/Horde) and take the portal before you die.
Step 3.
Have any spectors left behind count the dead bodies.
I will list all of the neutral towns that you can and can't do this as I come across them.