POSTIE is (c) copyrighted 1996-2005 and written by Andrew George Davison and Infradig Systems. POSTIE is a command-line mail client that handles multi-part MIME attachments, HTML mail, UUencode/decode, POP3 and IMAP4 reading, SMTP, NNTP (Usenet) and IMAP4 posting. HTTP fetching and list-server processing. And much more! POSTIE doesn't have a GUI as it is not meant to be used directly as an email client... it was designed for back-end processing, to be used with schedulers, CGI, or to be exec driven from another program. WIN95: requires the WinSock2 upgrade from http://support.microsoft.com/support/kb/articles/Q182/1/08.ASP LICENSING: Licenses for the full feature version are available from as little as US$25. Other pricing options are available including commercial use, redistribution and source. Details are available online: mailto:info@infradig.com http://www.infradig.com Support priority will be given to people who have purchased the product. Time constraints may mean that others may not have their questions answered at all. FREQUENT PROBLEMS: Command-line options may not be abbreviated and are case-sensistive, so be careful! I get lots of mail about this or that option not working and 90% of the time it's this. Also, double-quotes can be used on any option that may legally contain spaces (filenames, email-addresses, text strings etc). Be careful about default input when sending mail! The other 90% of queries I get is people leaving off -nomsg or -msg:"text" or -file:filename or with a field name of 'postie_host'. When posting mail 'hostname' can optionally be a comma-separated list of server names to try in in the order listed. -port:service - optionally specifiy a port number or service name to connect to. Can also be set in the config file 'postie.txt' by the: SMTP, NNTP, POP3 and IMAP4 keywords. You probably will need to specify this ONLY if you are using a non-standard port or go through a relay of some kind. -news - post a newsgroup article (else send mail). Can also be set in a
with a field name of 'postie_news'. Also, reverses sense of '-qp' option (see below). (NOT AVAILABLE IN FREE VERSION) -imap - read from an IMAP4 server else POP3 is assumed. (NOT AVAILABLE IN FREE VERSION) -apop - use POP3 'APOP' authentication mechanism if available. (NOT AVAILABLE IN FREE VERSION) -crammd5 - use IMAP4/ESMTP 'CRAM-MD5' authentication mechanism if available. (NOT AVAILABLE IN FREE VERSION) -noarchive - when posting to news, set the 'x-no-archive: yes' header so that DejaNews won't store the article. -to:address - 'address' is the email address or news-group name of the recipient. This option can be used multiple times, or a comma separated list may be used. NOTE: you can also use addresses of the longer form i.e. -to:"Andrew Davison " and the older variant -to:"andrew@infradig.com(Andrew Davison)". Can also be set in a with a field name of 'postie_to'. -cc:address - 'address' is the email address of the recipient. This option can be used multiple times, or a comma separated list may be used. Can also be set in a with a field name of 'postie_cc'. -bcc:address - 'address' is the email address of the recipient. This option can be used multiple times, or a comma separated list may be used. NOTE: other recipients will be hidden from each other. Can also be set in a with a field name of 'postie_bcc'. (NOT AVAILABLE IN FREE VERSION) -tolist:filename - 'filename' is a file with one email address per line, used for sending to multiple recipients as an alternative to '-to'. Any line beginning with a '#' is ignored. (NOT AVAILABLE IN FREE VERSION) -cclist:filename - 'filename' is a file with one email address per line, used for sending to multiple recipients as an alternative to '-cc'. Any line beginning with a '#' is ignored. (NOT AVAILABLE IN FREE VERSION) -bcclist:filename - 'filename' is a file with one email address per line, used for sending to multiple recipients as an alternative to '-bcc'. Any line beginning with a '#' is ignored. (NOT AVAILABLE IN FREE VERSION) -hide - if set other -to: recipients of the message won't see each other. It's much better to use -bcc: instead. -high - set importance as high (default is normal). -low - set importance as low (default is normal). -dsn - SMTP: request delivery status notification (DSN) from server. -mdn - SMTP: request mail disposition notification (MDN) from client. -notify - SMTP: request mail delivery & disposition status notification (same as -dsn & -mdn). -receipt - POP3/IMAP4: send read receipt (MDN) to someone whether they requested it or not. -mdn - POP3/IMAP4: send a read receipt (MDN) to someone who requested it. -msgid - generate a Message-ID: header on mail sent (very rare to need this). -ns - For non-stop sending mode. Don't stop on send errors, try and deliver to as many recipients as possible. On by default for list-server processing, otherwise off. If used with '-relay' then the source message is not deleted when '-rm' used as well. -esmtp - use ESMTP features if available from mail server (needed for authentication). (NOT AVAILABLE IN FREE VERSION) -from:address - 'address' is the email address of the sender. -replyto:address - 'address' is the email address to reply to. -verify - verify email 'from' address (as far as possible). -s:subject - is a string used for the subject line, e.g. -s:"This is a test" Can also be set in a with a field name of 'postie_subject'. -sfile:file - read the subject line from the first line of the named file. (NOT AVAILABLE IN FREE VERSION) -file:filename - SMTP: an optional specficiation of an input text-file for the body of the mail message. If not supplied then standard input is assumed (terminate with CTRL-D) unless '-msg' or '-nomsg'. Can be specified multiple times. NOTE: do not use for attachments, see -a: option for that instead. -file:filename - POP3/IMAP4: an optional specification of an output file for the body of a mail message. If not supplied then standard output is assumed. If multiple messages are selected for reading then all output will be concatenated to the output file (attachments are extracted inline so this will only work with text messages). -file:importfile - SMTP: an option specification of an import control file (see -import). -sep:string - output a string between messages when using -file:filename option. -raw - use to copy headers as well as body. Turns off -extract option. Can be used for posting (see -t option) as well as retrieving. -nomsg - SMTP: no message body is sent, just attachments (see above and -a). -msglen:n - use first 'n' chars of message text when sending. -msg:text - SMTP/IMAP4: use as message body. Escape line-breaks using '\r\n' sequence and '\\' for a \ by itself. If '-file:filename' is used as well then the file contents are appended to the message text. Beware of DOS and/or command-line shell length limitations. -msg:nbr - POP3/IMAP4: select specified message (default is ALL messages). -first:nbr - POP3/IMAP4: read the next specified number of messages (default is ALL). Can be specified as 'FIRST n' in config file. -rm - SMTP: remove file(s) specified by '-file', '-a' & '-url' after use. -rm - POP3: delete the selected message(s). If -br option is used then the messages won't be displayed as they are deleted. -rm - IMAP4: mark for delete the selected message(s). If -br option is used then the messages won't be displayed as they are deleted. There is no method (yet) for undeleting such messages. -rmlist - SMTP: remove files use in '-tolist:', '-cclist:' or '-bcclist:'. -rmfile:file - remove specified file after processing. -purge - IMAP4: any messages marked for deletion are removed from the mailbox (note: this is permanent). -html - optionally specifies use of HTML content type (be sure recipient's mail reader can handle HTML mail before using). Also make sure a document is set in the HTML for embedded images and links. In POP3/IMAP4 mode it formats output to suit display in an HTML browser (and reverses the sense of any 'multipart/alternative' content type received). Can also be set in a with a field name of 'postie_html'. (NOT AVAILABLE IN FREE VERSION) -alt - HTML input is also translated to plain-text and both are sent as MIME multipart/alternative. (NOT AVAILABLE IN FREE VERSION) -alt:textfile - HTML input is accompanied by specified plain-text and both are sent as MIME multipart/alternative. (NOT AVAILABLE IN FREE VERSION) -a:filename - where 'filename' is the name of a file to be sent with the mail message as a multipart/mixed attachment. The file is removed ONLY if the '-rm' option is also used. This option can be repeated any number of times. (Single use and 256K file size limit in FREE VERSION) -a:filename|headers - where 'filename' is the name of a file to be sent with the mail message and specified headers as a multipart/mixed object. The file is removed ONLY if the '-rm' option is also used. This option can be repeated any number of times. (NOT AVAILABLE IN FREE VERSION) -i:filename|url - where 'filename' is the name of a file to be included with the HTML mail message as a multipart/related object and 'url' is the URL or CID of the object as referenced in the HTML message body. All such included objects are encapsulated and sent with the message. Used to send HTML mail with images or applets embedded such that they can be viewed without a web connection. The file is removed ONLY if the '-rm' option is also used. This option can be repeated any number of times. (NOT AVAILABLE IN FREE VERSION) -p:filename|headers - where 'filename' is the name of a file to be sent with the mail message and specified headers as a multipart/related object. Allows creation of a customized MIME part. The file is removed ONLY if the '-rm' option is also used. This option can be repeated any number of times. (NOT AVAILABLE IN FREE VERSION) -tmo:secs - seconds to timeout on reads. -train - modifies use of a following '-dir' or '-rdir' option such that they send a message for each file as a single attachment. A 'message train' is thus generated. (NOT AVAILABLE IN FREE VERSION) -dir:filespec - all files in named directory are attached to the message. NOTE: does not recursively search sub-directories. Can be repeated multiple times and used in conjunction with '-a:'. Can accept wildcards (as in '-pat' option) but note: '*.*' only matches files WITH an extension, so use '*' to get ALL files in a directory. Use ".\" or "./" prefix for local files. Translates '/' to local separator for Unix compatability. (NOT AVAILABLE IN FREE VERSION) -rdir:filespec - all files in named directory are attached to the message. NOTE: recursively searches sub-directories. Can be repeated multiple times and used in conjunction with '-a:'. Can accept wildcards (as in '-pat' option) but note: '*.*' only matches files WITH an extension, so use '*' to get ALL files in a directory. Use ".\" or "./" prefix for local files. Translates '/' to local separator for Unix compatability. (NOT AVAILABLE IN FREE VERSION) -addr:wildspec - when used with -train and and -dir/-rdir, match the wildcard spec against the filename to get the address to send (instead of -to:address option). For example (either of): postie ... -train -dir:"c:\temp\adddress=*.pdf" -addr:"*address=*.pdf" postie ... -train -dir:"c:\temp\adddress=*.pdf" -addr:"c:\\temp\\address=*.pdf" will send file 'address=fred@some.where.pdf' to address 'fred@some.where'. Note the use of double backslash in second example, it's because it specifies a pattern and not an actual file path, and backslash is the escape character in patterns. (NOT AVAILABLE IN FREE VERSION) -cnt:number - send message 'number' times (may be useful for testing?). -binary - force all sent attachments to be binary MIME-type (i.e 'application/octet-stream'). This is useful if attaching text and/or HTML files so they don't appear in-line in advanced readers. -text - text attachments (when reading) are written to file in native mode, otherwise they are written in binary mode. -text - all attachments (when sending) are sent as text mode files. -inline - mark all attachments as 'inline' for viewing in the message body rather than as separate attachments. This is a hint only to mail viewers. Used when sending. -usemime:0|1 - send as a MIME message if set to '1' (on by default). -qp:0|1 - encode characters as 'quoted printable' content-type if set to '1' (on by default). Otherwise 8-bit characters will go thru unchanged with 7-bit encoding (see -8 option). If '-news' is specified then this option is set to '0' (off by default) -b64 - use base64 encoding (off by default). Not generally used with text. (NOT AVAILABLE IN FREE VERSION) -8 - use 8-bit encoding (allows binary data thru unmodified). This option is off by default and is not recomended to use except with 16-bit character sets or when quoted-printable encoding is not supported. If the server doesn't support RFC1652 then this option will have no effect. -uue - attachments OR message are UUencoded before being sent. -user:userid - IMAP4/POP3/NNTP account userid. Can also be set in a with a field name of 'postie_user'. -pass:passwd - IMAP4/POP3/NNTP account password. Can also be set in a with a field name of 'postie_pass'. -user2:userid - IMAP4 account userid for destination in IMAP-to-IMAP relay. -pass2:passwd - IMAP4 account password for destination in IMAP-to-IMAP relay. -preauth - used with IMAP4 servers that are 'pre-authorised'. Basically it reads userid/password but doesn't use them (ie. enter dummy values). -auth - in CGI mode use HTTP Basic Authentication scheme instead of user/pass params (this is *slightly* more secure). -redirect:url - output is an HTTP "Location:" header to redirect browsers. Used with '-cgi' option only. -mime:mimetype - sets the output mime-type (default is 'text/html'). Used with '-cgi' option only, and necessary if used with an HTML tag in conjunction with the '-redirect' option. You can run multiple POSTIE commands by using tags with harmlessly redirected reponses, or use be daring and use the tag to embed text responses. -mime:string - set the MIME type to be used in the Content-Type headers. The default is 'text/plain' for ordinary messages. Can be set in config file as 'MIME string' as well. -charset:string - set the character-set to be used in the MIME headers. The default is 'iso-8859-1' for Western European. Can be set in config file as 'CHARSET string' as well. -cgi:query-string - the command-line is actually an HTTP query-string and text input is taken from a file in either 'c:\temp' or '/usr/tmp' depending upon platform. This is for security reasons so that any arbitrary file cannot be grabbed. You can change the path using the POSTIE_PATH environment variable e.g. 'set POSTIE_PATH=c:\uploads'. Any files specified by '-file:' or '-a:' are taken to be relative to this path (and '..' is checked for!). See also the '-post' option. -url:url - where 'url' is the URL to download and save as a file to possibly (see -noop option) send as an attachment. The file is saved to the current-working directory unless the '-extract:path' option is specified. The file is removed ONLY if the '-rm' option is also used. Handles redirects automatically. use the 'PROXY_HOST' and 'PROXY_PORT' config file variables if you need to use a proxy server (for example for FTP use). This option can be repeated any number of times. See also '-post:filename' and '-mime:mimetype' options. -url:url|file - where 'url' is the URL whose contents are to be saved to the file named 'file'. File is automatically added to the attachment list if sending mail. This option can be repeated any number of times. See also '-post:filename' and '-mime:mimetype' options. -post - data input is via CGI POST method rather than a file. Used with '-cgi' option only. -post:filename - data input is via CGI POST method. Used with '-mime:type' and '-url:url' options only. -import - read an input control file -file:filename (see import.txt). The format is based on Lotus Notes supposedly. -t - read a Unix sendmail compatible input stream to send mail or news (see -news). Recognises standard headers (can be used with -raw for pre-processed MIME). -every:mins - loop back to start every specified minutes (also 'EVERY mins' config keyword). -severy:secs - loop back to start every specified seconds (also 'SEVERY secs' config keyword). -v[:level] - verbose output at designated level (default level is 1 if just '-v'). -q - disables message-sent confirmation and a few others. >filename - writes output to log file. also use '-v' option. >>filename - appends output to log file. also use '-v' option. -br - list basic POP3/IMAP4 headers only (else message text gets displayed). Does not change message flags in IMAP. -full - list more POP3/IMAP4 headers. -relay[:hostname] - relay mail messages to specified host (default is 'localhost'). Can use the '-to:address' option with this to force sending to a specific address or newsgroup (if '-news' used), otherwise the relay host will have to resolve mailbox addresses. This can be useful when you can't create a .forward file on the original server but want you mail sent on to you somewhere else. Turns off '-br' option automatically and turns on '-raw'. See also the '-rm' and '-ns' options. NOTE: with POP3 reading relaying is to SMTP, with IMAP reading relaying is to IMAP (in the similarly named folder). -extract[:path] - extract attachments to separate named files, in current-directory or named directory. (NOT AVAILABLE IN FREE VERSION) -get:name - used to retrieve an attachment in CGI mode. -config - read the 'postie.txt' (or whatever 'POSTIE_CONFIG' environment variable points to) configuration file (see sample file 'postie.sam' in this directory). (NOT AVAILABLE IN FREE VERSION) -config:filename - read the specified configuration file (see sample file 'postie.sam' in this directory). (NOT AVAILABLE IN FREE VERSION) -listserv:address - set the from/return address on list posts. -priv - when used with -listserv means that the list is private and only the list owner can post to the list (i.e. a mailing list), otherwise the list is considered public (i.e. a discussion list). -owner:address - declares ownership and address for control messages. -fetch:path - specifies a path to which file 'fetch' requests are relative to. Oterwise fetch is diabled. Only list subscribers may issue fetch requests. -open - if specified then anyone can fetch files (see above), not just subscribers. -manual - if specified then list cannot process subscribe/unsubscribe requests. -noatt - if specified then binary-attachments are dropped. -probe:address - test that 'address' is acceptable to designated host WITHOUT sending any mail. Use (optionally) DNS Mail Exchanger info to do the lookup on the actual mail host. use the -host option as well to specifiy a name server (if not 'localhost'). -mx - Send mail directly to a recipients mail server rather than routing locally. Use (optionally) with -host:name to specify a DNS server to use for Mail eXchanger lookup. (NOT AVAILABLE IN FREE VERSION) -mbox:name - (IMAP4) set the current mailbox (i.e. folder) for posting. Note: some servers do not allow posting to the INBOX. -mbox:name - (IMAP4) set the current mailbox (i.e. folder) for reading (default is INBOX). -mbox2:name - (IMAP4) set the destination mailbox (i.e. folder) for IMAP-to-IMAP relaying. -create:name - (IMAP4) create named mailbox. -delete:name - (IMAP4) delete named mailbox (if no subordinates). -move:name - (IMAP4) move selected message(s) to named mailbox. -copy:name - (IMAP4) copy selected message(s) to named mailbox. -list:string - (IMAP4) list selective mailboxes. For example '-list:"personal/*"' will list all the folders under 'personal' (including sub-sub-folders). Use '-list:"personal/%"' to list just the first sub-level. Use '-list:"%"' to list just the top-level. Of course the delimiter '/' may be different on your system. -list - (IMAP4) list all mailboxes (same as '-list:"*"' option). -lsub:string - (IMAP4) list selective subscribed mailboxes. For example '-lsub:"personal/*"' will list all the subscribed folders under 'personal' (including sub-sub-folders). Use '-lsub:"personal/%"' to list just the first sub-level. Use '-lsub:"%"' to list just the top-level. Of course the delimiter '/' may be different on your system. -lsub - (IMAP4) list all subscribed mailboxes (same as '-lsub:"*"' option). -masq:string - Used in masquerading. If sender matches string then message is read, otherwise ignored. -alias:filename - When relaying use file to translate addresses. Each line of the file is of the form 'alias: address' and lines beginning with '#' are ignored. Any address (To:, Cc:) encountered that matches 'alias' will be translated to 'address'. Can be useful with masquerading. Address formats will converted where appropriate and comparison is not case-sensistive. Is also used to provide a conditional read, as any message without an alias match is ignored. -exec:command - on POP3/IMAP4 read, execute 'command' passing message body to standard-input. -limit:n - send mail to lists in batches of 'n'. gets around RCPT-TO limits on mail servers. -xit - (POP3/IMAP4) Sets exit code (%errorlevel% variable) to the number of messages queued for reading (on some older versions of Windows you may need to divide by 256). -etrn:domain - initiate remote SMTP transfer of queued mail (See RFC 1985). -org:name - the organization name (e.g. -org:"Microsoft Corp."). -sens:desc - describe the 'sensitivity' of the message (e.g. -sens:"Top Secret (for your eyes only)") -dh - automatically decode headers with =?charset?q|b?text?= content (on by default use -nodh to turn off). -eh - automatically encode headers to =?charset?q|b?text?= content (on by default use -noeh to turn off). -meter:filename - write % progress to named file at one second intervals on sends. -free - frees the console window to run detached (usefull only if you can't shell the program as such). -pat:pattern - subject must match wild-card pattern to process message (otherwise it is skipped). -nopat:pattern - subject must not match wild-card pattern to process message (otherwise it is skipped). ( '?' - match exactly one character, '*' - match zero or more ) ( '!' - match exactly one alpha, '$' - match zero or more ) ( '#' - match exactly one digit, '@' - match zero or more ) Use the backslash '\' character to escape an input sequence. For example to use the '*' as a character use the '\*' sequence. Use '\\' where a single backslash is required. For example: postie ... -pat:"*MAKE MONEY FAST*" -rm (NOT AVAILABLE IN FREE VERSION) -spat:pattern - sender must match wild-card pattern to process message (otherwise it is skipped). -nospat:pattern - sender must not match wild-card pattern to process message (otherwise it is skipped). ( '?' - match exactly one character, '*' - match zero or more ) ( '!' - match exactly one alpha, '$' - match zero or more ) ( '#' - match exactly one digit, '@' - match zero or more ) Use the backslash '\' character to escape an input sequence. For example to use the '*' as a character use the '\*' sequence. Use '\\' where a single backslash is required. (NOT AVAILABLE IN FREE VERSION) -cert:certfile - use client certificate for SSL authentication. -gmt/-nogmt - format date on sent messages in GMT rather than local time. This might fix time-zone and daylight savings problems that some people experience. -utc/-noutc - format date on sent messages in UTC rather than local time. This might fix time-zone and daylight savings problems that some people experience. -noop - no-operation (also NOOP config keyword). -unique - extracted file attachments are given a unique name (if they clash) otherwise it just overwrites a file of the same name (also UNIQUE keyword). See -extract option. -hdr:string - add a mail header to outgoing messages. For example... postie -hdr:"X-MyHeader1: blurdy\r\nX-MyHeader2: bloop\r\n" ... And note: each header must be terminated by CR+LF (as above). -hdr:filename - as above but read headers from a file, line by line. (NOT AVAILABLE IN FREE VERSION) -ldap:hostname - name of an LDAP server to use for directory service lookups (LDAP_HOST in config). (NOT AVAILABLE IN FREE VERSION) -ldapasdns - use the same host name for the LDAP server as used with DNS lookups (LDAPASDNS in config). -ldapcc - addresses should be Cc:'d rather than To:'d. -ldapbcc - addresses should be Bcc:'d rather than To:'d. -base:string - LDAP base to use for a search (eg. -base:"o=My organization"). -binddn:string - LDAP DN to bind with (eg. -binddn:"o=My organization"). -bindpwd:string - LDAP password to bind with (eg. -bindpwd:"secret"). -search:pattern - search pattern to look for LDAP lookup (SEARCH in config) (eg. (-search:"cn=smith, john"). -attrib:name - name of an LDAP attribute to use for email address (the default is 'mail'). -retries:nbr - number of connection retries before giving up (default is zero retries). -size - display message size. -sort:key-list - list of keys to sort IMAP messages on (if SORT supported by server). Valid keys are 'arrival', 'date', 'cc', 'reverse', 'size', 'subject' and 'to'. The 'reverse' keyword changes the sort order of subsequent keys. For example... postie -imap -sort:"subject reverse date" ... -search:search-list - list of terms to search IMAP messages on. Valid keys are: postie -imap -search:"since 01-Jan-1999" ... postie -imap -search:"before 01-Jan-1999" ... postie -imap -search:"since 01-Jan-1999 before 30-Jun-1999" ... postie -imap -search:"FLAG unseen" ... postie -imap -search:"subject test" ... where 'FLAG' is one of 'seen/unseen/recent/new/draft/flagged/deleted/undeleted/answered/unasnwered' -idle - when receiveing via IMAP wait for new messages if none present (only if IDLE extension is supported by the server). -header:string - Add prefix string to messages. This can be usefull if message body is being streamed in from a file or standard input via an external process. For example... postie -header:"Data follows...\n\n" ... -ssl - try to enable SSL if the server supports it (old style using special ports). (NOT AVAILABLE IN FREE VERSION) -tls - try to enable SSL if the server supports it (new style STARTTLS/STLS method). (NOT AVAILABLE IN FREE VERSION) -mail - input or output is a raw mail file (use -host: to specify the filename). -decode:base64 - decode a BASE64 input file. -decode:uue - decode a UUE input file. (NOT IMPLEMENTED YET) -decode:qp - decode a Quoted-Printable input file. (NOT IMPLEMENTED YET) -encode:base64 - encode a BASE64 output file. -encode:uue - encode a UUE output file. (NOT IMPLEMENTED YET) -encode:qp - encode a Quoted-Printable output file. (NOT IMPLEMENTED YET) -wrap:n - wrap encodings (see above) at this many characters per line. MIME/BASE64 is 72 (DEFAULT), but others may differ. -harvest:filename - save From (or Reply-To if present) addresses to the named file (appended). -firewall:cmd - after connecting to a firewall issue the following command (usually a connect string), eg... postie -host:fw-server -port:12345 -firewall:"connect my-pop-server 110" -user:... -bs - display the IMAP body structure. -part:nbr - extract just the specified IMAP section number (MIME specified part). Section names (part specifiers) can be determined from the IMAP body structure display (see above). This is very obscure and mainly a debugging aid. Use with '-encoding:type' to preset for decoding to get a raw binary object. -part:nbr:offset:n - extract just the specified IMAP section (MIME specified part). Start at the specified byte offset 'off' and retrieve 'n' bytes. -encoding:type - specify the encoding used on the part (above) so that it can be decoded. Should be one of "base64", "quoted-printable", "7bit", "8bit" or "uuencoded" (or "none"). -vpim - package a Voice Profile for Internet Mail version 2 message. Use the extended form of the '-a:filename|headers' option to attach media. -pgp[:program] - use PGP to encrypt/decrypt and/or sign/verify (eg. -pgp:"pgp.exe" is the default). -pgppass:passphrase - PGP passphrase -sign - PGP sign messages (eg. -pgp -sign) -encrypt - PGP encrypt messages (eg. -pgp -encrypt) -kbs - on send and receive display the KB/sec transfer rate. -ipv6 - use IPv6 addresses in preference to IPv4 if both exist (default is the other way). -tunnel:proxy[:port] - use HTTP tunnelling (if possible) to access external services. The value of 'port' defaults to '80' if not specified. (NOT AVAILABLE IN FREE VERSION) -noesc - only decode \r, \n and \t escapes in message and header strings (-msg:string, -hdr:string). --noesc - don't even decode \r, \n and \t in message string (-msg:string). -http11 - use HTTP/1.1 instead of HTTP/1.0 protocol (WebDAV commands set this automatically). -nohttp11 - don't use HTTP/1.1, instead use HTTP/1.0 protocol (the default) -umbox - raw output is in Unix 'mbox' format (use with -raw). -if:address - set specific interface address to bind outgoing connections (eg. -if:192.168.1.100) (NOT AVAILABLE IN FREE VERSION) -force - force unnamed attachments to be saved as attachments when extracting. Sets -unique as well. -depth:nbr - set the depth for a WebDAV collection operation (default is 'infinity')' -propfind:xmlfile - execute WebDAV 'PROPFIND' operation on the URL named in '-url:URL'. Payload is the file named in 'xmlfile'. -proppatch:xmlfile - execute WebDAV 'PROPATCH' operation on the URL named in '-url:URL'. Payload is the file named in 'xmlfile'. -mkcol - execute WebDAV 'MKCOL' operation to create the URL named in '-url:URL'. -copy:desturl - execute WebDAV 'COPY' operation on the URL named in '-url:URL'. Destination is 'desturl'. -move:desurl - execute WebDAV 'MOVE' operation on the URL named in '-url:URL'. Destination is 'desturl'. -put:file - execute WebDAV/HTTP 'PUT' operation on the URL named in '-url:URL'. Payload is 'file'. -delete - execute WebDAV/HTTP 'DELETE' operation to delete the URL named in '-url:URL'. (NOT AVAILABLE IN FREE VERSION) -register - execute a SIP 'REGISTER' operation (use -to and auth options) to log in. -message - execute a SIP 'MESSAGE' operation (use -to, -from, -s, -msg:string options) to a logged in user. -contact:address - set the SIP (or other) contact address. SIP operations support both TCP and UDP (the default) modes, for example: postie -user:andrew -pass:passwd -to:"sip:me@example.test" -contact:"sip:me@pc1.example.test" -register postie -user:andrew -pass:passwd -to:"sip:me@example.test;transport=udp" -contact:"sip:me@pc1.example.test" -register are all equivalent and use UDP, while: postie -user:andrew -pass:passwd -to:"sip:me@example.test;transport=tcp" -contact:"sip:me@pc1.example.test" -register uses TCP. For SSL use: postie -user:andrew -pass:passwd -to:"sips:me@example.test" -contact:"sip:me@pc1.example.test" -register and TCP is assumed for SSL connections. To send an instant message to a currently online (ie. registered) user do: postie -to:"you@example.test" -from:"me@example.test" -s:"test" -msg:"line1\nline2\nline3" -message SIP (Session Initiation Protocol) options are NOT AVAILABLE IN FREE VERSION. WebDAV (Web Distributed Authoring and Versioning) options are NOT AVAILABLE IN FREE VERSION. Note: the -pgp option assumes PGP is installed on the computer and accessible. When a pass-phrase is needed it is assumed to be available to PGP via the command-line or an environment setting. EXAMPLES: Decode a BASE64 encoded file... postie -decode:base64 plain-file Encode a BASE64 plain file... postie -encode:base64 -wrap:64 encoded-file Sending mail... postie -host:mailserver.com -from:fred@here -to:joe@there -s:"Here it is..." -nomsg -a:file.zip postie -from:fred@here -to:joe@there -to:fred@there -s:"Hello there" " -s:"Hello there" -msg:"This a mail message" Sending mail direct to user... postie -mx -from:fred@here -to:joe@there -s:"Here it is..." -nomsg -a:file.zip Posting mail direct to an IMAP folder... postie -from:fred@here -to:joe@there -s:"Here it is..." -msg:text -imap -mbox:"Sent Items" Sending a VPIM package... postie [posting options] -vpim -a:"message.wav|Content-Type: audio/x-ms-wav\nContent-Disposition: inline; voice=voice-message; filename=\"message.wav\"" -a:"fax.tif|Content-Type: image/tiff; application=faxbw" -a:"andrew.vcf|Content-Type: text/directory; charset=us-ascii; profile=vCard" Sending PGP encrypted mail... postie -pgp -encrypt -to:address -from:address -s:subject -file:message-file Assumes that the recipient address is found in the local public keyring. Sending PGP signed mail... postie -pgp -sign -to:address -from:address -s:subject -file:message-file -pgppass:my-pass-phrase Assumes that the sender address is found in the local public keyring. Sending PGP signed and encrypted mail... (NOT IMPLEMENTED YET) postie -pgp -encrypt -sign -to:address -from:address -s:subject -file:message-file -pgppass:my-pass-phrase Assumes that the sender and recipient addresses are found in the local public keyring. Sending MHTML (MIME HTML) with embedded objects... Create a file 'test.html' as follows: Test MIME HTML Aggregate Encapsulation This is an image that is an example of MIME HTML aggregate encapsulation... Then run POSTIE: postie -to:me -from:me -s:test -html -alt -file:test.html -i:"tada.wav|cid:sound" -i:"new.gif|cid:image" The resultant email message can be viewed in all it's graphic glory by the recipient even if they don't have Web access. Technically, a CID is specified as 'cid:GUID' where a 'GUID' is a globally unique identifier and the recommended form for one is 'SUID@domain' where 'SUID' is a site unique identifier. So the above example cheats! There is another form that uses HTTP references... Then run POSTIE: postie -to:me -from:me -s:test -html -alt -file:test.html -i:"d:\images\new.gif|image.gif" which works with Microsoft Outlook98 but not with Netscape/Mozilla. Posting contents of an HTML form... Send email from an HTML form...
Subject:
To:
Cc:
Bcc:

