i n f r a d i g


Mail directive
 
Meaning
(can occur in 'ifmail.txt' file)
  
RELAY [0|1]Can relay for people outside the default/hosted domains
ROAMING [0|1]Allow relaying if log in first to POP/IMAP
PERMIT [ip-address|hostname]Grant 'ip-address' or 'hostname' rely access
EXCLUDE [ip-address|hostname]Deny 'ip-address' or 'hostname' relay access
FORWARD [0|1]Allow user .forward files.
SMART_HOST [server]Send mail to a server that can do all the hard work
SMART_PORT portSend mail to a server that can do all the hard work
EXEMPT [domain,...]Don't route for these domains
SIZEEXEMPT [nK|nM]Don't route for messages bigger than this
NOTIFY [mins]Tell smart host to send queued mail (every 'n' minutes)
DNS hostDomain Name Server for looking up routing info
DNSALT hostDomain Name Server (alternate) for looking up routing info
DEFAULT domainIf i'm 'user' then i'm also 'user@domain'
DOMAIN [domain-list]Domain to hold 'local' mail for (can repeat on multiple lines)
QUEUE ../spool/mqueuePath to where outgoing mail is queued for delivery
MAILBOX ../spool/mailPath to where mailboxes for local users are created
NEWSBOX ../spool/mailPath to where news mailboxes are created
SHAREDBOX ../spool/mailPath to where shared mailboxes are created
SYSTEMBOX ../spool/mailPath to where system status file are created
LOGD ../data/maild.logDaemon processes log files
LOGQ ../data/mailq.logQueue processes log files
VERIFY FROM TOVerify from and to addresses on submission
MBOXLIMIT 0Maximum number of bytes to store for account (0 for no limit)
SIZELIMIT 0Maximum size of a mail message I will handle (0 for no limit)
RCPTLIMIT 0Maximum number of recipients to specify in one transaction (0 for no limit)
RCPTCOUNT 0Maximum number of recipients before introducing delays (0 for no delay)
RCPTDELAY 0Number of seconds to delay (default is 1)
GATEWAY [domain-list]The domain is gatewayed here (can repeat on multiple lines)
ROUTE service nRoute the service with n = 1-7 (can repeat on multiple lines)
TIMEOUT secondsConnection timeout in seconds (default is 300)
SEARCHINTERVAL minsSpecifies the interval between checks for new IMAP results (default is 1 mins)
POPINTERVAL minsSpecifies the interval between checks for external POP mail (default is 15 mins)
FILTER [filename,...]Process named filter(s) upon receipt of message
ACTION [filename,...]Process named filter(s) when accessing a message
SMTP_PORT 25
SMTPS_PORT 465
POP3_PORT 110
POP3S_PORT 995
IMAP_PORT 143
IMAPS_PORT 993
NOIMAP [0|1]Don't start IMAP server
NOIMAPS [0|1]Don't start IMAP/SSL server
NOPOP [0|1]Don't start POP server
NOPOPS [0|1]Don't start POP/SSL server
NOSMTP [0|1]Don't start SMTP server
NOSMTPS [0|1]Don't start SMTP/SSL server
NOPRINT [0|1]Don't start email-to-print queue
STARTTLS [0|1]Use STARTTLS/STLS commands to control SSL/TLS over standard ports
USERLEVELn nbr [desc]
SMTPLOGIN [0|1]If present, it is required to first log in to send mail
REFERRAL [user@]server[,...]If present, refer users to a named IMAP server
SHARED-FS [0|1]Tell whether multiple instances run sharing the same file-system
ENABLEMAPS [0|1]Enable Mail Abuse Prevention System
MAPS [domains,...]Specifiy MAPS domains

RELAY

Specifiy this keyword if you want spammers to be able to abuse your system. Otherwise only accounts in hosted/gatewayed domains can send mail to outside addresses. NOT RECCOMENDED!

SMTPLOGIN [0|1]

If enabled then a user must first login in order to send to the server, IF REQUIRED, to get around relay exclusions.

ROAMING [0|1]

Specify this keyword (value 1 or blank) if you want to allow roaming access. Basically, if you successfully log in using POP3 or IMAP4 first, then within 15 minutes you can relay using SMTP on the same IP-address. RECOMMENDED!

PERMIT [ip-address|hostname|domain]

Specify the IP address, IP mask, hostname or domain of a machine that is allowed relay access, anyone else must be in a 'hosted' domain. This command can be specified multiple times. A wild-card can be used, for example...
	PERMIT 10.*
	PERMIT domain.com
	PERMIT *.research.mydomain.com

