fixed getposts.sh
attachment processing (draft)