- if (strcasecmp(ct->c_ctinfo.ci_type, "text") == 0 &&
- strcasecmp(ct->c_ctinfo.ci_subtype, "calendar") == 0) {
- ct->c_dispo_type = getcpy("inline");
+ cp = context_find_by_type ("disposition", ct->c_ctinfo.ci_type,
+ ct->c_ctinfo.ci_subtype);
+ if (cp != NULL) {
+ 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,
+ ct->c_ctinfo.ci_subtype ? "/" : "",
+ ct->c_ctinfo.ci_subtype ? ct->c_ctinfo.ci_subtype : "",
+ cp);
+ }
+ }
+
+ if (cp) {
+ ct->c_dispo_type = getcpy(cp);