HTML mail? To newsgroup?
The 'host' and 'from' values can also be set in a config file called 'postie.txt' which should be in the same directory as the POSTIE executable or in the home directory of the account the CGI runs as (depending of course upon which Web server is in use). See sample file 'postie.txt' in this directory. Sending news... postie -news -host:newsserver.com -from:fred@here -to:alt.test -s:"Test: ignore" -msg:"Testing" [-user:userid -pass:secret] Deliver URL by email... postie -host:mailserver.com -to:fred -from:me -s:"Here it is" -nomsg -url:"http://somewhere.com/help/readme.txt" -rm Get URL... postie -noop -extract:"c:\temp" -url:"http://somewhere.com/help/readme.txt" Get URL to file... postie -noop -extract:"c:\temp" -url:"http://somewhere.com/cgi-bin/test.pl?a=1&b=2|test.html" Make XML (in this case XML-RPC) call... postie -noop -mime:"text/xml" -post:"validator1.arrayofstructstest.xml" -url:"http://validator.xmlrpc.com:80/RPC2|result.xml" Make WebDAV call... postie -noop -mime:"text/xml" -mkcol:"webdav.xml" -url:"http://webdav.mydomain/webdav/my-collection" Listing mail... postie -host:mailserver.com -user:userid -pass:secret -br postie -host:mailserver.com -user:userid -pass:secret -br -imap -mbox:personal Retrieving mail... postie -host:mailserver.com -user:userid -pass:secret -msg:1 -file:mail.dat -extract -rm Read from a mail file... postie -host:"c:\temp\winmail.eml" -mail -extract Post to a mail file... postie -host:"c:\temp\winmail.eml" -mf -to:address -from:address -s:subject -msg:string ... Read from a mail file and forward on... postie -host:"c:\temp\winmail.eml" -mail -relay:mail-server [-to:address] Relaying mail from a drop box... postie -host:mailserver.com -user:userid -pass:secret -relay:localserver.com -rm This is a very risky and unreliable operation as it depends on the validity of the To: header and that it not contain a loop. Also, if you are the Cc: (or Bcc:) recipient then the message will be delivered (again) to the original (To:) recipient and not you. In short, it is much preferable to use the form below, where the recipient is forced to the specified address. As above but forwarding mail to a user... postie -host:mailserver.com -user:userid -pass:secret -relay:mail.server -to:andrew -rm Relaying masqueraded mail... postie -host:mailserver.com -user:userid -pass:secret -relay:localserver.com -alias:alias.txt -rm Create a file 'alias.txt' like... "John Smith" : john@localserver.com "Mary Jones" : mary@localserver.com account@mailserver.com: postmaster@localserver.com and note: the last entry is a 'catch-all' to pick up any other mail items. You can leave this out if you need to mix masqueraded and 'real' mail in the one account as unmatched items will not be deleted when -rm option used. Running from a CGI program... To run Postie from a CGI program and get it to process command-line arguments properly you must first un-set the environment variable 'GATEWAY_INTERFACE' or run the program without inheriting the parent CGI program's environment. or... Run the postiecgi.exe instead. List-server... postie -host:mail.server -user:postie-list -pass:secret -listserv:postie-list@server -tolist:postie.lst -owner:adavison@ozemail.com.au -log:postie-list.log -rm Send messages with 'subscribe' or 'unsubscribe' as the subject to control the list. Posts sent to the list will be distributed to all members of the list and will be seen as originating from the list (that is their email address will not be displayed unless a signature is included). This means that replying to a posting will go back to the list. This may annoy some people, but it's how i've always wanted lists to work and saves a lot of bother if you ask me. Undeliverable message returns will not flood the whole list as only subscribers are allowed to post. Can now request files with 'INDEX' (or 'DIR') or 'FETCH filename' (or 'GETt filename') as the subject. Selected files are returned as an email attachment. Requested files are relative to the '-fetch:path' directory if specified. If not specified then fetch mode is disabled. Only list subscribers may fetch files unless '-open' is used. To make a mailing-list (ie. mailout-list) and not a discussion-list add the '-priv' option. Auto-dialling... The following example is for NT... postie -connect:"My ISP" -noop postie options... postie -disconnect -noop or in one go... postie -connect:"My ISP" options... -disconnect Use escaped quotes to add additional parameters or to use embedded spaces eg. postie -connect:"\"My ISP\" userid passwd" etc. The configuration file 'postie.txt' MUST contain a line specifying the dialer program to use... DIALER rasdial - for NT DIALER rasdial95 - for 95 (a shareware product I believe) Use of Inetrnet connection management in Win98 should make use of dialer as above unnecessary. Masquerading... Added mailbox masquerading using '-masq:username' option. This can be useful where you have only one mailbox account but multiple users. Each user sends mail with a from address of the form... -from:"John.Smith " OR -from:"Mary.Jones " Then each individual's mail can be retrieved as follows... postie -host:mailserver.com -user:account -pass:secret -masq:"John Smith" postie -host:mailserver.com -user:account -pass:secret -masq:"Mary Jones" Masquerading allows you to share a mailbox! The naming comes from Linux IP Masquerading which does the same thing but for IP addresses. You would probably want to use this feature with the '-relay' option to dump to local accounts. You will probably now want to use the new -alias:filename option instead of multiple commands using -masq. XML reading... postie -xml -file:test.xml -id:marketing -descendant:1:name:hair:yellow postie -xml -file:test.xml -descendant:2:name:hair:yellow XML editing... postie -xml -file:test.xml -descendant:2:name:hair:yellow -child:1 -set:Lorrikeet -save:test2.xml LDAP Directory Services For example... postie -ldap:server-name -binddn:"o=My Org" -bindpwd:"secret" -base:"o=My Org" -search:"cn=some-name" -noop will print out any common-name matches on 'some-name'. And... postie -ldapasdns -mx -search:"cn=some-name" -from:"my@ddress" -s:"test via LDAP" -msg:test will send to the Internet address listed for 'some-name'. The LDAP server is assumed to be the same as the DNS server (as retrieved from the TCP/IP info in the registry). Proxying: A simple proxy for uni-ported protocols like SMTP, POP3 and IMAP4 is now included. It will allow multiple connections through to an outside gateway machine... proxy -host:hostname -port:service [-port:service ...] Language: To customise the output for non-English language copy the following to the 'postie.txt' configuration file... STRING_Folder <== Folder STRING_Moveto Move to ==> STRING_Delete Delete STRING_UnDelete Undelete STRING_Forward Forward... STRING_Reply Reply... STRING_Newsgroup Newsgroup? STRING_Trace Trace? STRING_Send Send STRING_View View... STRING_Create Create ==> STRING_Compose Compose... STRING_Purge Purge STRING_Logout Logout STRING_Bcc Bcc STRING_Cc Cc STRING_To To STRING_From From STRING_replyto Reply-To STRING_Date Date STRING_Subject Subject STRING_Wrote Wrote: STRING_Thereare There are STRING_Messageswaiting messages waiting STRING_Deletemessage Delete message # STRING_Inlineattachment Inline attachment? STRING_Importance Importance STRING_Sensitivity Sensitivity STRING_Organization Organization STRING_ReceiptTo Disposition-Notification-To Modify each line after the first space character to suit. MAILING LIST: Send a message with a subject of 'subscribe' or 'unsubscribe' to 'postie-list@infradig.com' to receive news about updates etc... mailto:postie-list@infradig.com?subscribe MISCELANEOUS: Bug reports, compatability problems, recommendations for improvements etc gratefully received. POLICY My software publishing policy is... release often! This may mean that bugs are more frequently let loose than you or I may like, but it also means that new features have the chance to be shopped around before they are set hard and fast.