head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC6:1.1.1.2
	netbsd-11-0-RC5:1.1.1.2
	netbsd-11-0-RC4:1.1.1.2
	PFIX-3-11-2:1.1.1.2
	netbsd-11-0-RC3:1.1.1.2
	netbsd-11-0-RC2:1.1.1.2
	netbsd-11-0-RC1:1.1.1.2
	perseant-exfatfs-base-20250801:1.1.1.2
	netbsd-11:1.1.1.2.0.2
	netbsd-11-base:1.1.1.2
	PFIX-3-10-1:1.1.1.2
	netbsd-10-1-RELEASE:1.1.1.1
	perseant-exfatfs-base-20240630:1.1.1.1
	perseant-exfatfs:1.1.1.1.0.62
	perseant-exfatfs-base:1.1.1.1
	netbsd-8-3-RELEASE:1.1.1.1
	netbsd-9-4-RELEASE:1.1.1.1
	netbsd-10-0-RELEASE:1.1.1.1
	netbsd-10-0-RC6:1.1.1.1
	netbsd-10-0-RC5:1.1.1.1
	netbsd-10-0-RC4:1.1.1.1
	netbsd-10-0-RC3:1.1.1.1
	netbsd-10-0-RC2:1.1.1.1
	PFIX-3-8-4:1.1.1.1
	netbsd-10-0-RC1:1.1.1.1
	netbsd-10:1.1.1.1.0.60
	netbsd-10-base:1.1.1.1
	PFIX-3-7-3:1.1.1.1
	netbsd-9-3-RELEASE:1.1.1.1
	cjep_sun2x-base1:1.1.1.1
	cjep_sun2x:1.1.1.1.0.58
	cjep_sun2x-base:1.1.1.1
	cjep_staticlib_x-base1:1.1.1.1
	netbsd-9-2-RELEASE:1.1.1.1
	cjep_staticlib_x:1.1.1.1.0.56
	cjep_staticlib_x-base:1.1.1.1
	netbsd-9-1-RELEASE:1.1.1.1
	PFIX-3-5-2:1.1.1.1
	phil-wifi-20200421:1.1.1.1
	phil-wifi-20200411:1.1.1.1
	is-mlppp:1.1.1.1.0.54
	is-mlppp-base:1.1.1.1
	phil-wifi-20200406:1.1.1.1
	netbsd-8-2-RELEASE:1.1.1.1
	PFIX-3-5-0:1.1.1.1
	netbsd-9-0-RELEASE:1.1.1.1
	netbsd-9-0-RC2:1.1.1.1
	netbsd-9-0-RC1:1.1.1.1
	phil-wifi-20191119:1.1.1.1
	netbsd-9:1.1.1.1.0.52
	netbsd-9-base:1.1.1.1
	phil-wifi-20190609:1.1.1.1
	netbsd-8-1-RELEASE:1.1.1.1
	netbsd-8-1-RC1:1.1.1.1
	pgoyette-compat-merge-20190127:1.1.1.1
	pgoyette-compat-20190127:1.1.1.1
	pgoyette-compat-20190118:1.1.1.1
	pgoyette-compat-1226:1.1.1.1
	pgoyette-compat-1126:1.1.1.1
	pgoyette-compat-1020:1.1.1.1
	pgoyette-compat-0930:1.1.1.1
	pgoyette-compat-0906:1.1.1.1
	netbsd-7-2-RELEASE:1.1.1.1
	pgoyette-compat-0728:1.1.1.1
	netbsd-8-0-RELEASE:1.1.1.1
	phil-wifi:1.1.1.1.0.50
	phil-wifi-base:1.1.1.1
	pgoyette-compat-0625:1.1.1.1
	netbsd-8-0-RC2:1.1.1.1
	pgoyette-compat-0521:1.1.1.1
	pgoyette-compat-0502:1.1.1.1
	pgoyette-compat-0422:1.1.1.1
	netbsd-8-0-RC1:1.1.1.1
	pgoyette-compat-0415:1.1.1.1
	pgoyette-compat-0407:1.1.1.1
	pgoyette-compat-0330:1.1.1.1
	pgoyette-compat-0322:1.1.1.1
	pgoyette-compat-0315:1.1.1.1
	netbsd-7-1-2-RELEASE:1.1.1.1
	pgoyette-compat:1.1.1.1.0.48
	pgoyette-compat-base:1.1.1.1
	netbsd-7-1-1-RELEASE:1.1.1.1
	matt-nb8-mediatek:1.1.1.1.0.46
	matt-nb8-mediatek-base:1.1.1.1
	perseant-stdc-iso10646:1.1.1.1.0.44
	perseant-stdc-iso10646-base:1.1.1.1
	netbsd-8:1.1.1.1.0.42
	netbsd-8-base:1.1.1.1
	prg-localcount2-base3:1.1.1.1
	prg-localcount2-base2:1.1.1.1
	prg-localcount2-base1:1.1.1.1
	prg-localcount2:1.1.1.1.0.40
	prg-localcount2-base:1.1.1.1
	pgoyette-localcount-20170426:1.1.1.1
	bouyer-socketcan-base1:1.1.1.1
	pgoyette-localcount-20170320:1.1.1.1
	netbsd-7-1:1.1.1.1.0.38
	netbsd-7-1-RELEASE:1.1.1.1
	netbsd-7-1-RC2:1.1.1.1
	PFIX-3-1-4:1.1.1.1
	netbsd-7-nhusb-base-20170116:1.1.1.1
	bouyer-socketcan:1.1.1.1.0.36
	bouyer-socketcan-base:1.1.1.1
	pgoyette-localcount-20170107:1.1.1.1
	netbsd-7-1-RC1:1.1.1.1
	pgoyette-localcount-20161104:1.1.1.1
	netbsd-7-0-2-RELEASE:1.1.1.1
	localcount-20160914:1.1.1.1
	netbsd-7-nhusb:1.1.1.1.0.34
	netbsd-7-nhusb-base:1.1.1.1
	pgoyette-localcount-20160806:1.1.1.1
	pgoyette-localcount-20160726:1.1.1.1
	pgoyette-localcount:1.1.1.1.0.32
	pgoyette-localcount-base:1.1.1.1
	netbsd-7-0-1-RELEASE:1.1.1.1
	netbsd-7-0:1.1.1.1.0.30
	netbsd-7-0-RELEASE:1.1.1.1
	PFIX-2-11-6:1.1.1.1
	netbsd-7-0-RC3:1.1.1.1
	netbsd-7-0-RC2:1.1.1.1
	netbsd-7-0-RC1:1.1.1.1
	PFIX-2-11-4:1.1.1.1
	PFIX-2-11-3:1.1.1.1
	netbsd-5-2-3-RELEASE:1.1.1.1.2.2
	netbsd-5-1-5-RELEASE:1.1.1.1.2.2
	netbsd-6-0-6-RELEASE:1.1.1.1
	netbsd-6-1-5-RELEASE:1.1.1.1
	netbsd-7:1.1.1.1.0.28
	netbsd-7-base:1.1.1.1
	PFIX-2-11-1:1.1.1.1
	yamt-pagecache-base9:1.1.1.1
	yamt-pagecache-tag8:1.1.1.1
	netbsd-6-1-4-RELEASE:1.1.1.1
	netbsd-6-0-5-RELEASE:1.1.1.1
	tls-earlyentropy:1.1.1.1.0.26
	tls-earlyentropy-base:1.1.1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.1
	riastradh-drm2-base3:1.1.1.1
	PFIX-2-10-3:1.1.1.1
	netbsd-6-1-3-RELEASE:1.1.1.1
	netbsd-6-0-4-RELEASE:1.1.1.1
	netbsd-5-2-2-RELEASE:1.1.1.1.2.2
	netbsd-5-1-4-RELEASE:1.1.1.1.2.2
	netbsd-6-1-2-RELEASE:1.1.1.1
	netbsd-6-0-3-RELEASE:1.1.1.1
	PFIX-2-10-2:1.1.1.1
	netbsd-5-2-1-RELEASE:1.1.1.1.2.2
	netbsd-5-1-3-RELEASE:1.1.1.1.2.2
	PFIX-2-9-7:1.1.1.1
	netbsd-6-1-1-RELEASE:1.1.1.1
	riastradh-drm2-base2:1.1.1.1
	riastradh-drm2-base1:1.1.1.1
	riastradh-drm2:1.1.1.1.0.20
	riastradh-drm2-base:1.1.1.1
	netbsd-6-1:1.1.1.1.0.24
	netbsd-6-0-2-RELEASE:1.1.1.1
	netbsd-6-1-RELEASE:1.1.1.1
	netbsd-6-1-RC4:1.1.1.1
	netbsd-6-1-RC3:1.1.1.1
	agc-symver:1.1.1.1.0.22
	agc-symver-base:1.1.1.1
	netbsd-6-1-RC2:1.1.1.1
	netbsd-6-1-RC1:1.1.1.1
	yamt-pagecache-base8:1.1.1.1
	PFIX-2-9-5:1.1.1.1
	netbsd-5-2:1.1.1.1.2.2.0.6
	PFIX-2-8-13:1.1.1.1
	netbsd-6-0-1-RELEASE:1.1.1.1
	yamt-pagecache-base7:1.1.1.1
	netbsd-5-2-RELEASE:1.1.1.1.2.2
	netbsd-5-2-RC1:1.1.1.1.2.2
	matt-nb6-plus-nbase:1.1.1.1
	yamt-pagecache-base6:1.1.1.1
	netbsd-6-0:1.1.1.1.0.18
	netbsd-6-0-RELEASE:1.1.1.1
	netbsd-6-0-RC2:1.1.1.1
	tls-maxphys:1.1.1.1.0.16
	tls-maxphys-base:1.1.1.1
	matt-nb6-plus:1.1.1.1.0.14
	matt-nb6-plus-base:1.1.1.1
	netbsd-6-0-RC1:1.1.1.1
	PFIX-2-8-12:1.1.1.1
	PFIX-2-8-11:1.1.1.1
	yamt-pagecache-base5:1.1.1.1
	yamt-pagecache-base4:1.1.1.1
	PFIX-2-8-8:1.1.1.1
	netbsd-6:1.1.1.1.0.12
	netbsd-6-base:1.1.1.1
	netbsd-5-1-2-RELEASE:1.1.1.1.2.2
	netbsd-5-1-1-RELEASE:1.1.1.1.2.2
	yamt-pagecache-base3:1.1.1.1
	PFIX-2-8-7:1.1.1.1
	yamt-pagecache-base2:1.1.1.1
	yamt-pagecache:1.1.1.1.0.10
	yamt-pagecache-base:1.1.1.1
	PFIX-2-8-6:1.1.1.1
	PFIX-2-8-5:1.1.1.1
	PFIX-2-8-4:1.1.1.1
	cherry-xenmp:1.1.1.1.0.8
	cherry-xenmp-base:1.1.1.1
	PFIX-2-8-3:1.1.1.1
	PFIX-2-8-2:1.1.1.1
	PFIX-2-8-1:1.1.1.1
	bouyer-quota2-nbase:1.1.1.1
	bouyer-quota2:1.1.1.1.0.6
	bouyer-quota2-base:1.1.1.1
	matt-mips64-premerge-20101231:1.1.1.1
	matt-nb5-mips64-premerge-20101231:1.1.1.1.4.2
	matt-nb5-pq3:1.1.1.1.2.2.0.4
	matt-nb5-pq3-base:1.1.1.1.2.2
	PFIX-2-7-2:1.1.1.1
	netbsd-5-1:1.1.1.1.2.2.0.2
	netbsd-5-1-RELEASE:1.1.1.1.2.2
	netbsd-5-1-RC4:1.1.1.1.2.2
	matt-nb5-mips64-k15:1.1.1.1.4.2
	PFIX-2-7-1:1.1.1.1
	netbsd-5-1-RC3:1.1.1.1.2.2
	netbsd-5-1-RC2:1.1.1.1.2.2
	netbsd-5-1-RC1:1.1.1.1.2.2
	matt-nb5-mips64:1.1.1.1.0.4
	PFIX-2-6-6:1.1.1.1
	matt-premerge-20091211:1.1.1.1
	netbsd-5:1.1.1.1.0.2
	PFIX-2-6-5:1.1.1.1
	PFIX-2-6-2:1.1.1.1
	VENEMA:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2009.06.23.10.08.20;	author tron;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2009.06.23.10.08.20;	author tron;	state Exp;
