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
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.
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 <filename and complaining that POSTIE just sits there indefinitely and does nothing. If you don't supply a message body POSTIE tries to read from standard-input to supply one. You can then type in some text and terminate input in the usual manner, or you should more likely use one of the options listed above.
Be careful using embedded double quotes, most shells require you to use \" to do so. For example...
postie -s:"This is a \"test\" message".
There is also a known problem with sending attachments when the current working directory is read-only or a Novell/Netware mounted drive. This is a problem with the Microsoft C run-time libraries and has existed for many years. Just CD to your hard-drive and use full path names on file specs.
If you are still having problems and feel the need to email me, use the '-v' option to get a detailed listing of the protocol interacation and include it with any problem report.
Finally, read this document again. All of it. There are a zillion options and some have interactions that may slightly alter the operation of another.
USAGE: (example only) square brackets '[]' indicate optional usage.
For SMTP posting...
postie [-host:server[,...]]
-to:address[,...] [-cc:address[,...]] [-bcc:address[,...]]
-from:address [-repltyto:address] -s:subject [-file:filename ...]
[-msg:text] [-nomsg]
[-a:filename ...] [-uue] [-high|-low]
For ESMTP authenticated posting...
postie ...posting options... -user:userid -pass:password [-crammd5]
For NNTP posting... (NOT AVAILABLE IN FREE OR PERSONAL VERSION)
postie -news [-noarchive]
[-host:server[,...]] -to:newsgroup[,...] [-cc:newsgroup[,...]]
-from:address [-replyto:address] -s:subject [-file:filename ...]
[-msg:text] [-nomsg]
[-a:filename ...] [-uue] [-user:userid -pass:password] [-url:URL]
For PGP posting... (NOT AVAILABLE IN FREE OR PERSONAL VERSION)
postie ...posting options... -pgp [-sign|-encrypt] [-pgppass:passphrase]
For HTML posting... (NOT AVAILABLE IN FREE OR PERSONAL VERSION)
postie ...posting-options... -html -file:filename [-alt[:filename]]
For VPIM posting... (NOT AVAILABLE IN FREE OR PERSONAL VERSION)
postie ...posting-options... -vpim -a:"filename|headers" ...
For IMAP4 posting to a folder... (NOT AVAILABLE IN FREE OR PERSONAL VERSION)
postie [-host:server[,...]] -imap [-mbox:foldername] -user:userid -pass:password [-crammd5] -to:address[,...] -from:address [-repltyto:address] -s:subject [-file:filename ...] [-msg:text] [-nomsg] [-a:filename ...] [-uue] [-high|-low]
For posting with an import file... (NOT AVAILABLE IN FREE OR PERSONAL VERSION)
postie -import -file:filename (see 'import.txt' for details).
For POP3 retrieving...
postie [-host:server] -user:userid -pass:password [-apop] [-br] [-file:outfilename] [-raw] [-html] [-extract:[path]] [-msg:nbr] [-rm] [-relay[:hostname] [-alias:filename | -to:address]] [-receipt|-mdn] [-pat:pattern | -nopat:pattern]
For IMAP4 retrieving... (NOT AVAILABLE IN FREE OR PERSONAL VERSION)
postie [-host:server] -imap [-user:userid -pass:password [-crammd5] | -preauth] [-br] [-file:outfilename] [-raw] [-html] [-extract:[path]] [-msg:nbr] [-rm] [-relay[:hostname] [-alias:filename | -to:address]] [-receipt|-mdn] [-mbox:folder] [-create:folder] [-delete:folder] [-move:folder|-copy:folder] [-purge] [-pat:pattern | -nopat:pattern]
For PGP retrieving... (NOT AVAILABLE IN FREE OR PERSONAL VERSION)
postie ...retrieving options... -pgp [-pgppass:passphrase]
For attaching a directory full of files... (NOT AVAILABLE IN FREE OR PERSONAL VERSION)
postie ...posting-options... [-dir:file-spec|-rdir:file-spec]
For attaching a directory full of files one per message... (NOT AVAILABLE IN FREE OR PERSONAL VERSION)
postie ...posting-options... -train [-dir:file-spec|-rdir:file-spec]
For posting with LDAP lookup... (NOT AVAILABLE IN FREE OR PERSONAL VERSION)
postie ...posting-options... -ldap:server[:port] [-base:dn] [-search:filter] [-ldapcc|-ldapbcc]
For setting IMAP4 Access Control Lists (ACLs)... (NOT AVAILABLE IN FREE OR PERSONAL VERSION)
postie [-host:server] -imap [-user:userid -pass:password | -preauth] -mbox:folder [-getacl] [-setacl:userid:rights] [-deleteacl:userid] [-listrights:userid] [-myrights]
For use of SSL/TLS... (NOT AVAILABLE IN FREE OR PERSONAL VERSION)
postie ...regular-options... [-ssl|-tls]
For mail-file (.eml etc.) retrieving...
postie -mail [-host:filename] [-br] [-extract:path] [-file:outfilename]
For mail-file (.eml etc.) forwarding...
postie -mail [-host:filename] -relay[:server] [-to:address]
For mail-file (.eml etc.) posting...
postie ...posting-options... -mf
[-host:filename]
For list-server processing...
postie [-host:server] -rm -user:userid -pass:password -tolist:filename -listserv:address -owner:address [-priv] [-fetch:path [-open]] [-every:mins]
For SMTP queue transfer...
postie [-host:server] -etrn:domain
OPTIONS: | |
-host:hostname | 'hostname' is the name of an SMTP server (or POP3 server), defaults to 'localhost'. Can also be set in a <FORM> with a field name of 'postie_host'. When posting mail 'hostname' can optionally be a comma-separated list of server names to try 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 <FORM> with a field name of 'postie_news'. Also, reverses sense of '-qp' option (see below). (NOT AVAILABLE IN FREE OR PERSONAL VERSION) |
-imap | read from an IMAP4 server else POP3 is assumed. (NOT AVAILABLE IN FREE OR PERSONAL VERSION) |
-apop | use POP3 'APOP' authentication mechanism if available. |
-crammd5 | use IMAP4/ESMTP 'CRAM-MD5' authentication mechanism if available. |
-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 <andrew@infradig.com>" and the older variant -to:"andrew@infradig.com(Andrew Davison)". Can also be set in a <FORM> 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 <FORM> 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 <FORM> with a field name of 'postie_bcc'. |
-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 OR PERSONAL 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 OR PERSONAL 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 OR PERSONAL 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 | request delivery status notification (DSN) from server. |
-mdn | SMTP: request mail disposition notification (MDN) from client. |
-notify | request mail delivery & disposition status notification (same as -dsn & -mdn). |
-receipt | send read receipt to someone whether they requested one (MDN) or not. |
-mdn | POP3/IMAP4: send a read receipt to someone who requested one (MDN). |
-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). |
-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 <FORM> with a field name of 'postie_subject'. |
-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. |
-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. |
-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. |
-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 <base> 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 <FORM> with a field name of 'postie_html'. (NOT AVAILABLE IN FREE OR PERSONAL VERSION) |
-alt | HTML input is also translated to plain-text and both are sent as MIME multipart/alternative. (NOT AVAILABLE IN FREE OR PERSONAL VERSION) |
-alt:textfile | HTML input is accompanied by specified plain-text and both are sent as MIME multipart/alternative. (NOT AVAILABLE IN FREE OR PERSONAL VERSION) |
-a:filename | where 'filename' is the name of a file to be sent with the mail message as a multipart MIME attachment. The file is removed ONLY if the '-rm' option is also used. This option can be repeated any number of times. |
-a:filename|headers | where 'filename' is the name of a file to be sent with the VPIM mail message as a multipart/voice-message MIME attachment. The file is removed ONLY if the '-rm' option is also used. This option can be repeated any number of times. |
-i:filename|url | where 'filename' is the name of a file to be included with the mail message as a related object and 'url' is the URL or CID of the object as referenced in the 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. (NOT AVAILABLE IN FREE OR PERSONAL VERSION) |
-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. (NOT AVAILABLE IN FREE OR PERSONAL VERSION) |
-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. (NOT AVAILABLE IN FREE OR PERSONAL VERSION) |
-train | modifies use a following '-dir' or '-rdir' option such that they send a message for each file with a single attachment. A 'message train' is thus generated. (NOT AVAILABLE IN FREE OR PERSONAL 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 OR PERSONAL VERSION) |
-rdir:filespec | all files in named directory are attached to the message. NOTE: does 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 OR PERSONAL 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. |
-use_mime: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) |
-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. |
-user:userid | IMAP4/POP3/NNTP account userid. Can also be set in a <FORM> with a field name of 'postie_user'. |
-pass:passwd | IMAP4/POP3/NNTP account password. Can also be set in a <FORM> with a field name of 'postie_pass'. |
-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 *slighly* 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 <IMG> tag in conjunction with the '-redirect' option. You can run multiple POSTIE commands by using <IMG> tags with harmlessly redirected reponses, or use be daring and use the <OBJECT> tag to embed text responses. |
-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. |
-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 rather than a file. 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. |
-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. |
-log:filename | appends status info to log file. also use '-v' option. |
-br | list basic POP3/IMAP4 headers only (else message text gets displayed). |
-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. |
-extract[:path] | extract attachments to separate named files, in current-directory or named directory. |
-get:name | used to retrieve an attachment in CGI mode. |
-config | read the 'postie.txt' (or whatever the 'POSTIE_CONFIG' environment variable points to) configuration file (see sample file 'postie.sam' in this directory). |
-config:filename | read the specified configuration file (see sample file 'postie.sam' in this directory). |
-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 set list cannot process subscribe/unsubscribe requests. |
-noatt | if specified then binary-attachments are dropped. |
-uue | attachments OR message are UUencoded before being sent. |
-probe:address | test that 'address' is a 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 OR PERSONAL VERSION) |
-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. |
-mbox:name | (IMAP4) set the current mailbox (i.e. folder) for reading (default is INBOX). |
-create:mbox | (IMAP4) create named mailbox. |
-delete:mbox | (IMAP4) delete named mailbox (if no subordinates). |
-move:mbox | (IMAP4) move selected message(s) to named mailbox. |
-copy:mbox | (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 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 (when '-alias' is specified). |
-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 to the number of messages queued for reading (on 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?text?= content. |
-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 ) For example: postie ... -pat:"*MAKE MONEY FAST*" -rm |
-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 ) |
-cert:certfile | use client certificate for SSL authentication. |
-gmt | format date on sent messages in GMT/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). |
-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). |
-ldap:hostname | name of an LDAP server to use for directory service lookups (LDAP_HOST in config). (NOT AVAILABLE IN FREE OR PERSONAL 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:"unseen" ... postie -imap -search:"subject test" ... |
-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 OR PERSONAL VERSION) |
-tls | try to enable SSL if the server supports it (new style STARTTLS/STLS method). (NOT AVAILABLE IN FREE OR PERSONAL VERSION) |
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) |
Note: the -pgp option assumes PGP is installed on the computer and accessible. When a pass-phrase is needed it is asusmed to be available to PGP via the command-line or an environment setting.
postie -decode:base64 <encoded-file >plain-file
postie -encode:base64 -wrap:64 <plain-file >encoded-file
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" <file.txt
postie -from:fred@here -to:joe@there -s:"Hello there" -msg:"This a
mail message"
postie -from:fred@here -to:joe@there -s:"Hello there" -html
-file:file1.html
postie -from:fred@here -to:"Joe Blow <joe@blow>" -s:"Hello there"
-msg:"This a mail message"
postie -mx -from:fred@here -to:joe@there -s:"Here it is..." -nomsg -a:file.zip
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"
postie -pgp -encrypt -to:address -from:address -s:subject -file:message-file
Assumes that the recipient address is found in the local public keyring.
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.
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.
Create a file 'test.html' as follows:
<html>
<head>
<title>Test MIME HTML Aggregate Encapsulation</title>
</head>
<body>
<bgsound src="cid:sound">
This is an image that is an example of MIME HTML aggregate
encapsulation...
<img align=right src="cid:image">
</body>
</html>
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...
<img align=right src="image.gif">
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 Communicator (v4.05).
<form method=POST
action="/cgi-bin/postie.exe?-cgi:-from:fred@here&-to:joe@there&-s:Enquiries+form&-post&-redirect:/enquiries/done.html">
<input type=submit value="Send">
</form>
<form method=POST
action="/cgi-bin/postie.exe?-cgi:-post&-from:me@here.com">
<input type=hidden name=postie_host value="here.com">
Subject: <input type=text name=postie_subject size=72><br>
To: <input type=text name=postie_to size=72><br>
Cc: <input type=text name=postie_cc size=72><br>
Bcc: <input type=text name=postie_bcc size=72><br>
<textarea name=postie_data cols=72 rows=10 wrap></textarea><br>
<input type=checkbox name=postie_html> HTML mail?
<input type=checkbox name=postie_news> To newsgroup?
<input type=submit name=postie_submit value="Send">
</form>
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.
postie -news -host:newsserver.com -from:fred@here -to:alt.test -s:"Test: ignore" -msg:"Testing" [-user:userid -pass:secret]
postie -host:mailserver.com -to:fred -from:me -s:"Here it is" -nomsg -url:"http://somewhere.com/help/readme.txt" -rm
postie -noop -extract:"c:\temp" -url:"http://somewhere.com/help/readme.txt"
postie -noop -extract:"c:\temp" -url:"http://somewhere.com/cgi-bin/test.pl?a=1&b=2|test.html"
postie -noop -mime:"text/xml" -post:"validator1.arrayofstructstest.xml" -url:"http://validator.xmlrpc.com:80/RPC2|result.xml"
postie -host:mailserver.com -user:userid
-pass:secret -br
postie -host:mailserver.com -user:userid -pass:secret -br -imap
-mbox:personal
postie -host:mailserver.com -user:userid -pass:secret -msg:1 -file:mail.dat -extract -rm
postie -host:"c:\temp\winmail.eml" -mail -extract
postie -host:"c:\temp\winmail.eml" -mf -to:address -from:address -s:subject -msg:string ...
postie -host:"c:\temp\winmail.eml" -mail -relay:mail-server [-to:address]
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.
postie -host:mailserver.com -user:userid -pass:secret -relay:mail.server -to:andrew -rm
postie -host:mailserver.com -user:userid -pass:secret -relay:localserver.com -alias:alias.txt -rm
Create a file 'alias.txt' like...
"John Smith" <account@mailserver.com>:
john@localserver.com
"Mary Jones" <account@mailserver.com>: 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.
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.
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.
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 specifiying the dialler 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 dialler as above unnecessary.
Sorry about the mispelling of 'dialer'.
Added mailbox masquerading using '-masq:username' option. This canbe 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
<account@mailserver.com>" OR
-from:"Mary.Jones <account@mailserver.com>"
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.
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).
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 ...]
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.
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
Bug reports, compatability problems, recommendations for improvements etc gratefully received.
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.