Use the "ORDER PERMIT EXCLUDE" (the default) or "ORDER EXCLUDE PERMIT" to specify processing options.

EXCLUDE [ip-address|ip-mask|hostname|domain]

Specify the IP address, IP mask, hostname or domain of a machine that is NOT allowed relay access. This command can be specified multiple times. A wild-card can be used, for example...
	EXCLUDE 10.0.*.0                 # Training room
	EXCLUDE bdlg3.mydomain.com
will deny a certain subnet relay access.

Use the "ORDER PERMIT EXCLUDE" (the default) or "ORDER EXCLUDE PERMIT" to specify processing options.

FORWARD [0|1]

Allow user forward files of the form 'USERROOT/userid/.forward' that can contain addresses, one per line, to send any incoming messages to.

SHARED-FS [0|1]

Whether multiple instances of the server (possibly n multiple machines) run with shared access to the same file-system (ie. mailboxes). it is faster if this is not the case and the parameter is set to zero 9the default).

SMART_HOST server

Send all mail on to 'server' for processing as I don't want to be bothered with queueing etc.

SMART_PORT port

Send all mail on to 'server' for processing as I don't want to be bothered with queueing etc.

EXEMPT domain[,...]

Send all mail for these domains on to the SMART_HOST for processing as I don't want to be bothered with queueing. You can use wild-cards to include sub-domains, for example "EXEMPT *aol.com", or even "EXEMPT *" to exempt everything.

SIZEEXEMPT [n|nK|nM]

Send all mail greater than the specified size to the SMART_HOST for processing as I don't want to be bothered with queueing. Use 'K' or 'M' to specify Kilobytes or Megabytes. For example... SIZEEXEMPT 100K will route directly messages less than 100Kb in size. Useful if you pay for bandwidth but your ISP allows free mail relaying as small messages can be sent directly and quickly, but larger ones can queued to your ISPs mail hub.

NOTIFY mins

If using a 'smart' host, then send an ETRN command to it every specified number of minutes asking it to forward any queued mail.

DNS server

If not using a smart server, then you can specify a Domain Name Server to use for Mail eXchange (MX) lookups on domains. If left blank then the program determines the server dynamically from network or dialup connection (this is the preferred setting).

DNSALT server

If not using a smart server, then you can specify a Domain Name Server (alternate) to use for Mail eXchange (MX) lookups on domains.

DEFAULT domain

Use to specifiy your primary domain. For example, if you are 'userid' then your email address is 'userid@domain'.

DOMAIN [domain[,domains...]]

Use to specify the name of all other hosted domains that you wish to accept mail for. This command can be specified multiple times.

GATEWAY [domain[,domains...]]

Act as gateway for the named domain. No mail will be delivered locally to users in this domain, instead mail will be queued. Typically, 'domain' identifies an internal mail server that is not directly accessible from the Internet or a domain that is only intermittently accessible by dialup. Useful if you are Mail eXchange (MX) host for a domain and wish to queue their messages. This command can be specified multiple times.

VERIFY FROM TO

If the 'FROM' sub-keyword is present then the sender's email address is verified and must be valid during submission. Likewise with the 'TO' sub-keyword. Otherwise the message is first OKed and queued, then verification takes place on the to addresses in the background and a DSN subsequently sent if found to be invalid. No background check on the from address is done.

SEARCHINTERVAL mins

IMAP results are cached for this many minutes. Set to zero for no caching.

POPINTERVAL mins

Interval between checking POP/IMAP accounts/mailboxes. Refer to the file 'data/replicate.txt' for details on how to enter details on external accounts to check.

FILTER/a> [filename,...]] (REGISTERED VERSION ONLY)