branches
	1.1.1.1.2.1
	1.1.1.1.4.1
	1.1.1.1.62.1;
next	1.1.1.2;

1.1.1.2
date	2025.02.25.19.11.34;	author christos;	state Exp;
branches;
next	;
commitid	cLFKwpXD6DqXOSKF;

1.1.1.1.2.1
date	2009.06.23.10.08.20;	author snj;	state dead;
branches;
next	1.1.1.1.2.2;

1.1.1.1.2.2
date	2009.09.15.06.02.07;	author snj;	state Exp;
branches;
next	;

1.1.1.1.4.1
date	2009.06.23.10.08.20;	author matt;	state dead;
branches;
next	1.1.1.1.4.2;

1.1.1.1.4.2
date	2010.04.21.05.23.25;	author matt;	state Exp;
branches;
next	;

1.1.1.1.62.1
date	2025.08.02.05.49.48;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;


desc
@@


1.1
log
@Initial revision
@
text
@RReejjeeccttiinngg UUnnkknnoowwnn LLooccaall RReecciippiieennttss wwiitthh PPoossttffiixx

-------------------------------------------------------------------------------

IInnttrroodduuccttiioonn

As of Postfix version 2.0, the Postfix SMTP server rejects mail for unknown
recipients in local domains (domains that match $mydestination or the IP
addresses in $inet_interfaces or $proxy_interfaces) with "User unknown in local
recipient table". This feature was optional with earlier Postfix versions.

