enamel - the mailserver for the BeO S
Contents [ MCP ] [ nntp ] [ smtp ] [ smtpd ] [ pop3 ] [ pop3d ] [ hermes ] [ Up ] | MCP MCP is the core part of enamel. It waits for new messages with the target "MCP" to process them. It is able to distribute messages to different targets depending on the recipients. Additional to that, it sets folders depending on standard Be queries, generates attribute indieces and it is able to redirect messages to a list of recipients, a way to do simple mailinglists. To configure MCP, you have to edit the file /boot/home/config/settings/MCP_settings with an editor like StyledEdit or vi. Please have a look at the example config file to find out more about that file. The following is a description of the available config keywords: Logfile <Name> The file MCP writes some logging output to. (e.g.: LogFile /boot/home/log/MCP.log) Index <Attribute> MCP will generate an index for every attribute you specify here. This is necessary if you want to perform queries on that attribute later. For sure you could do the same with mkindex. (e.g.: Index Message822:To) Folder <Name> Query <Querystring> The attribute "Enamel:folder" will be set to "Name" for every file matching "Querystring". "Querystring" is a normal Be query. Check Be's documentation for more details about those. A good idea is to start every querystring with "Enamel:status=New && Enamel:folder=None". This way no message is touched that is old or has already a folder set. Especially the last point is important, because it preserves folders you have set by hand. (e.g. 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*))") Redirect <Target> [ReplyTo <ReplyAddress>] <Address> [<Address>] ... With this you can redirect messages to one or more addresses. All messages for the given target will be picked up and sent to all the recipients on the redirect list. The list of members ends with a blank line. A speciality is the "ReplyTo" argument. If this is given, then the "ReplyAddress" will be set in the new messages. This is useful for simple mailinglists. Target <Name> [TargetPattern <Pattern>|Default] [NewsGroups <Grouplist>] [Source <SourceName>] This is the most important part of MCP. With Target, you specify which target should recieve which messages by the recipients. Which recipients "belong" to this target is decided by "Pattern". This pattern is no Be query! This is a simple pattern (no regex, you may only use the asterisk (*)) which is compared against the receipients of the message. If a message matches more than one target, it will be sent to all the targets! On one hand, this is normal because the message could for example have two recipients which are reachable via two different targets. But you can also can figure MCP to have two targets for the same recipients or partly overlapping groups of recipients. But you should be really careful with this. As an example, you could have a local target for your messages and have the same messages available via pop3, too. You should always have a target with the "Default" switch instead of a "TargetPattern" set. All the messages that don't match to one of the normal Target lines will be put to this one. Normally you will set the "Default" switch for the target all your outgoing messages go to. Example: Your email address is john@dow.jones. Your girlfriends email address is lisa@dow.jones. So you should set two targets: Target john TargetPattern "john@dow.jones" Target lisa TargetPattern "lisa@dow.jones" All mail inside germany (.de) should be send to a special provider: Target special TargetPattern "*.de" The rest is sent to your normal uplink: Target normal Default The "Newsgroups" argument is for delivering news postings to it's target. Normally, a news posting does not have a Recipient set, so they are ignored by the "TargetPattern" argument. With the "Newsgroups" statement, you can specify which groups should be delivered to the given target. The "Source" argument does work together with the "Newsgroups" argument only at the moment, but for this, it is very important. Normally, you have a target for all outgoing postings, that should be sent out via nntp. In the normal configuration, all messages that are important by nntp, would be sent out by nntp again, because nntp's target pattern matches those articles, too. This is what the "Source" statement is for. With this statement, you tell MCP to move only those messages to the given target, that have the matching source attribute set. Now you only have to tell your client to set that attribute on all articles you're writing. Expire <Target> [Status <Status>] [Folder <Folder>] [Age <Age>] [Query <Query>] Ever cared about how to get rid of old messages? MCP automatically deletes all messages, that have their status set to "Expired". You can do this by hand, you can use a script to do that or you can use MCP's Expire functionality, which will do exactly that for you. Expire has to be configured for every Target separately. So the first argument it takes is the "Target" which should be expired. You should remember here, that you don't have only the targets where you read mail from (e.g. "private" and "news"), but also a target for outgoing mail (often: "default") and outgoing news (often: "nntp"). One important thing to mention here is, that enamel's pop3d sets messages that are deleted by the client to "Old", not "Expired". With the additional arguments, you can (and should!) closer specify which messages should be expired. "Status" lets you for example specify, that only old messages should be expired (Status "Old"). "Folder" narrows your expire down to those messages, that have been put in that folder. This is a useful feature, as you will often recieve mailing-lists in your private folder, but you will want to expire those lists quicker than your private mail. "Age" is the most important argumet. It specifies how old the messages may be before they get expired. The age is normally given in days, but by adding a modifier (s for seconds, m for minutes, h hours and d for days) you can expire your messages after a second or after years. For example Age "30m" would not expire your messages after just 30 minutes of existance. For those who want to get full control of the expire feature, there is the "Query" argument. Here you can enter any query you want to have your messages expired. You can also combine the query with the other arguments. Especially the "Age" argument is important here, because the age of a message can not be matched with a query. (e.g. Expire private Status Old Folder SpaceModelers Age 10d) SetAttribute <Attribute> [Value <Value>] [Query <Query>] SetAttribute is the ultimate multi-tool for the experienced user. With this, you can modify any field (specified as the first argument to SetAttribute) to any value (given by the "Value" parameter), as long as that value is a string. Which messages to modify is specified by the "Query" argument as a normal BeOS query. (e.g. SetAttribute Enamel:status Value "Expired" Query "Enamel:status=Deleted")