User Tools

Site Tools


reference:imap4_server_script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
reference:imap4_server_script [2018/11/14 10:45] – external edit 127.0.0.1reference:imap4_server_script [2026/05/26 17:46] (current) – [GetEncryption function] paul
Line 50: Line 50:
     return true, attributes, extended     return true, attributes, extended
   end     end  
 +  
 +  
 +====GetEncryption function====
 +(Added in version 8.7)
 +
 +When a connection is established, this lets the script define the encryption mode for this connection
 +
 +  GetEncryption(ipaddr, server addr, server port, default encryption mode)
 +
 +  * ipaddr - client IP address
 +  * server addr - server IP address (eg if different IP addresses have bindings)
 +  * server port - server port (eg if different ports have bindings)
 +  * default encryption mode - 0 = no encryption/STARTTLS, 1 = SSL/TLS, 3 = Force STARTTLS
 +
 +returns a single number of the new encryption mode
 +
 +e.g. This will set SSL/TLS for connections to port 993 (bind the service to both ports 143 and 993, and set the encryption mode for None/STARTTLS or STARTTLS, which will still apply to connections to port 143)
 +
 +  function GetEncryption(client, svr, svrport, enc)
 +    if (svrport==993) then
 +        enc = 1;
 +    end
 +    return enc;
 +  end 
 +  
 +====FilterCommand function====
 +(Added in v9.1)
 +
 +Every time an IMAP4 command is received by VPOP3, this function is called, which will allow VPOP3 to filter it out, or replace it with trivial functionality
 +
 +  function FilterCommand(username, selectedMailbox, inputLine, command, parameters, tag, sessionState)
 +
 +returns newCommand, newParameters, returnText
 +
 +If 'newCommand' = 'X-VPOP3-Filtered', then VPOP3 won't run any command, but will send back 'returnText' instead.
reference/imap4_server_script.1542192349.txt.gz · Last modified: by 127.0.0.1