In the MAILHANDLING parameter section you define how the received mail is to be handled.
Two files are created for each mail:
Procedure file
This contains the statements that are to be executed when a mail is received.Message file
This contains the received message.
You accordingly define the procedure file structure, with the PROCEDURE parameter record. With the MESSAGEBODY parameter record you define the structure of the file that contains the actual message.
Syntax
|
Description of parameters
PREFIX=<string>
Prefix for the files created. The files are named PREFIX.YYYY-MM-DD.HHMMSS. If several files are created within one second, they are incremented with #nnn.
Default setting: MAIL
ENTER=JOB / PROCEDURE
Specifies whether the procedure file is to be started with /ENTER-JOB- or /ENTER-PROCEDURE.
ENTER=JOB
Starts the ENTER procedure with /ENTER-JOB.
ENTER=PROCEDURE
Starts the ENTER procedure with /ENTER-PROCEDURE.
DELETE=YES / NO
Specifies whether the procedure file is to be deleted after the execution of the ENTER procedure.
DELETE=YES
The procedure file is deleted after the execution of the ENTER procedure.
DELETE=NO
The procedure file is not deleted after the execution of the ENTER procedure.
PAMFILE=NO / YES
Specifies whether base64 encoded attachments with Content-Type unequal 'text' shall be stored as PAM files.
PAMFILE=NO
All attachments are stored as SAM files.
PAMFILE=YES
Base64 encoded attachments with Content-Type unequal 'text' are stored as PAM files.
SMIME=PARAMETERS( ... )
Specifies how e-mails signed in accordance with the S/MIME standard and/or encrypted are to be handled. Only S/MIME Version 2 is supported.
KEY=<private key file>
Specifies the file containing the private keys required for the decryption of encrypted emails. It is essential that this private key remains secret. The key must be stored in PEM format.
CERTIFICATE=<certificate file>
Specifies the file containing the X.509 certificate belonging to the private key. The private certificate must be stored in PEM format.
CRL=<CRL file>
Specifies the file containing a Certificate Revocation List (CRL). The CRL is used with signed e-mails to check whether the certificates used with the signature are still valid. For this purpose, the CRLs are to be obtained from the relevant at regular intervals (of a few weeks, typically) and stored in a shared file whose name is specified by means of this operand. On a purely technical level, verification also works without the use of a CRL. However, if you cannot ensure in any other way that the certificates used are still valid, you should create and specify a CRL file as described here.
CA_CERTIFICATES=<CA certificates file>
Specifies a file containing the CA certificates required for the verification of S/MIME signatures. The X.509 certificates must be stored in PEM format and arranged sequentially in the file.
To add or delete certificates, you can edit the file with any text editor. Each certificate is entered in the file as follows:
-----BEGIN CERTIFICATE----< CA certificate in Base64 code > -----END CERTIFICATE-----
Text outside these sequences is ignored by the mail reader and can therefore be used to identify the certificates that are not available in a readable form because of their ASN.1/Base64 coding.
VERIFY_SIGNATURE=YES / NO
Specifies whether an existing signature is to be checked with the help of the CA certificates and the CRL.
VERIFY_SIGNATURE=YES
The existing signature is checked.
VERIFY_SIGNATURE=NO
The existing signature is not checked.
VERIFY_DEPTH=<depth>
Specifies the verification depth, which is the maximum number of permissible certificates between the certificate of the S/MIME signer and the certificate known to the mail reader. If the maximum verification depth is exceeded, the verification is considered to have failed.
Note the following:
1 | The signer’s certificate is not accepted unless it has been signed directly by one of the certificate authorities (CA) known to the mail reader. |
0 | This makes no sense because in these cases only self-signed certificates are permissible. |
Default: 9
BODY=PARAMETERS( ... )
The following parameters specify how the e-mail body is to be handled.
All parts of the email for which the name parameter is not assigned in the content type header are mail bodies.
PROCEDURE=PARAMETERS( ... )
Specifies the contents of the procedure file to be created.
SUFFIX=<string>
Specifies the suffix, which distinguishes the procedure file from the message file.
Default: PROC
TEXT=(<textlist>)
The operand value is a comma-delimited list of texts, each of which is enclosed in single quotes. For each part of a non-multipart e-mail and each part of a multipart e-mail for which the name operand of the content type header is not assigned, this text list is inserted at the beginning of the procedure file (each item in the list appears in its own line). The parameters enclosed in percentage signs (%) specified in the section “Substituting mail-specific parameters” are substituted. In particular, %FILE-NAME% is replaced with the name of the message file written. By default, this text list is empty.
ATTACHMENT=(<textlist>)
The operand value is a comma-delimited list of texts, each of which is enclosed in single quotes. For each part of a multipart e-mail for which the name operand of the content type header is not assigned, this text list is inserted in the procedure file (each item in the list appears in its own line). The parameters enclosed in percentage signs (%) specified in the section “Substituting mail-specific parameters” "Substituting mail-specific parameters" are substituted. In particular, %ATTACHMENT-FILE-NAME% is replaced with the name of the attachment message file, and %ATTACHMENT-PROCE-DURE-NAME% is replaced with the name of the procedure file created for the attachment. By default, this text list is empty.
MESSAGEBODY=PARAMETERS(...)
Specifies the structure of the message file.
TEXT=(<textlist>)
The operand value is a comma-delimited list of texts, each of which is enclosed in single quotes. For part of a non-multipart e-mail at the uppermost level and for each part of a multipart e-mail for which the name operand of the content type header is not assigned, this text list is inserted in the message file (each item in the list appears in its own line). The parameters enclosed in percentage signs (%) specified in the section “Substituting mail-specific parameters” are substituted. In particular, %TEXT% is substituted with the message text. By default, this text list is empty.
ATTACHMENT=PARAMETERS(...)
Specifies the structure of the procedure file and message file to be generated for each attachment.
The name of the files is generated in such a way that the value of the name parameter from the content type header field is appended to the name of the e-mail body. In addition, the suffix is appended to the attachment procedure file (see the SUFFIX operand).
PROCEDURE=(<textlist>)
Specifies the structure of the procedure file to be generated for each attachment.
The operand value is a comma-delimited list of texts, each of which is enclosed in single quotes. This list of texts is inserted in the procedure file, with each item in the list on a separate line. The parameters enclosed in percentage signs (%) specified in the section “Substituting mail-specific parameters” are substituted. By default, this text list is empty.
MESSAGEBODY=(<textlist>)
Specifies the structure of the message file to be generated for each attachment.
The operand value is a comma-delimited list of texts, each of which is enclosed in single quotes. This list of texts is inserted in the message file, with each item in the list on a separate line. The parameters enclosed in percentage signs (%) specified in the section “Substituting mail-specific parameters” are substituted. In particular, %TEXT% is substituted with the message text and %HEADER% with the header lines. By default, this text list is empty.
Example
The following example illustrates the MAILHANDLING parameter section of the configuration file.
MAILHANDLING=PARAMETERS( ENTER=PROCEDURE, BODY=PARAMETERS( PROCEDURE=PARAMETERS( TEXT=( '/WRITE-TEXT ''To: %To%''', '/WRITE-TEXT ''Subject: %SUBJECT%''', '/INCLUDE-PROCEDURE MAILPROC(FILENAME=%FILE-NAME%)' ), ATTACHMENT=( '/REMARK ****************************', '/REMARK * Now we call the procedure ', '/REMARK * handling the attachment ', '/REMARK ****************************', '/INCLUDE-PROCEDURE %ATTACHMENT-PROCEDURE-NAME%,(-', '/ CONTENTTYPE=''%CONTENT-TYPE%'')' ) ) ), ATTACHMENT=PARAMETERS( PROCEDURE=( '/BEG-PAR-DECL', '/DECLARE-PARAMETER CONTENTTYPE', '/END-PAR-DECL', '/CALL-PROCEDURE ATTPROC,(CT=''&(CONTENTTYPE)'')' ) ) )
If you use the example shown above to receive an e-mail with an attachment, the mail reader creates the following procedure file:
MAIL.2010-06-27.134758.PROC, as follows, for processing the message:
/WRITE-TEXT 'To: mail01@system' /WRITE-TEXT 'Subject: This is a funny test' /INCLUDE-PROCEDURE MAILPROC,(FILENAME=MAIL.2010-06-27.134758) /REMARK **************************** /REMARK * Now we call the procedure /REMARK * handling the attachment /REMARK **************************** /INCLUDE-PROCEDURE MAIL.2010-06-27.134758.testtxt.PROC,(/ CONTENTTYPE='text/plain; name="test.txt"')
MAIL.2010-06-27.134758.TESTTXT.PROC, as follows, for processing the attachment:
/BEG-PAR-DECL /DECLARE-PARAMETER CONTENTTYPE /END-PAR-DECL /CALL-PROCEDURE ATTPROC,(CT='&(CONTENTTYPE)')
To process the message, the MAIL.2010-06-27.134758.PROC procedure started by the ENTER-PROCEDURE command calls the MAILPROC procedure defined elsewhere with the name of the message file. To process the attachment, the MAIL.2010-06-27.134758.TESTTXT.PROC procedure is then called. This in turn calls the ATTPROC procedure defined elsewhere with the content type header of the attachment as a parameter. You will find more examples in the section “Structure of an e-mail”.