Notify problem

We have 2 mail servers.We send smtp mail on server 1 and we receive 2 notify in the mail file on server 1.

We have another program that read mail file on server 1 and execute some operation but in this case execute two times the operation because where is 2 mail notify for the same mail send.

How can we change the settings of server?