Parameter scripts#

Parameter scripts contain constants and regular expressions. They are used by built-in or added application logic, so that logic and parameters are kept apart. Some script names are predefined.

Removing e-mail attachments#

Removes e-mail attachments, for example images from signatures, that would otherwise be stored as a new attachment with every received e-mail.

#Recurring attachments like logos, signature images etc. are not desired to be saved as attachments.
#The classname for this parameter script is hardcoded to EmailAttachmentRemoveRegexps, if you change it, all attachments will be accepted. A line starting with # is considered a comment.
#there are two possibilities to filter attachments #fileNamePatterns or #fileHashes. If the matching file is an inline image referenced by cid within the e-mail content, then the reference will also be removed
#fileNamePatterns: the file names matching any of the regular expressions following this tag will be removed from the e-mail (files can be either attached to or embedded in e-mail). The file name patterns are case sensitive. Each line below should contain a regular expression (till the next tag). It might be that the mail client changes the name of the embedded file to generic names and you can't catch the file by name. In this case consider using fileHashes
#add your recurring file names here
allegra.*\.png
#fileHashes: list below one hashcode per line, the hashes of those files which should not be added as attachments. You can get a hash for a file by right clicking the item's attachment and selecting File hascode
#Allegra logo
C53687D98A391E0E44F2A627E0FFD275
#Allegra logo inverted
C0F9D31B5DFAFD9D14A3D1CA2335A240

Changing the e-mail text#

Removes all parts of the text of an e-mail that match this regular expression. It is applied when an e-mail is received and is useful, for example, to remove long signatures.

#The matching parts of the following  regular expressions will be cut from the e-mail body. The expressions will be handled as case insensitive and multi line. The mail client might add further white spaces (new lines) by formatting the e-mail so the regular expression should cover this cases. Each line below should contain a regular expression to be matched:
#The classname for this parameter script is hardcoded to EmailBodyCutRegexps, if you change it, no text will be cut.
This\s*e-mail\s*may\s*contain\s*confidential.*?We\s*thank\s*you\s*for\s*your\s*cooperation\.

Rejecting e-mails by sender address#

Rejects e-mails depending on the sender’s e-mail address. This is especially useful to prevent endless e-mail loops. Such a loop can start, for example, when the Allegra notification system sends an e-mail to an address that is no longer valid. The mail server then replies that it does not know the recipient, Allegra creates a new item from this reply, and so on. In this case, block the address of the mailer daemon.

#E-mails with sender addresses containing any of the regular expression below will be rejected. Pattern must match the whole value, the expressions will be handled as case insensitive. Each not commented line below is considered a regular expression to be matched. A line starting with # is considered a comment.
# The classname for this parameter script is hardcoded to EmailSenderAddressRejectRegexps, if you change it, all e-mail subjects will be accepted. This might lead to infinite e-mail cycles if notification e-mails are activated and the e-mail server sends automatic answers. 
.*?@someSpam.*com

Rejecting e-mails by sender name#

Rejects an e-mail depending on the sender’s name.

#E-mails with sender name containing any of the regular expression below will be rejected. Pattern must match the whole value, the expressions will be handled as case insensitive. Each not commented line below is considered a regular expression to be matched. A line starting with # is considered a comment.
# The classname for this parameter script is hardcoded to EmailSenderNameRejectRegexps, if you change it, all e-mail subjects will be accepted. This might lead to infinite e-mail cycles if notification e-mails are activated and the e-mail server sends automatic answers. 
.*spam.*

Rejecting e-mails by text#

Rejects an e-mail if its text matches one of the regular expressions.

#E-mails with body containing any of the regular expression below will be rejected. Pattern can match anywhere inside the value, the expressions will be handled as case insensitive. Each not commented line below is considered a regular expression to be matched. A line starting with # is considered a comment.
# The classname for this parameter script is hardcoded to EmailBodyRejectRegexps, if you change it, all e-mail bodies will be accepted. This might lead to infinite e-mail cycles if notification e-mails are activated and the e-mail server sends automatic answers.

Rejecting e-mails by subject#

Rejects an e-mail depending on its subject (for example out-of-office replies).

#E-mails with subject containing any of the regular expression below will be rejected. Pattern can match anywhere inside the value, the expressions will be handled as case insensitive. Each not commented line below is considered a regular expression to be matched. A line starting with # is considered a comment.
# The classname for this parameter script is hardcoded to EmailSubjectRejectRegexps, if you change it, all e-mail subjects will be accepted. This might lead to infinite e-mail cycles if notification e-mails are activated and the e-mail server sends automatic answers. 
automatic answer
out of.*?office
out of.*?house
Automatische Antwort
ausser Haus
außer Haus
Undeliverable
Unzustellbar