The good news is that this keeps undeliverable mail out of your queue, so that
your mail queue is not clogged up with undeliverable MAILER-DAEMON messages.

The bad news is that it may cause mail to be rejected when you upgrade from a
Postfix system that was not configured to reject mail for unknown local
recipients.

This document describes what steps are needed in order to reject unknown local
recipients correctly.

  * Configuring local_recipient_maps in main.cf
  * When you need to change the local_recipient_maps setting in main.cf
  * Local recipient table format

CCoonnffiigguurriinngg llooccaall__rreecciippiieenntt__mmaappss iinn mmaaiinn..ccff

The local_recipient_maps parameter specifies lookup tables with all names or
addresses of local recipients. A recipient address is local when its domain
matches $mydestination, $inet_interfaces or $proxy_interfaces. If a local
username or address is not listed in $local_recipient_maps, then the Postfix
SMTP server will reject the address with "User unknown in local recipient
table".

The default setting, shown below, assumes that you use the default Postfix
local(8) delivery agent for local delivery, where recipients are either UNIX
accounts or local aliases:

    /etc/postfix/main.cf:
        local_recipient_maps = proxy:unix:passwd.byname $alias_maps

To turn off unknown local recipient rejects by the SMTP server, specify:

    /etc/postfix/main.cf:
        local_recipient_maps =

