I use script in python to fetching mails from Postfix server. This script fetches mails, removes headers and leaves only body of email. Then it uses this body to execute linux command by os.system(). For example I'm sending email with mkdir folder and script creates this. 
Problem was when I was sending ls by mail. I've got response : not found ls 
Second problem is with mkdir cause it adds ^M to name from email. For example I sent mkdir folder and it created "folder?".
Do you have any ideas ?
 
     
     
    