> On Oct 3, 2016, at 2:38 PM, Jeremy Hansen <[email protected]> wrote:
> 
>> The table lookup key is a sender address, and the RHS is a list of
>> logins, so this example is backwards.
> 
> So if my smtp authenticated username is just say “joeuser” which is a local 
> unix account on the server and the email address I’m using is 
> [email protected], I would need 
> 
> joeuser       [email protected]
> 
> in smtpd_sender_login_maps?

See above:

  * The table lookup key is a sender address
  * and the RHS is a list of logins

So it is hard to see how you got from there to:

   joeuser      [email protected]

It should not be surprising that the correct key/value pair is:

   [email protected] [email protected]

Note that since the lookup key is a sender address and not a
login, it is not possible directly to restrict the sender
addresses used by some authenticated users and not others.
However you can use:

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

    main.cf:
        indexed = ${default_database_type}:${config_directory}/
        smtpd_recipient_restrictions =
            reject_unauthenticated_sender_login_mismatch,
            check_sasl_access ${indexed}sasl_access,
            permit_sasl_authenticated,
            reject_unauth_destination

    sasl_access:
        joeuser   reject_authenticated_sender_login_mismatch
        freduser  reject_authenticated_sender_login_mismatch
        billuser  reject_known_sender_login_mismatch

    sender_login:
        [email protected] joeuser
        [email protected] freduser,billuser
        [email protected] billuser

Exercise:  What envelope sender addresses can each of Joe, Fred and Bill use?
           Who can use the {joe,fred,bill}[email protected] sender addresses?
           Does this impose any restrictions on the "From:" header in messages?

-- 
        Viktor.

Reply via email to