That is, an empty value. With this setting, the Postfix SMTP server will not
reject mail with "User unknown in local recipient table". DDoonn''tt ddoo tthhiiss oonn
ssyysstteemmss tthhaatt rreecceeiivvee mmaaiill ddiirreeccttllyy ffrroomm tthhee IInntteerrnneett.. WWiitthh ttooddaayy''ss wwoorrmmss aanndd
vviirruusseess,, PPoossttffiixx wwiillll bbeeccoommee aa bbaacckkssccaatttteerr ssoouurrccee:: iitt aacccceeppttss mmaaiill ffoorr nnoonn--
eexxiisstteenntt rreecciippiieennttss aanndd tthheenn ttrriieess ttoo rreettuurrnn tthhaatt mmaaiill aass ""uunnddeelliivveerraabbllee"" ttoo
tthhee oofftteenn ffoorrggeedd sseennddeerr aaddddrreessss.

WWhheenn yyoouu nneeeedd ttoo cchhaannggee tthhee llooccaall__rreecciippiieenntt__mmaappss sseettttiinngg iinn mmaaiinn..ccff

  * Problem: you don't use the default Postfix local(8) delivery agent for
    domains matching $mydestination, $inet_interfaces, or $proxy_interfaces.
    For example, you redefined the "local_transport" setting in main.cf.

    Solution: your local_recipient_maps setting needs to specify a database
    that lists all the known user names or addresses for that delivery agent.
    For example, if you deliver users in $mydestination etc. domains via the
    virtual(8) delivery agent, specify:

    /etc/postfix/main.cf
        mydestination = $myhostname localhost.$mydomain localhost ...
        local_transport = virtual
        local_recipient_maps = $virtual_mailbox_maps

    If you use a different delivery agent for $mydestination etc. domains, see
    the section "Local recipient table format" below for a description of how
    the table should be populated.

  * Problem: you use the mailbox_transport or fallback_transport feature of the
    Postfix local(8) delivery agent in order to deliver mail to non-UNIX
    accounts.

    Solution: you need to add the database that lists the non-UNIX users:

    /etc/postfix/main.cf
        local_recipient_maps = proxy:unix:passwd.byname, $alias_maps,
            <the database with non-UNIX accounts>

    See the section "Local recipient table format" below for a description of
    how the table should be populated.

  * Problem: you use the luser_relay feature of the Postfix local delivery
    agent.

    Solution: you must disable the local_recipient_maps feature completely, so
    that Postfix accepts mail for all local addresses:

    /etc/postfix/main.cf
        local_recipient_maps =

LLooccaall rreecciippiieenntt ttaabbllee ffoorrmmaatt

