I have added a pipe to a script in the .qmail file for a certain mail account. Today i noticed the file had reverted back to what it was before i added my code. How do i prevent the file from be overwritten by plesk?
Any time the account is updated via Plesk, the .qmail file will be overwritten, and you will need to edit it by hand to get things working again. It will be overwritten also when you rebuild mail settings with mchk utility.
You can to change the file attributes to immutable with
chattr +i .qmail
but you should remove this flag in cases mentioned above.