Page 1 of 1

Certified Sender Alliance

Posted: Thu Nov 07, 2013 3:05 pm
by HKN
To paticipate in the CSA with our newsletter, besides other prerequisites, we had to add some headers in our mailing. As OpenEMM cannot create additional userdefined headers, we have made some changes to the sourcecode and thus are able to add the headers:
X-CSA-Complaints
List-Unsubscribe
List-ID

List-ID can be retrieved from a OpenEMM Variable while the other two are implemented via environment variables, which are set in the openemm.sh script.

Code: Select all

XCSAComplaints="whitelist-complaints@eco.de"
ListUnsubscribe='[agnDYN name="0.0 header-unsubscribe-URL"/][agnUID]'
export XCSAComplaints="whitelist-complaints@eco.de"
export ListUnsubscribe='[agnDYN name="0.0 header-unsubscribe-URL"/][agnUID]'
Unfortunately the OpenEMM variable for unsubscribe-URL did not work properly why we had to use this workaround.

To implement this we had to change only one file of the sourcecode. This is the BlockCollection.java.

Here is the diff output:

Code: Select all

200a201,220
> 	public String headHKNSpecial() {
> 		String xCSAComplaints, unsub;
> 		try {
> 			xCSAComplaints = System.getenv("XCSAComplaints");
> 			unsub = System.getenv("ListUnsubscribe");
> 		} catch(SecurityException e) {
> 			// access not permitted
> 			xCSAComplaints = null;
> 			unsub = null;
> 		}
> 		return
> 			"HList-Id: " + data.mailinglist_id + data.eol
> 			+ (unsub != null
> 				? "HList-Unsubscribe: " + unsub + data.eol
> 				: "")
> 			+ (xCSAComplaints != null
> 				? "HX-CSA-Complaints: " + xCSAComplaints + data.eol
> 				: "");
> 	}
> 
235a256
> 			head += headHKNSpecial();
What do you think about our hack? What about giving OpenEMM the chance to fulfill CSA requirements? Or better to allow userdefined headers filled with OpenEMM Variables.

Re: Certified Sender Alliance

Posted: Mon Nov 11, 2013 8:19 am
by maschoff
Fine, your solution should fulfill its job.