home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User 3
/
AUCD3.iso
/
airport
/
utils
/
antutils
/
predeliver
/
!Help2
next >
Wrap
Text File
|
1996-12-09
|
4KB
|
94 lines
PreDeliver
==========
by Tony Houghton <curler@tonyh.tcp.co.uk>
Version 1.00 (4 December 1996)
Allows users with multiple users on one POP3 mailbox to have their mail
filtered to the correct user without using Newsbase. This requires a special
facility to be set up on the mail server by the ISP.
For details of PreDeliver2, which does not require a special mailbox
facility, see below, but also read the instructions for PreDeliver.
How it works
------------
InetSuite's mail fetcher places mail in InetSpool:Input, adding a RCPT TO
line at the top of each message to indicate which mailbox it came from. When
mail is delivered, the MTA uses this line to determine whose mailbox to
deliver it to in InetSpool:Mail.
PreDeliver works by checking for an alternative address in a configurable
header (default X-RCPT-To), replacing the one in the RCPT TO line. Once this
process is done PreDeliver optionally sends a message to InetSuite to deliver
the mail as normal.
Warning
-------
It's a bit limited, because the header must contain nothing but an email
address, although it is allowed to be enclosed in angle-brackets and/or have
leading whitespace. Any attempt to use it on headers that aren't this simple
will result in "undefined behaviour" ie although PreDeliver will probably
muddle on, what it does to the file might well cause InetSuite to do
something nasty.
Installing
----------
The most important thing is to edit Inet:Files.!InetMail and turn off
automatic delivery by making sure the appropriate line reads:
DeliverAuto: OFF
Otherwise the suite will periodically deliver mail without calling PreDeliver
first, so no filtering will be done.
I keep predeliver in the Inet:Bin directory and have added the line:
Pin Inet:Bin.predeliver 0 0
to InetSuite's !Run file so that it's easy to access. Remember to run it
whenever you want to deliver any mail *INCLUDING OUTGOING MAIL* because the
suite will no longer do this automatically for you.
Options
-------
I've tried to make sure the default settings are the most useful, but some
can be overridden by adding options to the command used to run predeliver.
You will need to use an Obey or TaskObey file if you want to be able to run
it with parameters by double-clicking.
-h<Header> Look for alternative email address in <Header> (case sensitive)
Default value is X-RCPT-To
-g Don't turn on hourglass (default turns on hourglass)
-d<n> Whether to send Deliver message to InetSuite when finished
Default value is 2
0 No message
1 Send message without calling Wimp_Initialise
2 Call Wimp_Initialise before sending message
-g and -d1 are provided so that it cn be run in a taskwindow. PreDeliver is
much faster than the actual delivery process, so I haven't found a pressing
need to make it multitask myself.
PreDeliver2
===========
Version 1.00 (8 December 1996)
This is similar to PreDeliver, but more powerful because it can extract email
addresses from more complicated headers, such as the To header. This means it
can be used to filter messages from mailing lists by users with a normal POP3
account. For each mailing list you will need to provide a local user with the
same name as used by the list eg inetchat.
PreDeliver uses the To header by default instead of X-RCPT-To.
If a header contains more than one email address, PreDeliver2 will use the
first one. It will not be able to find any email addresses after the first
line of a multiline header.
One limitation is that to prevent InetSuite helpfully delivering messages
from mailing lists back to the list instead of to you, all incoming mail must
be delivered to users on 'localhost' ie your machine. This means it is not
possible to run a public mailing list - but that isn't practical with a
single email address anyway.