Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

Customizing Mail Printing

The CDE Mailer prints mail messages using the Print action that is defined for the DTMAIL_FILE data type. It does not use the print script specified by the OpenWindows Mail Tool. To change the print behavior you must modify this Print action.

To Modify the Print Action

  1. Using your favorite editor, create the following file:

    	HomeDirectory/.dt/types/dtmail.dt
  2. Enter the following lines into this file:

    	# 
    	# Override default Print action for mailboxes 
    	# 
    	ACTION Print 
    	{
    	LABEL           Print
    	ARG_TYPE        DTMAIL_FILE
    	TYPE            COMMAND
    	WINDOW_TYPE     NO_STDIO
    	EXEC_STRING     sh -c ' \
                   					  dtmailpr -p -f %(File)Arg_1% | mp -m -l | \
                   					  dtlp -u %(File)Arg_1%;' 
    	}

    Note -

    dtmailpr is a print filter that strips out attachments, resulting in a stream of plain text. dtlp is the standard CDE interface to lp. %(File)Arg_1% is the file being printed.


  3. Modify the EXEC_STRING to include the print commands you want.

  4. Restart Mailer.