- if (strcasecmp(ct->c_ctinfo.ci_type, "text") == 0 &&
- strcasecmp(ct->c_ctinfo.ci_subtype, "calendar") == 0) {
- ct->c_dispo = getcpy("inline; filename=\"");
+ snprintf (buffer, sizeof(buffer), "%s-disposition-%s/%s",
+ invo_name, ct->c_ctinfo.ci_type, ct->c_ctinfo.ci_subtype);
+ cp = context_find (buffer);
+ if (cp == NULL || *cp == '\0') {
+ no_subtype = 1;
+ snprintf (buffer, sizeof(buffer), "%s-disposition-%s", invo_name,
+ ct->c_ctinfo.ci_type);
+ cp = context_find (buffer);
+ }
+ if (cp != NULL && *cp != '\0') {
+ if (strcasecmp (cp, "attachment") &&
+ strcasecmp (cp, "inline")) {
+ admonish (NULL, "configuration problem: %s-disposition-%s%s%s "
+ "specifies '%s' but only 'attachment' and 'inline' are "
+ "allowed", invo_name,
+ ct->c_ctinfo.ci_type,
+ no_subtype ? "" : "/",
+ no_subtype ? "" : ct->c_ctinfo.ci_subtype,
+ cp);
+ }
+ }
+
+ if (cp) {
+ ct->c_dispo_type = getcpy(cp);