If you use local files in postmap(1) format, then local_recipient_maps expects
the following table format:

  * In the left-hand side, specify a bare username, an "@@domain.tld" wild-card,
    or specify a complete "user@@domain.tld" address.

  * You have to specify something on the right-hand side of the table, but the
    value is ignored by local_recipient_maps.

If you use lookup tables based on NIS, LDAP, MYSQL, or PGSQL, then
local_recipient_maps does the same queries as for local files in postmap(1)
format, and expects the same results.

With regular expression tables, Postfix only queries with the full recipient
address, and not with the bare username or the "@@domain.tld" wild-card.

NOTE: a lookup table should always return a result when the address exists, and
should always return "not found" when the address does not exist. In
particular, a zero-length result does not count as a "not found" result.

@


1.1.1.1
log
@Import Postfix 2.6.2.
@
text
@@


1.1.1.1.62.1
log
@Sync with HEAD
@
text
@d24 1
a24 1
  * Local recipient table query format
d33 1
a33 2
table". Other interfaces such as the Postfix sendmail(1) command may still
accept an "unknown" recipient.
d37 1
a37 2
accounts (typically, in /etc/passwd) or local aliases (typically, in /etc/
aliases):
d70 3
a72 3
    If you don't use the local(8) or virtual(8) delivery agent for
    $mydestination etc. domains, see the section "Local recipient table format"
    below for a description of how the table should be populated.
d76 1
a76 1
    recipients.
d78 1
a78 1
    Solution: you need to add the database that lists the non-UNIX recipients:
d82 1
a82 1
            <the database with non-UNIX recipients>
d91 1
a91 1
    that the Postfix SMTP server accepts mail for all local addresses:
d96 1
a96 1
LLooccaall rreecciippiieenntt ttaabbllee qquueerryy ffoorrmmaatt
d98 19
a116 38
If local_recipient_maps specifies local files, such as files in postmap(1) or
postalias(1) format, then the Postfix SMTP server generates the following
queries:

  * The full recipient address. This query supports a non-default
    local_transport setting with a delivery agent such as lmtp(8) or virtual
    (8). See "Configuring local_recipient_maps in main.cf: for additional
    guidance for what lookup tables to specify.

  * The recipient address local-part. This query supports the default
    local_transport setting with the UNIX-compatible local(8) delivery agent;
    the Postfix SMTP server makes this query only when the recipient domain
    matches $mydestination, $inet_interfaces or $proxy_interfaces.

  * The recipient @@domain. This query supports a non-default local_transport
    setting with a delivery agent such as virtual(8); it is a wildcard for
    domains that do not have a valid recipient list.

NOTES:

  * A lookup table should return a non-empty result when the address exists,
    and should return "not found" when the address does not exist. In
    particular, a zero-length (empty) result does not count as a "not found"
    result.

  * When local_recipient_maps specifies a lookup table based on ldap:,
    memcache:, mongodb:, mysql:, pgsql:, sqlite:, or other external database,
    then the Postfix SMTP server queries that lookup table with the same
    queries as described at the start of this section, and expects the same
    results.

  * To suppress lookups for the local-part and the @@domain wild-card, specify
    the ddoommaaiinn setting in a Postfix ldap:, memcache:, mongodb:, mysql:, pgsql:,
    sqlite:, etc., database client configuration file.

  * When local_recipient_maps specifies a lookup table based on pcre:, regexp:,
    socketmap: or tcp:, Postfix queries that table only with the full recipient
    address, and not with the local-part or the @@domain wild-card.
@


1.1.1.2
log
@Import postfix-3.10.1 (previous was 3.8.4)

Summary:

Postfix 3.9 (July 2022): This release focused on enhancing the TLS
(Transport Layer Security) capabilities of Postfix. It introduced
support for TLSv1.3, allowing for more secure and efficient encrypted
communications. Additionally, improvements were made to the handling
of TLSA records, which are used in DNS-based Authentication of
Named Entities (DANE) to associate TLS certificates with domain
names.

Postfix 3.10 (July 2023): This version brought significant updates
to Postfix's SMTP (Simple Mail Transfer Protocol) functionalities.
It added support for the SMTPUTF8 extension, enabling the use of
UTF-8 encoding in email addresses and headers, which is essential
for internationalization. The release also included performance
optimizations, particularly in the handling of large mail queues,
and introduced new configuration parameters to provide administrators
with finer control over mail processing.

The changes are described more in detail in:
3.10 changes: RELEASE_NOTES
3.9  changes: RELEASE_NOTES_3.9
3.8  changes: RELEASE_NOTES_3.8
@
text
@d24 1
a24 1
  * Local recipient table query format
