The token should always be sent as the last parameter, or at least after the $1text parameter.
MailStore Server is one of the leading email archiving solutions for SMB.
For private use there is a free tool for email archiving furthermore: MailStore Home.