Please enable JavaScript to view this site.

The command autoreply() generates a new email to the original sender using an indicated email template.

 

This command automatically generates an email response to the original sender using the template (template).

The sender of the automated reply is the original recipient, the subject is the original subject with the prefix of a reply, i.e. "AW: ", "AW: " and so on.

If the email of the original sender contains several recipients, a return email is generated for each recipient.

 

empty

anchor link Attention:

This command is primarily intended for tests of external communication partners and in no case replaces the autoreply function of an email client such as MS Outlook.

 

Structure of the command

 

autoreply('template', ['header:value[;header:value]']);

 

 

Return value

positive

for the newly generated reply email

 

Parameters

template

This parameter defines the template to be used for the automated email reply.

The template can be created and managed in Mail System Edit mail templates....

 

header (optional)

Indication of the header to be written including the related value.

Possible values for header

return-path:

 

date:

 

from:

The default sender is the original recipient address

sender:

 

reply-to:

 

to:

 

cc:

 

subject:

original subject line with the prefix of an a reply, i.e. "AW: ", "AW: " and so on.

any X-header

 

 

empty

Note:

Setting multiple headers and/or X-header is possible via separation with a semicolon.

 

Example 1

Line

Code

01

log(1,'Start custom commands for incoming emails BEFORE decryption');

02

if (compare('subject','match','\[get\scertificate\]')) {

03

log(1,'certificate requested by subject');

04

if (autoreply('send_certificate')) {

05

if (authenticated(1)) {

06

if (sign_smime()) {

07

log(1,'sent certificate for $to to $from');

08

} else {

09

log(1,'signing not possible for $to, no key found');

10

}

11

} else {

12

log(1,'signing not possible for $to, no user found');

13

}

14

}

15

deliver();

16

}

 

Explanation

First the email template "send_certificate" must be defined.

When an email is received, the system first checks whether a signed return email has been requested via a predefined subject (this must be [get certificate] according to the example) to obtain the recipient's public key (line 02). If this is the case, an automated return email to the original sender is generated by each of the recipients using the email template "send_certificate" (line 05). Subsequently, the system checks for each original recipient whether a user has been created for them on the SEPPmail Secure E-Mail Gateway (line 06). If this is the case, it is then attempted to sign the corresponding return email (line 07). and then send it (line 15).

 

Using this function, an external communication partner can obtain the public S/MIME key of a local user via email.

 

Example 2

Line

Code

01

log(1,'Start custom commands for incoming emails BEFORE decryption');

02

if (compare('to','match','auto-reply@company\.tld')) {

03

log(1,'Recipient is auto-reply@company.tld, create reply');

04

if (autoreply('test_autoreply')) {

05

if (domain_smime_keys_avail()) {

06

log(1,'found S/MIME domain certificate for recipient(s) $to - trying to encrypt mail');

07

compare('subject','substitute','(\s)*\[secure\]');

08

compare('subject','substitute','\[emptypw\]');

09

compare('subject','substitute','(?i)(<im>.*<c>)|(\[confidential\])');

10

if (encrypt_domain_smime('aes256')) {

11

log(1,'smime domain encryption successful');

12

} else {

13

log(1,'smime domain encryption FAILED - Mail will be bounced');

14

bounce('bounce_noenc');

15

}

16

}

17

deliver();

18

}

19

}

 

Explanation

First the email template must be defined.

When the recipient "autoreply@company.tld" receives an email (line 02), an automatic return email is generated using the email templatesSEPPmail "test_autoreply" (line 04). The next step is to check whether a domain certificate exists for the domain of the recipient of the return email - i.e. the original sender of the email (line 05). In order to avoid that any subject flags already present in the original email appear in the return email, these are removed (lines 07- 09). Now, the return email is domain-encrypted (line 10). If this fails, the return email is rejected (line 14). Otherwise, it is delivered (line 17).

 

This function can be used to test the domain encryption of external communication partners with reference to your own domain.

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC