Grant, 29, made 24 appearances for Vale this season, but moves to the ABAX Stadium on a two-and-a-half-year deal.
Striker Mackail-Smith, 32, has scored only five goals in 40 games for Luton since joining the club in August 2015.
He scored 99 goals in 212 games for Posh from 2007-2011, before returning for a one-month loan spell in 2014.
The Scotland international has made six appearances this season, with three of those coming in the EFL Trophy.
"Unfortunately we haven't seen the best of Craig due to his injuries, but with a prolonged run of games I'm sure he'll be an asset," Luton manager Nathan Jones said.
Posh chairman Darragh MacAnthony said on Twitter that Mackail-Smith had insisted that he would pay back his wages if he was not fit to play whilst on loan.
Find all the latest football transfers on our dedicated page or visit our Premier League tracker here.

Heartbleed was one of the worst internet flaws ever uncovered.
The maintenance of the software, which secures around two-thirds of the world's websites, was done by a group of volunteers with very little funding.
The new group set up by the Linux Foundation has a dozen contributors and has so far raised around $3m (Â£1.7m).
As well as maintaining OpenSSL it will also support development of other crucial open-source software.
Firms supporting the initiative include Google, Facebook, Microsoft, Intel, IBM, Cisco and Amazon. Each will donate $300,000 over the next three years.
The industry has been forced to step up after Heartbleed brought chaos to the tech sector.
Experts estimate that the Heartbleed bug will cost businesses tens of million of dollars in lost productivity as they update systems with safer versions of OpenSSL.
"Sometimes it takes a crisis to do the right thing," Linux Foundation executive director Jim Zemlin told journalists.
The bug exposed more than just people's passwords and credit card details. It also highlighted that the crucial piece of software is maintained by a small group of developers who receive donations averaging about $2,000 a year to support the project.
"It is kind of weird that such crucial software is run by a group of hobbyists on a shoestring budget," said Mikko Hypponen, chief research officer with security firm F-Secure.
"This software was invisible, behind the scenes and there are very few volunteers who have the skill and willingness to work on a project like this. There is no recognition, no money and it is very difficult."
The details that have emerged about how the vulnerability came about speaks volumes about how little the industry has cared about the software that was securing their websites, he added.
"The fact that the code change which caused the bug was done by an individual working at 23:00 on a New Year's Eve says a lot. The code simply wasn't reviewed enough and it went undetected for two years," he added.
"Now there is formal and monetary support from the industry I hope we will see a change not just for OpenSSL but for other crucial open source software."

The 26-year-old, who came through the youth ranks at QPR, had loan spells at AFC Wimbledon, Northampton and Wycombe before joining Oldham in 2011.
He has since had spells with Oxford, Slovenian side Domzale, Serbian outfit Red Star Belgrade and Aberdeen.
The Antigua & Barbuda international becomes the League One club's second signing of the transfer window.
Find all the latest football transfers on our dedicated page or visit our Premier League tracker here.
Peterborough have signed Port Vale midfielder Anthony Grant for a "six-figure fee" and Luton's Craig Mackail-Smith on loan to the end of the term.
[NEXT_CONCEPT]
The world's biggest technology firms will donate money to fund the support of OpenSSL, the software at the centre of the Heartbleed bug.
[NEXT_CONCEPT]
Gillingham have signed forward Josh Parker on a deal until the end of the season following a spell on trial.