d33 1
a33 2
table". Other interfaces such as the Postfix sendmail(1) command may still
accept an "unknown" recipient.
d37 1
a37 2
accounts (typically, in /etc/passwd) or local aliases (typically, in /etc/
aliases):
d70 3
a72 3
    If you don't use the local(8) or virtual(8) delivery agent for
    $mydestination etc. domains, see the section "Local recipient table format"
    below for a description of how the table should be populated.
d76 1
a76 1
    recipients.
d78 1
a78 1
    Solution: you need to add the database that lists the non-UNIX recipients:
d82 1
a82 1
            <the database with non-UNIX recipients>
d91 1
a91 1
    that the Postfix SMTP server accepts mail for all local addresses:
d96 1
a96 1
LLooccaall rreecciippiieenntt ttaabbllee qquueerryy ffoorrmmaatt
d98 19
a116 38
If local_recipient_maps specifies local files, such as files in postmap(1) or
postalias(1) format, then the Postfix SMTP server generates the following
queries:

  * The full recipient address. This query supports a non-default
    local_transport setting with a delivery agent such as lmtp(8) or virtual
    (8). See "Configuring local_recipient_maps in main.cf: for additional
    guidance for what lookup tables to specify.

  * The recipient address local-part. This query supports the default
    local_transport setting with the UNIX-compatible local(8) delivery agent;
    the Postfix SMTP server makes this query only when the recipient domain
    matches $mydestination, $inet_interfaces or $proxy_interfaces.

  * The recipient @@domain. This query supports a non-default local_transport
    setting with a delivery agent such as virtual(8); it is a wildcard for
    domains that do not have a valid recipient list.

NOTES:

  * A lookup table should return a non-empty result when the address exists,
    and should return "not found" when the address does not exist. In
    particular, a zero-length (empty) result does not count as a "not found"
    result.

  * When local_recipient_maps specifies a lookup table based on ldap:,
    memcache:, mongodb:, mysql:, pgsql:, sqlite:, or other external database,
    then the Postfix SMTP server queries that lookup table with the same
    queries as described at the start of this section, and expects the same
    results.

  * To suppress lookups for the local-part and the @@domain wild-card, specify
    the ddoommaaiinn setting in a Postfix ldap:, memcache:, mongodb:, mysql:, pgsql:,
    sqlite:, etc., database client configuration file.

  * When local_recipient_maps specifies a lookup table based on pcre:, regexp:,
    socketmap: or tcp:, Postfix queries that table only with the full recipient
    address, and not with the local-part or the @@domain wild-card.
@


1.1.1.1.4.1
log
@file LOCAL_RECIPIENT_README was added on branch matt-nb5-mips64 on 2010-04-21 05:23:25 +0000
@
text
@d1 117
@


1.1.1.1.4.2
log
@sync to netbsd-5
@
text
@a0 117
RReejjeeccttiinngg UUnnkknnoowwnn LLooccaall RReecciippiieennttss wwiitthh PPoossttffiixx

-------------------------------------------------------------------------------

IInnttrroodduuccttiioonn

As of Postfix version 2.0, the Postfix SMTP server rejects mail for unknown
recipients in local domains (domains that match $mydestination or the IP
addresses in $inet_interfaces or $proxy_interfaces) with "User unknown in local
recipient table". This feature was optional with earlier Postfix versions.

The good news is that this keeps undeliverable mail out of your queue, so that
your mail queue is not clogged up with undeliverable MAILER-DAEMON messages.

The bad news is that it may cause mail to be rejected when you upgrade from a
Postfix system that was not configured to reject mail for unknown local
recipients.

This document describes what steps are needed in order to reject unknown local
recipients correctly.

  * Configuring local_recipient_maps in main.cf
  * When you need to change the local_recipient_maps setting in main.cf
  * Local recipient table format

CCoonnffiigguurriinngg llooccaall__rreecciippiieenntt__mmaappss iinn mmaaiinn..ccff

The local_recipient_maps parameter specifies lookup tables with all names or
addresses of local recipients. A recipient address is local when its domain
matches $mydestination, $inet_interfaces or $proxy_interfaces. If a local
username or address is not listed in $local_recipient_maps, then the Postfix
SMTP server will reject the address with "User unknown in local recipient
table".

The default setting, shown below, assumes that you use the default Postfix
local(8) delivery agent for local delivery, where recipients are either UNIX
accounts or local aliases:

    /etc/postfix/main.cf:
        local_recipient_maps = proxy:unix:passwd.byname $alias_maps

