Dunfermline reached their first Scottish Cup final in 19 years
Last season's finalists Dunfermline Athletic will visit Queen of the South in the third round of the Scottish Cup.
Neil Lennon's Championship side lost 3-1 to Celtic in May and will travel to Palmerston on the final weekend in November.
Second-tier leaders Partick Thistle are also away from home, taking on Elgin City, while Stenhousemuir host East Fife and Raith Rovers visit Troon.
Cove Rangers are Inverness Caledonian Thistle's visitors and Livingston travel to face Clydebank.