Syntax for the CLI command Mail
Last adaption: 06.2024
New:
- layout adjustment
This article refers to a Beta version
| Command | Parameters | Description | Example |
|---|---|---|---|
mail filterngmail filterng newmail filterng new |
Creates a new mail filter rule | mail filterng selector new name virusfilter binop AND | |
| A rule is created with several commands.
The command mail filterng selector new first creates the rule with a name and link condition. |
mail filterng selector item new selector virusfilter type PROTO operator IS value [ SMTP ] | ||
| mail filterng selector item new sets the individual filters. | mail filterng selector item new selector virusfilter type VIRUS operator TRUE | ||
| mail filtering new then defines the action and position | mail filterng new selector virusfilter action REJECT pos 1 | ||
| pos | Postion number of the rule | ||
| selector | Name of the filter rule | ||
| action | Action of this rule | ACCEPT; MARK; FILTER; BLOCK; REJECT; QUARANTINE | |
| action_arg | Specifies the text to be used to mark the email in the subject line of the MARK action | ||
| operator | Content matching such as: is, is not, contains, does not contain, matches regex | IS; ISNOT; IN; NOTIN; REGMATCH; TRUE; FALSE | |
| type | Type of content | PROTO; SRC; DST; FROM; RCPT; HEADER; SPAM; VIRUS; URL; CONTENT | |
| type_arg | Additional information about the type of content | MIME; SUFFIX | |
| value | Content to be filtered | ||
| binop | Should all conditions apply or just one of them? | AND; OR | |
mail filterng deletemail filterng delete |
Deleting a mail filter rule | mail filterng delete id "3" | |
| id | Id of the mail filter rule | ||
mail filterng getmail filterng get |
Lists the mail filter rules | mail filterng get mail filterng selector get mail filterng selector item get | |
mail filterng setmail filterng set |
Changing a mail filter rule | mail filterng set id "3" action "DROP" | |
| id | Id of the mail filter rule | ||
| pos | Postion number of the rule | ||
| selector | Name of the filter rule | ||
| action | Action of this rule | ACCEPT; MARK; FILTER; BLOCK; REJECT; QUARANTINE | |
| action_arg | Specifies the text to be used to mark the email in the subject line of the MARK action | ||
| operator | Content matching such as: is, is not, contains, does not contain, matches regex | IS; ISNOT; IN; NOTIN; REGMATCH; TRUE; FALSE | |
| type | Type of content | PROTO; SRC; DST; FROM; RCPT; HEADER; SPAM; VIRUS; URL; CONTENT | |
| type_arg | Additional information about the type of content | MIME; SUFFIX | |
| value | Content to be filtered | ||
| binop | Should all conditions apply or just one of them? | AND; OR | |
mail filterng updatemail filterng update |
Update the mail filter rules | mail fitlerng update | |
mail dkimsignmail dkimsign getmail dkimsign get |
Output of the DKIM signature configuration | mail dkimsign get | |
mail dkimsign updatemail dkimsign update |
Updates the DKIM signature configuration | mail dkimsign update | |
mail dkimsign domainmail dkimsign domain getmail dkimsign domain get |
Output of the DKIM signature configuration | mail dkimsign domain get | |
mail dkimsign domain setmail dkimsign domain set |
mail dkimsign domain set | ||
mail archivemail archive updatemail archive update |
Updates the variables of the mail archive | mail archive update count "1024" age "7" size "128" | |
| count | Maximum number of emails | ||
| age | Maximum email age in days | ||
| size | Maximum email size in megabytes | ||
mail archive getmail archive get |
Listing of emails in the mail archive | mail archive get | |
mail archive countmail archive count |
Outputs the number of emails stored in the archive | mail archive count | |
mail archive resendmail archive resend |
Resending an email from the archive | mail archive resend <name> <rcpt> | |
mail archive content getmail archive content get |
Output of the contents of an email | mail archive content get name "smtp.hkHTSk" | |
| name | Email subject/name | ||
mail archive previewmail archive preview |
Displays the contents of an email | mail archive preview name "smtp.hkHTSk" | |
| name | Email subject/name | ||
mail archive sendersmail archive senders |
Displays the sender of an email | mail archive senders name "smtp.hkHTSk" | |
| name | Email subject/name | ||
mail archive recipientsmail archive recipients |
Displays the recipients of an email | mail archive recipients name "smtp.hkHTSk" | |
| name | Email subject/name | ||
mail queuemail queue getmail queue get |
Shows the mail queue | mail queue get | |
mail queue deletemail queue delete |
mail queue delete--desc | mail queue delete id u35CIFQk006986 | |
| id | ID of the email | ||
mail queue flushmail queue flush |
Attempts to redeliver the emails from the mail queue | mail queue flush id u35CLSQk007559 rcpts user@ttt-poit.de | |
| id | ID of the email | ||
| rcpts | mail queue rcpts--desc | ||
mail fetchmail fetch getmail fetch get |
Lists all Fetchmail servers | mail fetch get | |
mail fetch newmail fetch new |
Adds a new Fetchmail server | mail fetch new... | |
mail fetch setmail fetch set |
mail fetch set id "7" user "homer" pass "insecure" | ||
| id | ID of the Fetchmail server (cannot be changed, is required) to identify the server to be edited. | ||
| host | Hostname of the Fetchmail server | ||
| proto | Fetchmail server log | POP3; IMAP | |
| user | Username | ||
| pass | Password | ||
| flags | Flags of the configuration | MULTIDROP; STARTTLS; KEEPMAILS; BADHEADER; SSL_CERT_CHECK | |
| dest_addr | Target email address | ||
| dest_domain | Target domain (replaces dest_addr when multidrop was used) | ||
| envelope | Envelope-Header (Only for multidrop use) | Envelope-To; Delivered-To; X-Envelope-To; X-Delivered-To; X-Rcpt-Original; X-Original-To; X-Orig-To; X-Originally-To | |
| limit | Maximum message size in megabytes | ||
| local | Local email addresses for multidrop | ||
| local | Local email addresses for multidrop | ||
| remote | Remote email addresses for multidrop | ||
| oauth_account_user_id | mail fetch-oauth_account_user_id--desc | ||
| oauth_account | mail fetch-oauth_account--desc | ||
| oauth_user | mail fetch-oauth_user--desc | ||
| tls_version | TLS Version | TLS1.2; TLS1.2+; TLS 1.3;... | |
mail fetch deletemail fetch delete |
Deleting a Fetchmail server | mail fetch delete id "7" | |
| id | ID of the Fetchmail server (cannot be changed, is required) to identify the server to be edited. | ||
mail fetch mapmail fetch map setmail fetch map set |
Adding or changing a user mapping | mail fetch map set id "7"... | |
| id | mail fetch map-id--desc | ||
mail fetch map deletemail fetch map delete |
Deleting a user mapping | mail fetch map delete id "7" | |
| id | mail fetch map-id--desc | ||
mail fetch updatemail fetch update |
Updating the Fetchmail configuration | mail fetch update | |
mail fetch envelop getmail fetch envelop get |
Output of all Envelop header configuration options | mail fetch envelop get | |
mail statsmail stats getmail stats get |
Displays email statistics | mail stats get | |
mail stats usersmail stats users |
Outputs the email users | mail stats users | |
mail rescanmail rescan getmail rescan get |
mail rescan get--desc | mail rescan get |