Process the named filter(s) upon receipt of each message to determine if it should be accepted or discarded. Filters implement a simple scripting language (described in 'filter.txt).

It's also possible to have per-account user filters that process messages based upon the recipient. These files MUST be named '.filter' or 'filter.ifs' and exist in the accounts home directory (ie. 'USERROOT/.filter'). User filters are more restricted than general filters and run in the accounts 'sandbox'. That is, they can't access external files and can't exec() system commands.

ACTION/a> [filename,...] (REGISTERED VERSION ONLY)

Process the named filter(s) when accessing each message (POP3). Actions can optionally modify the returned message.

It's also possible to have per-account user actions that process messages based upon the recipient. These files MUST be named '.action' or 'action.ifs' and exist in the accounts home directory (ie. 'USERROOT/.action'). User actions are more restricted than general actions and run in the accounts 'sandbox'. That is, they can't access external files and can't exec() system commands.

NOPOP [0|1]

If specified then no POP3 service is provided. The server must be stopped for a change in this keyword to take effect.

NOPOPS [0|1]

If specified then no special POP3+SSL service is provided. The server must be stopped for a change in this keyword to take effect.

NOIMAP [0|1]

If specified then no IMAP4 service is provided. The server must be stopped for a change in this keyword to take effect.

NOIMAPS [0|1]

If specified then no special IMAP4+SSL service is provided. The server must be stopped for a change in this keyword to take effect.

NOSMTP [0|1]

If specified then no SMTP service is provided. The server must be stopped for a change in this keyword to take effect.

NOSMTPS [0|1]

If specified then no special SMTP+SSL service is provided. The server must be stopped for a change in this keyword to take effect.

NOPRINT [0|1]

If specified then no print service is provided. The server must be stopped for a change in this keyword to take effect.

SIZELIMIT bytes

Specifies the maximum message size for a message to accept. Anything larger will be rejected.

MBOXLIMIT bytes

Specifies the maximum number of bytes to store for an account in all folders. Once exceeded new messages will be rejected. This directive provides a global default value to be used if no individual per account setting is specified. A value of zero implies no limit.

RCPTLIMIT count

Specifies the maximum number of destination addresses to accept for a message. Anything larger will be rejected. Default is unlimited.

RCPTCOUNT count

Specifies the maximum number of destination addresses to accept for a message before introducing a delay. Default is no delay.

RCPTDELAY seconds

Specifies the number of seconds delay used by RCPTCOUNT. Used for slowing down bulk senders. Default is 1 second.

SIZELIMIT bytes

Specifies the maximum message size for a message to accept. Anything larger will be rejected.

MAILBOX path

Where user mailboxes are kept.

NEWSBOX path

Where news mailboxes are kept (default is MAILBOX). Windows file-systems (including NTFS) are single-threaded for directory access to a partition, so considerable performance gains can be made by splitting NEWS off to a separate partition.

SHAREDBOX path

Where shared mailboxes are kept (default is MAILBOX).

SYSTEMBOX path

Where system status files are kept (default is MAILBOX).

REFERRAL [user@]server[,...]

Refer all IMAP access to a named server (default is this server). If a list of servers is provided then a random selection is made.

ENABLEMAPS [0|1]

Enable Mail Abuse Prevention System. MAPS (see http://maps.vix.com) is a DNS based lookup system for excluding mail from known and abused open-relay servers or servers known to generate Unsolicited Bulk Email (UBE) aka SPAM. ORBS (http://www.orbs.org) is a variant that uses the same DNS mechanism.

MAPS [domains,...]

Specify the domains to be used to select the MAPS service if enabled. The defaults are...
	MAPS relays.mail-abuse.org
	MAPS rbl.maps.vix.com
	MAPS relays.orbs.org
Refer to maps.vix.com and www.orbs.org to see what each one means. There are other (more vicious) levels but the ones listed here are most commonly used.

USERLEVELn nbr [description]

Specifies the number of child accounts a user at a specified level can have. For example...
	USERLEVEL0 0 Basic account
	USERLEVEL1 5 Personal pack
	USERLEVEL2 10 Family pack
	USERLEVEL3 50 Business pack
	USERLEVEL4 250 Group pack
	USERLEVEL5 -1 Unlimited
Means that accounts at user-level 0 (default all accounts) can have no child accounts to administrate, while accounts at level 1 can have 5 and accounts at level 2 can have 10 etc.
NOTE: this feature is available only in the full release.

ROUTE service n

This is for adding extension services, such as FAX, GSM, PRINT or custom gateways. The idea at this point is that you would use an address such as 'fax@mydomain.com' that was aliased to 'user@fax' where the value of 'user' is irrelevant, the important factor being the pseudo-domain 'fax' which I call a service here. Create a service entry in the routing tables with the 'ROUTE fax 1' keyword where '1' is the service number. A handler program can be written (using the provided FAX shell and/or PRINTER example) or a COM object (EVENTUALLY) can register to handle that service number. Then, dequeuing for that service is done automatically using the appropriate handler. Service number '0' is used for SMTP routing and should not normally be used. Other values have been predefined and several reserved for custom use...
      0 = SMTP, 1 = FAX, 2 = GSM, 3 = PRINTER, 4 = X.400, 5-7 = custom
The PRINTER example shows how it is done. It is unlikely that code for other services will be provided by me.