Opened 16 years ago

Last modified 12 years ago

#29 new enhancement

give example using Delivered-To/$1

Reported by: broder Owned by:
Priority: minor Milestone:
Component: mail Keywords: docs
Cc:

Description

"The ability to examine the delivered address is extremely useful, but it'd be easier to exploit if there were an example available. In particular, it'd save people like me from spending ten minutes wondering what trivial thing is wrong in my recipe when in fact the recipe is fine and the problem lies elsewhere.

I believe Tim has such an example.

Thanks! Greg"

(Taken from RT #486861)

Change History (3)

comment:1 Changed 16 years ago by broder

Here's an example, showing both ways to do this sort of thing. I suspect we may want to just advertise the second, since it's much cleaner.

# .procmailrc
PATH=/bin:/usr/bin:/usr/local/bin
# Directory to store messages in. Must be daemon.scripts writeable.
MAILDIR=$HOME/mail_scripts/write/
# Set QUEUENAME to the part after the + in tabbott+blah@scripts.mit.edu
QUEUENAME="$1"
# LOGFILE is location to log errors to. Must be daemon.scripts writeable.
LOGFILE=$HOME/mail_scripts/write/superlog

# save anything to tabbott+archive@scripts.mit.edu
:0
* ^Delivered-To:.*tabbott\+archive@.*
{
MAILDIR=/mit/tabbott/mail_scripts/write/
MSGPREFIX=archive.
:0: # trailing colon means to do locking here
*
# Using mh-style numbered listing.
archive
}

# Run process.pl on anything to tabbott+sipb@mit.edu 
:0
* QUEUENAME ?? ^sipb$
| /mit/tabbott/mail_scripts/process.pl

-Tim Abbott

comment:2 Changed 16 years ago by price

  • Priority changed from major to minor

comment:3 Changed 12 years ago by adehnert

  • Component changed from documentation to mail
  • Keywords docs added
Note: See TracTickets for help on using tickets.