Qbik Helpsys

WinGate Mail file and directory structure

WinGate uses a simple directory structure to store mail and organize mail files. All information is saved in files to safeguard against losing any mail. Another advantage of storing everything in files is that the administrator can make adjustments to mail as it is being processed. All message (MSG) files are RFC822 compliant, and all routing files (.rcp files) use a simple user-readable format.

File types

WinGate uses 3 different file types for it's mail operations. All of these files are text, which you can open and read with any text viewer.

  1. .msg files

    These are the actual messages in RFC822 compliant format.

  2. .rcp files

    These files contain information about who the mail is to, and who its from.

  3. .mri files

    These files are created in each domain directory, and contain information about when a domain was first tried, when it will be tried next, and how many times WinGate has attempted to send mail for this domain.

Mail Volumes

All mailboxes hosted by WinGate are now stored in a volume at a location you can specify. You can create more mail volumes for easy management and grouping of mailboxes.

Directories under WinGate Mail

WinGate uses a simple directory structure to handle and store mail files. By default the required directories will be created in folder called Mail under the directory where WinGate is installed. (e.g. WinGate\Mail). This can be changed to a different location if required by editing the registry.

Directory

Description

\Mailboxes

The contents of the default mailbox volume will be stored in the WinGate\Mail\Mailboxes directory. New mailbox volumes can be added (in new locations) from the Mailboxes tab in the WinGate Management console.

Within each mailbox volume directory are the folders corresponding to all current mailboxes. These are where messages will be stored.

e.g. A WinGate user called Bob has his mail stored in the Mailboxes volume WinGate\Mail\Mailboxes\bob.

All messages are in RFC822 text files.

Spool\Incoming

Mail messages and .rcp files are stored in this directory as they are received by the SMTP Delivery service.

Spool\Holding

Messages are stored in this directory till they have been delivered to all intended recipients.

Note

One message file may be addressed to several different recipients at several different domains, so it is much more efficient to store a single version of the file. Deleting a .msg file in this directory will prevent the email from being sent to any of the remaining intended recipients.

Spool\Domains\"domain.name"

Each domain that has messages waiting to send has an associated directory under the domains directory containing an .rcp file for each pending message.

For example, if there are 3 different messages to be delivered to hotmail.com, there will be a directory: domains\hotmail.com\ with three .rcp files, each of which contains the recipient list for the corresponding email (.msg file).

There will also be a domain.mri file, containing relevant delivery information. Deleting an .mri file will cause the resend schedule to be restarted (i.e. as if the emails had just been sent).

Deleting an .rcp file from a domain directory will prevent this message from being delivered to anyone at that domain.

Spool\Sent

If you choose to save a copy of all mail sent, then .msg files will be moved to this directory when delivered, instead of being deleted. This is a very good idea if you are having problems with your mail delivery.

Note

There is no size limit for this directory - the administrator is responsible for ensuring that it doesn't get too large for the machine to handle.

Spool\Domains\Dead

This directory will contain any files that have fallen into one of the following categories:

  • Orphaned files

    If a remote server or your Internet connection fails while you are receiving mail, you may get orphaned files. Files get orphaned if the administrator deletes one part of the message pair. If an .rcp file is found without a corresponding MSG file, then it is an orphan file, and visa versa.

  • Files with an error

    If you have a system crash while a file is being written, there may be an error processing the file. These are files that are not complete enough for WinGate to be able to use them to deliver a message.

  • Other

    If the mail system is ever unsure whether email has been successfully sent, then it will be 'backed up' to the dead directory. There is no size limit on this directory, the administrator is responsible for ensuring it doesn't grow too large.

To change the location of the Mail directory:

  1. Open the Run dialog from the Windows start menu.
  2. Type regedit
  3. Navigate to the following registry key HKEY LOCAL_MACHINE\SOFTWARE\Qbik Software\WinGate\Settings\Mail
  4. Double click on the string entry named MailRoot and in the Value data field enter the full path where the WinGate directories are to be located.

Mail loop protection

WinGate has loop protection. A mail loop can occur if a message is repetitively forwarded by mail servers but never reaches a final destination - WinGate stops this happening by limiting the total size of the message headers (the subject, date etc.).

This works because each time a mail server receives an email, it adds a "Received" header, including the date, the time and other information. If there are too many received headers, it generally means a mail loop. WinGate will move the message to the dead directory if it reaches the maximum allowed size.

This size is 8Kb by default, which allows for a generous number of headers.

The max size can be adjusted by changing the WinGate registry value:

WinGate\Settings\Mail REGDWORD:MaxMessageHeaderSize

WinGate will ignore levels below 2048 bytes, to make sure that normal email can always be processed.

  1. no comments yet...

Download helpfile

You can use basic Full-Text Searches against the page title and body to find matching articles. Use the following search modifiers to refine your query:

  • event management (no quotes) will find all pages containing the words "event" OR "management"
  • "event management" (with quotes) will find all pages containing the phrase "event management"
  • +event -management will find all pages containing the word "event", AND NOT the word "management"