Setup a email feedback loop header with PHP for spam complaints (gmail)

1k Views Asked by At

I'm planning to send mass emails to gmail addresses via PHP mail function. To track email spam complaints i'm trying to setup a feedback loop with PHP but i'm not receiving any response from gmail. I've set header to PHP mail in the following format for PHP mail function:

$headers .= "Feedback-ID: CampaginABC:Customer123:CustomID:MyUniqueSenderID"; 

What are the best ways to track spam and bounce complaint Data?
Any Help would be greatly appreciated.

Gmail Feedback Loop Source:
https://support.google.com/mail/answer/6254652?hl=en&ref_topic=7279058

1

There are 1 best solutions below

1
Email geek On

Feedback-ID header needs to be included in DKIM-Signature. If you are sending emails with Postfix and doing DKIM signing with OpenDKIM then you can configure it as follows :

add "SignHeaders Feedback-ID" to /etc/opendkim.conf

and reload opendkim,postfix

/etc/init.d/opendkim reload

/etc/init.d/postfix reload