Saving messages to files

In some situations you may need a copy of all messages to a specific account or domain automatically saved to a file. Both the alias and redirect keyword allows you to give a file or folder path as a <pattern2>:

alias peter@cust1.dk cust1.02@avalonia.dk :archive:cust1:peter:
alias paul@cust1.dk cust1.03@avalonia.dk :archive:cust1:paul

Here the first line forwards all messages to "peter@cust1.dk" to the mailbox "cust1.02@avalonia.dk", but at the same time a copy of the message is saved as a seperate file in a folder named "peter" inside a folder named "cust1" inside a folder named "archive", placed in the "MailRouter Ÿ" folder. MailRouter will automatically create all needed folders if missing. The format of the individual message files is the same as the file format used by the mail server. In the second line all messages to "paul@cust1.dk" are forwarded to "cust1.03@avalonia.dk", and at the same time saved to a single file named "paul". The format of the file is the same as the mailbox format used by some mail clients such as Eudora and elm. This allows the files to be opened and used directly from those mail clients.
By giving a folder path (ending with ":") messages will be saved as individual files, with the names given by your mail server when it passes the messages on to MailRouter. By giving a file path (not ending with ":") messages will be saved in the same file, with the name given in the path.
A path starting with the character ":" is taken to be a partial path always starting in the "MailRouter f" folder, but it is also possible to give a full path (including spaces):

alias peter@cust2.dk cust2.01@avalonia.dk "Boot:mail archive:peters mail"
redirect service "Mail:archive ""folder"":" Mail:backup:service

In the first line all messages to "peter@cust2.dk" are forwarded to the address "cust2.01@avalonia.dk", while also saving a copy in the file "Boot:mail archive:peters mail". In the second line all messages to all "service" accounts are saved into both a seperate file placed in the folder "Mail:archive "folder":" and the file "Mail:backup:service".

Generally any <pattern2> that contains the character ":" will be taken to be a file or folder path, and if possible, all needed folders and files will automatically be created by MailRouter.
Note: MailRouter does not accept paths containing "::", and will interpret all occurrences of "::" as ":".



Bo Holst-Christensen (holst@cutisan.dk)