# MCP - settings file.
#
# Optionals are commented out.

# LogFile <Name>
#
# Where to send the logoutput to.

#LogFile /boot/home/log/MCP.log

# Index <IndexName>
#
# We want these indexes for our messages:

Index Message822:From
Index Message822:Subject
Index Message822:Date
Index Message822:To
Index Message822:Cc
Index Message822:Reply-To
Index Message822:Newsgroups
Index Enamel:folder

# Target <Name> TargetPattern <TargetPattern>
#
# The target pattern has to match all messages that should be send to the given target. You may set
# multiple lines for the same target or specify multiple patterns in the same line.
#
# The pattern has to be simple, only asterisks (*) are allowed.
#
# Don't forget to set a target for your local machine to keep your own mail at home. And set a
# default target for the unmatched mail, too!
#
# Messages will always be send to all matching targets! So if two targets have the same or
# overlapping queries, _both_ targets get the messages.

# This one keeps all mail for private@john.doe.net.

Target private	TargetPattern "private@john.doe.net"

# We want to be able to fetch copies of our private mail via pop3 from another machine, too.

Target privatepop3	TargetPattern "private@john.doe.net"

# This one keeps all mail for business@john.doe.net.

Target business	TargetPattern "business@john.doe.net"

# This one is for our support mailing list.

Target support	TargetPattern "support@john.doe.net"

# This is the outside direction. Send news for all groups this way, put only if the source was "private".
# This is normally news written by me with hermes.

Target nntp		NewsGroups "*"		Source "private"

# This is the way inside. All news, no matter where they come from, for all groups, is sent to "news".
# Interesting point here is, that the news WE write match to this target, too. So we will always get a
# local copy of our postings.

Target news	NewsGroups "*"

# This is the rest; all outgoing mail is sent here.

Target default	Default


# Folder <FolderName> Query <QueryString>
#
# These are our folders... some tricks are used by these queries to speed them up a bit. First, only
# new messages are foldered. These should only be very few every time. Second, only messages,
# that do not have a folder set yet are foldered. This will also speed processing up a bit, but even
# more important, it will make sure that the folders you have set by hand will not be changed.

Folder BeDevTalk		Query "Enamel:status=New && Enamel:folder=None && ((Message822:To=*[dD]ev[tT]alk@[bB]e.com*) || (Message822:Cc=*[dD]ev[tT]alk@[bB]e.com*))"
Folder BeCodeTalk	Query "Enamel:status=New && Enamel:folder=None && ((Message822:To=*[cC]ode[tT]alk@be.com*) || (Message822:Cc=*[cC]ode[tT]alk@be.com*))"

# Redirect <TargetName> [ReplyTo <ReplyToAddress>
# [<EmailAddress>]
# [<EmailAddress>]
# ...
#
# And we have simple mailinglists, too! Blank line ends this list! Make sure you configure a target for
# every list.

Redirect support ReplyTo support@john.doe.net
"John Doe <private@john.doe.net>"
"Lisa Doe <lisa@gmx.de>"

# Now some expires...

Expire news	Status New	Age 7d
Expire news	Status Old	Age 14d

Expire MCP	Status Old	Age 1d

Expire private	Status Old	Query "Message822:folder=BeDevTalk"	Age 30d
Expire private	Status Old	Folder BeCodeTalk	Age 10d


SetAttribute	Enamel:status	Value	"Expired"	Query	"Enamel:status=Deleted"
