On Mon, Jun 24, 2013 at 10:49:49PM +0100, Craig R. Skinner wrote:
> On 2013-06-24 Mon 12:34 PM |, /dev/rob0 wrote:
> > On Mon, Jun 24, 2013 at 03:12:24PM +0100, Craig R. Skinner wrote:
> > > main.cf:
> > > myorigin = $mydomain # example.com
> > > mydestination = localhost, localhost.$mydomain
> > 
> > Here we see that $myorigin (nor $mydomain) is NOT listed in 
(typo fixed)
> > $mydestination.
> 
> Correct - refer back to earlier messages in the last few days.
> 
> > > However, aliases seems to be totally ignored.
> > > 
> > > When I move these from virtual_alias_maps back to aliases,
> > > mail to those convential aliases bounces:
> > > 
> > > aliases:
> > > root:             admin-acct
> > 
> > I don't know if this was mentioned upthread or not, but you
> > seem to be making a common, wrong assumption about the meaning
> > of an unqualified address localpart, e.g., "admin-acct" in this 
> > example. You're probably thinking that means "deliver to the
> > Unix user 'admin-acct'",
> 
> Yes, that's my thinking of how aliases functions. (See below.)

And again, this is wrong.

> > when in fact it means "deliver to the address 
> > 'admin-acct@$myorigin'". If $myorigin (which you set to 
> > $mydomain) is not listed in $mydestination, local(8) delivery
> > is not used.
> 
> That could explain it.

Yes, that did explain it, but you're not getting it.

> > Likewise, aliases(5) ($alias_maps) are only consulted for 
> > addresses where the domain is listed in $mydestination. For
> > you, that's only localpart@localhost.$mydomain (or 
> > "localpart@localhost" also if you followed Jeroen's
> > suggestion of "append_dot_mydomain=no".)
> > 
> > OTOH virtual(5) ($virtual_alias_maps) mapping is applied to
> > all addresses, regardless of class.
> > 
> > Generally I'd say it's a best practice to always specify 
> > fully-qualified addresses on the RHS of $alias_maps
> 
> The default aliases file does not indicate that;-

(If you follow all the instructions beginning with the Basic 
Configuration README onwards, you'll have $myorigin in 
$mydestination.)

> "The aliases(5) table provides a system-wide mechanism to redirect 
> mail for LOCAL recipients."

Where the domain (RHS of the @ in an email address) is listed in 
$mydestination, yes.

> "Users can control delivery of their own mail by setting up 
> .forward files in their home directory."

Likewise.

> Which seems to mean that addresses on the RHS are often Unix 
> accounts.

It depends if that RHS is listed in $mydestination. If it is, yes, 
$local_transport is used. References provided below.

Once again, your $myorigin is NOT listed in $mydestination. This 
means that your unqualified localpart "addresses" are NOT "local".

> #     The format of the alias database input file is as follows:
> #
> #     o      An alias definition has the form
> #
> #                 name: value1, value2, ...
> #
> #     The name is a local address (no domain part).
> #
> #     The value contains one or more of the following:
> #
> #     address
> #            Mail is forwarded to address, which is compatible
> #            with the RFC 822 standard.
> 
> Which to my reading means the RHS does not require the domain
> when it is a local Unix account. i.e. mail from Unix user56 to
> root is aliased.

This reading is not correct.

"The name is a local address (no domain part)." Refer back a line, 
the example is: "name: value1, value2, ..." The NAME is not the RHS, 
it's the LHS. The VALUE is the RHS.

When $myorigin is not listed in $mydestination, an unqualified 
localpart is not delivered to a Unix user by that name.

> > > Jun 24 14:37:25 server1 postfix/error[22953]: C15E367DC: 
> > > to=<r...@example.com>, orig_to=<root>, relay=none, delay=0.26, 
> > > delays=0.14/0.06/0/0.06, dsn=5.0.0, status=bounced (User 
> > > unknown in virtual alias table)
> > 
> > Postfix has appended @$myorigin as documented. example.com is

See, mail to "root" was delivered to "root@$myorigin", as the 
reference link I gave you showed.

> Previously, the pair of primary postfix developers posted 
> remarkably similar proposed configs, with a virtual $mydomain not 
> listed plainly in $mydestination,

You keep saying $mydomain, which in your case is so because you set 
"myorigin=$mydomain". In fact the controlling setting is $myorigin, 
not $mydomain. And the reference link (omitted from the quoted 
material) is, again:

http://www.postfix.org/postconf.5.html#append_at_myorigin

This one says, in effect, that when Postfix is given an unqualified 
localpart where an email address is expected, it uses 
"localpart@$myorigin" as the actual address.

The other link was this (anchor added this time):

http://www.postfix.org/ADDRESS_CLASS_README.html#local_domain_class

This one would tell you how listing a domain in one of the class 
definitions (mydestination, relay_domains, virtual_alias_domains, 
virtual_mailbox_domains) controls how it is handled. Specifically 
that you must list

> and both including references to aliases evaluation.

I don't think Wietse and Viktor told you that $alias_maps would be 
consulted for domains which are not listed in $mydestination.

postconf.5.html#alias_maps ::

alias_maps (default: see "postconf -d" output)

    The alias databases that are used for local(8) delivery. ...

postconf.5.html#mydestination ::

mydestination (default: $myhostname, localhost.$mydomain, localhost)

    The list of domains that are delivered via the $local_transport 
    mail delivery transport. ...

> But that is not my experience - as logs show in my last mail.
> 
> I'll continue reading, experimenting & testing.

It's all right here. If you don't believe what I told you, check the 
references provided. Good luck.
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

Reply via email to