To turn off unknown local recipient rejects by the SMTP server, specify:

    /etc/postfix/main.cf:
        local_recipient_maps =

That is, an empty value. With this setting, the Postfix SMTP server will not
reject mail with "User unknown in local recipient table". DDoonn''tt ddoo tthhiiss oonn
ssyysstteemmss tthhaatt rreecceeiivvee mmaaiill ddiirreeccttllyy ffrroomm tthhee IInntteerrnneett.. WWiitthh ttooddaayy''ss wwoorrmmss aanndd
vviirruusseess,, PPoossttffiixx wwiillll bbeeccoommee aa bbaacckkssccaatttteerr ssoouurrccee:: iitt aacccceeppttss mmaaiill ffoorr nnoonn--
eexxiisstteenntt rreecciippiieennttss aanndd tthheenn ttrriieess ttoo rreettuurrnn tthhaatt mmaaiill aass ""uunnddeelliivveerraabbllee"" ttoo
tthhee oofftteenn ffoorrggeedd sseennddeerr aaddddrreessss.

WWhheenn yyoouu nneeeedd ttoo cchhaannggee tthhee llooccaall__rreecciippiieenntt__mmaappss sseettttiinngg iinn mmaaiinn..ccff

  * Problem: you don't use the default Postfix local(8) delivery agent for
    domains matching $mydestination, $inet_interfaces, or $proxy_interfaces.
    For example, you redefined the "local_transport" setting in main.cf.

    Solution: your local_recipient_maps setting needs to specify a database
    that lists all the known user names or addresses for that delivery agent.
    For example, if you deliver users in $mydestination etc. domains via the
    virtual(8) delivery agent, specify:

    /etc/postfix/main.cf
        mydestination = $myhostname localhost.$mydomain localhost ...
        local_transport = virtual
        local_recipient_maps = $virtual_mailbox_maps

    If you use a different delivery agent for $mydestination etc. domains, see
    the section "Local recipient table format" below for a description of how
    the table should be populated.

  * Problem: you use the mailbox_transport or fallback_transport feature of the
    Postfix local(8) delivery agent in order to deliver mail to non-UNIX
    accounts.

    Solution: you need to add the database that lists the non-UNIX users:

    /etc/postfix/main.cf
        local_recipient_maps = proxy:unix:passwd.byname, $alias_maps,
            <the database with non-UNIX accounts>

    See the section "Local recipient table format" below for a description of
    how the table should be populated.

  * Problem: you use the luser_relay feature of the Postfix local delivery
    agent.

    Solution: you must disable the local_recipient_maps feature completely, so
    that Postfix accepts mail for all local addresses:

    /etc/postfix/main.cf
        local_recipient_maps =

LLooccaall rreecciippiieenntt ttaabbllee ffoorrmmaatt

If you use local files in postmap(1) format, then local_recipient_maps expects
the following table format:

  * In the left-hand side, specify a bare username, an "@@domain.tld" wild-card,
    or specify a complete "user@@domain.tld" address.

  * You have to specify something on the right-hand side of the table, but the
    value is ignored by local_recipient_maps.

If you use lookup tables based on NIS, LDAP, MYSQL, or PGSQL, then
local_recipient_maps does the same queries as for local files in postmap(1)
format, and expects the same results.

With regular expression tables, Postfix only queries with the full recipient
address, and not with the bare username or the "@@domain.tld" wild-card.

NOTE: a lookup table should always return a result when the address exists, and
should always return "not found" when the address does not exist. In
particular, a zero-length result does not count as a "not found" result.

@


1.1.1.1.2.1
log
@file LOCAL_RECIPIENT_README was added on branch netbsd-5 on 2009-09-15 06:02:07 +0000
@
text
@d1 117
@


