On 05/21/16 15:26, Gilles Chehade wrote:
On Sat, May 21, 2016 at 01:32:40PM -0500, Edgar Pettijohn wrote:

On 05/20/16 13:26, Olivier Brunel wrote:
Hello,

[...]

Would that work as expected (%{rcpt.user} being either "bob" or
"alice" in that case) ? In this case %{user.username} would work just
the same, there shouldn't be any differences/reasons to prefer one over
the other?
Not sure.
yes, they would be identical, rcpt.user would differ from user.username
only if rcpt was actually an alias:

    [email protected]     gilles

in this case:

    rcpt.user    = foobar
    user.username = gilles


I'm thinking since I'm using "deliver to maildir" the homedir
of the users doesn't matter/isn't used by smtpd, is that right?
And, the writing to the maildir be done under the uid:gid from
match in table <users>, right ?

right


Also, I don't understand the difference between %{rcpt} and %{dest} as
format specifiers -- doc says "recipient email address" vs "recipient
email address after expansion" but that's quite unclear to me...
does that mean in case of e.g. aliases when the recipient address
resolved to another address? or what expansion are we talking about
here?
Me neither.

Think of virtual & aliases again, the address that was provided during
the SMTP session may not be the address that actually resolved into a
local user.

As stated in smtpd.conf(5):

            %{rcpt.user}         user part of the recipient email address
            %{rcpt.domain}       domain part of the recipient email address
            %{dest}              recipient email address after expansion
            %{dest.user}         user part after expansion


So assuming the following:

        [email protected]        [email protected]
        [email protected]        gilles

We have:

        [email protected] -> [email protected] -> gilles


%{rcpt} would be [email protected] because it's the RCPT address we have
received.

%{dest} would be [email protected] because it is the destination address
we have resolved to after going through a virtual translation. It's the
last address before a username.

%{dest} can be == to %{rcpt} if the RCPT address immediately maps to a
username.


That makes perfect sense now.
Lastly, is there/what is the difference between "format specifiers" and
"conversion specifiers" ? The later is used in the "deliver to mda"
description, with the same link to FORMAT SPECIFIERS, but that term
isn't used anywhere else.

Thanks a lot for the help,

from man smtpd.conf(5):

      This parameter may use conversion specifiers that are
      expanded before use (see FORMAT SPECIFIERS).

so nope, they're the same



--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]

Reply via email to