Certified Sender Alliance

Use this forum to suggest new features, language support, documentation, etc. for OpenEMM's roadmap

Moderator: moderator

HKN
Posts: 1
Joined: Thu Nov 07, 2013 2:32 pm

Certified Sender Alliance

Post 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.
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Certified Sender Alliance

Post by maschoff »

Fine, your solution should fulfill its job.
OpenEMM Maintainer
Post Reply