1.1.1.1.2.2
log
@Apply patch (requested by tron in ticket #944):
Update Postfix to 2.6.5.
@
text
@a0 117
RReejjeeccttiinngg UUnnkknnoowwnn LLooccaall RReecciippiieennttss wwiitthh PPoossttffiixx

-------------------------------------------------------------------------------

IInnttrroodduuccttiioonn

As of Postfix version 2.0, the Postfix SMTP server rejects mail for unknown
recipients in local domains (domains that match $mydestination or the IP
addresses in $inet_interfaces or $proxy_interfaces) with "User unknown in local
recipient table". This feature was optional with earlier Postfix versions.

The good news is that this keeps undeliverable mail out of your queue, so that
your mail queue is not clogged up with undeliverable MAILER-DAEMON messages.

The bad news is that it may cause mail to be rejected when you upgrade from a
Postfix system that was not configured to reject mail for unknown local
recipients.

This document describes what steps are needed in order to reject unknown local
recipients correctly.

  * Configuring local_recipient_maps in main.cf
  * When you need to change the local_recipient_maps setting in main.cf
  * Local recipient table format

CCoonnffiigguurriinngg llooccaall__rreecciippiieenntt__mmaappss iinn mmaaiinn..ccff

The local_recipient_maps parameter specifies lookup tables with all names or
addresses of local recipients. A recipient address is local when its domain
matches $mydestination, $inet_interfaces or $proxy_interfaces. If a local
username or address is not listed in $local_recipient_maps, then the Postfix
SMTP server will reject the address with "User unknown in local recipient
table".

The default setting, shown below, assumes that you use the default Postfix
local(8) delivery agent for local delivery, where recipients are either UNIX
accounts or local aliases:

    /etc/postfix/main.cf:
        local_recipient_maps = proxy:unix:passwd.byname $alias_maps

To turn off unknown local recipient rejects by the SMTP server, specify:

    /etc/postfix/main.cf:
        local_recipient_maps =

That is, an empty value. With this setting, the Postfix SMTP server will not
reject mail with "User unknown in local recipient table". DDoonn''tt ddoo tthhiiss oonn
ssyysstteemmss tthhaatt rreecceeiivvee mmaaiill ddiirreeccttllyy ffrroomm tthhee IInntteerrnneett.. WWiitthh ttooddaayy''ss wwoorrmmss aanndd
vviirruusseess,, PPoossttffiixx wwiillll bbeeccoommee aa bbaacckkssccaatttteerr ssoouurrccee:: iitt aacccceeppttss mmaaiill ffoorr nnoonn--
eexxiisstteenntt rreecciippiieennttss aanndd tthheenn ttrriieess ttoo rreettuurrnn tthhaatt mmaaiill aass ""uunnddeelliivveerraabbllee"" ttoo
tthhee oofftteenn ffoorrggeedd sseennddeerr aaddddrreessss.

WWhheenn yyoouu nneeeedd ttoo cchhaannggee tthhee llooccaall__rreecciippiieenntt__mmaappss sseettttiinngg iinn mmaaiinn..ccff

  * Problem: you don't use the default Postfix local(8) delivery agent for
    domains matching $mydestination, $inet_interfaces, or $proxy_interfaces.
    For example, you redefined the "local_transport" setting in main.cf.

    Solution: your local_recipient_maps setting needs to specify a database
    that lists all the known user names or addresses for that delivery agent.
    For example, if you deliver users in $mydestination etc. domains via the
    virtual(8) delivery agent, specify:

    /etc/postfix/main.cf
        mydestination = $myhostname localhost.$mydomain localhost ...
        local_transport = virtual
        local_recipient_maps = $virtual_mailbox_maps

    If you use a different delivery agent for $mydestination etc. domains, see
    the section "Local recipient table format" below for a description of how
    the table should be populated.

  * Problem: you use the mailbox_transport or fallback_transport feature of the
    Postfix local(8) delivery agent in order to deliver mail to non-UNIX
    accounts.

    Solution: you need to add the database that lists the non-UNIX users:

    /etc/postfix/main.cf
        local_recipient_maps = proxy:unix:passwd.byname, $alias_maps,
            <the database with non-UNIX accounts>

    See the section "Local recipient table format" below for a description of
    how the table should be populated.

  * Problem: you use the luser_relay feature of the Postfix local delivery
    agent.

    Solution: you must disable the local_recipient_maps feature completely, so
    that Postfix accepts mail for all local addresses:

    /etc/postfix/main.cf
        local_recipient_maps =

LLooccaall rreecciippiieenntt ttaabbllee ffoorrmmaatt

If you use local files in postmap(1) format, then local_recipient_maps expects
the following table format:

  * In the left-hand side, specify a bare username, an "@@domain.tld" wild-card,
    or specify a complete "user@@domain.tld" address.

  * You have to specify something on the right-hand side of the table, but the
    value is ignored by local_recipient_maps.

If you use lookup tables based on NIS, LDAP, MYSQL, or PGSQL, then
local_recipient_maps does the same queries as for local files in postmap(1)
format, and expects the same results.

With regular expression tables, Postfix only queries with the full recipient
address, and not with the bare username or the "@@domain.tld" wild-card.

NOTE: a lookup table should always return a result when the address exists, and
should always return "not found" when the address does not exist. In
particular, a zero-length result does not count as a "not found" result.

@


