Certified Sender Alliance

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

Moderator: moderator

Certified Sender Alliance

Postby HKN » Thu Nov 07, 2013 3:05 pm

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.
HKN
 
Posts: 1
Joined: Thu Nov 07, 2013 2:32 pm

Re: Certified Sender Alliance

Postby maschoff » Mon Nov 11, 2013 8:19 am

Fine, your solution should fulfill its job.
OpenEMM Maintainer
maschoff
Site Admin
 
Posts: 2130
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest

cron