1. plugin output

Plugins should simply print commands on standard output, one per line,

What plugin commands are supported and how to use them?

Command Description
A       accept mail - turn off qmail-spp in this session
N       next - accept current SMTP command 
        (do not execute remaining plugins for this command)
O       ok - like N, but omits qmail checks in MAIL and RCPT
Emsg    error - do not accept this SMTP command and
        immediately send msg to the client
LMmsg   later, mail - like E, but shows error after MAIL command
LRmsg   later, rcpt - like E, but shows error after RCPT command
LDmsg   later, data - like E, but shows error after DATA command
Rmsg    reject mail - send msg to the client and drop connection
D       drop connection immediately, without printing anything
Svar=value      set environmental variable var to value
Uvar    unset var variable
Hcontent        header - add header content (eg. X-Spam-Flag: YES)
Cfoo@bar.com    change last address provided by the client to foo@bar.com 
        (MAIL FROM or RCPT TO address)
Pmsg    print - send msg to the client

Plugins should simply print commands on standard output, one per line, eg. RCPT plugin which prints:

to standard output:

    Cspam@myhost.com
    HX-Spam-Flag: YES
    Sspam=1
    A

to standard error:

    redirected spam from <$SMTPMAILFROM>

will

    change last RCPT TO address (redirect) to spam@myhost.com
    add X-Spam-Flag: YES header
    set $spam to "1"
    accept mail (turn off qmail-spp for this session)
    log 'redirected spam from <spammer@aol.com>' message (where <spammer@aol.com> is envelope sender address)

Notes

    each plugin command must end with a new line
    valid SMTP response codes are not added automatically to messages generated by plugins
    A, N, O, E, R and D should be used as the last command

2. history


CategoryDns CategoryWatch CategoryTemplate

MoinQ: qmail/spp/コマンド (last edited 2022-03-29 04:35:08 by ToshinoriMaeno)