s/qmail:

Section: Misc. Reference Manual Pages (qmail-mfrules)
Updated: 8
Index Return to Main Contents
 

NAME

qmail-mfrules - prepare mfrules for qmail-smtpd  

SYNOPSIS

qmail-mfrules

 

DESCRIPTION

qmail-mfrules reads the addresses provided in SQMAIL/control/mailfromrules, converts them into lowercase, and writes them into SQMAIL/control/mailfromrules.cdb in a binary format suited for quick access by qmail-smtpd.

If there is a problem with control/mailfromrules, qmail-mfrules complains and leaves control/mailfromrules.cdb alone.

qmail-mfrules ensures that control/mailfromrules.cdb is updated atomically, so qmail-smtpd never has to wait for qmail-mfrules to finish. However, qmail-mfrules makes no attempt to protect against two simultaneous updates of control/mailfromrules.cdb.

The binary control/mailfromrules.cdb format is portable across machines.

 

RULE FORMAT

A rule is one line. A file containing rules may also contain comments: lines beginning with # are ignored. All addresses are evaluated case-insensitive.

Each rule contains an address, an ampersend sign '&', and a list of strings separated by commas to be used for 'Mail From: Address Verification' (MAV). When qmail-smtpd(8) receives a connection from that address, it checks whether the received envelope sender address correspondes with a MAV string (from the right to the left). The MAV string for an address may be NULL in order to allow any envelope sender address. NULLSENDER envelope addresses are not subject of the MAV.

 

RULE BASE

qmail-smtpd(8) looks for rules with various addresses in the following order:
1
$TCPREMOTEINFO, if $TCPREMOTEINFO is set (e.g. by SMTP Authentication);
2.
$TCPREMOTEINFO@$TCPREMOTEIP, if $TCPREMOTEINFO is set;
3.
$TCPREMOTEINFO@=$TCPREMOTEHOST, if $TCPREMOTEINFO is set and $TCPREMOTEHOST is set;
4.
the dotted decimal $TCPREMOTEIP address;
5.
the compactified $TCPREMOTEIP6 address;
6.
=$TCPREMOTEHOST, if $TCPREMOTEHOST is set;
7.
shorter and shorter prefixes of $TCPREMOTEIP ending with a dot;
8.
shorter and shorter values of $TCPREMOTEIP6 ending with a colon;
9.
shorter and shorter suffixes of $TCPREMOTEHOST starting with a dot, preceded by =, if $TCPREMOTEHOST is set; and finally
10.
=, if $TCPREMOTEHOST is set. qmail-smtpd employes the first matching rule for the MAV check. You should use the -p option to sslserver if you rely on $TCPREMOTEHOST here.

For example, here are some rules:


  jsmith@virtualdomain.com&john.smith@virtualdomain.com
  joe@18.23.0.32&joe@example.com
  18.23&@example.com
  =.heaven.mil&God@heaven.mil,st.peter@heaven.mil,-angles@heaven.mil
  fe80:&user@myhost.local
  2001::feh:abc9:&me@fehnet.com

 

IP-ADDRESSES

qmail-mfrules recognizes the dotted-decimal IPv4 and the compactified IPv6 addresses tokenized by the 'dot' or the 'colon' character and compares the respective parts from right to left. However, the CIDR address format is not supported (yet).

 

SEE ALSO

qmail-smtpd(8)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RULE FORMAT
RULE BASE
IP-ADDRESSES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 12:19:24 GMT, December 09, 2024