add check-attachment hook

i added a hook to allow checks on attachments. 
I need this to warn me if i attach ".odt" files since nobody is able to read them in bigger companies.
The hook can return a reason. If a reason is returned, the user can always override and attach the file anyway.