Hi,

I want to configure multiple relay hosts with postfix (depending
on the sender address) - but the problem is that the postfix
smptp client does not do sasl authentication (or does not use the
authentication data).

I am using the Ubuntu 10.04 postfix package (2.7.0) and started with a
distribution provided local-delivery-only default config.

Following http://www.postfix.org/SASL_README.html I extended my main.cf
like this:

    relayhost =
    default_transport = smtp
    relay_transport = smtp
    
    smtp_sender_dependent_authentication = yes
    sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    
    # only for testing, should be the most permissive
    smtp_sasl_security_options = noanonymous


where file sasl_passwd (permissions 600 and root:root) is:
    n...@example.org user:pw
    [smarthost.example.org] user:pw

(2nd line is only for testing)

and sender_relay:
    n...@example.org [smarthost.example.org]

I build both with postmap:

    # postmap sasl_passwd
    # postmap sender_relay

And reload the config:

    # postfix reload


But with a simple test, the postfix smtp client does not do any
authentication:

    # echo foo | sendmail -f n...@example.org -oi ju...@example.net

-> postfix correctly relays it to smarthost.example.org but does not
authenticate, e.g. the smarthost rejects it:

    Relay access denied (in reply to RCPT TO command)

That means:

 * Postfix uses the sender_dependent_relayhost_maps file as
   expected

 * It is unclear, if postfix can't match the sender _or_ the hostname in
   sasl_passwd or if it is just ignores the sasl_passwd file

About sasl client support: postconf displays:

    # postconf -A
    cyrus

And the libsasl2-modules and libsasl2-2 packages are installed.

Thus my questions:

1) How can I debug whether postfix is actually using the
smtp_sasl_password_maps file and what it is trying to match there?

2) Is there is some Debian/Ubuntu specific postfix modification that
maybe disables somehow the sasl feature?

Best regards
Georg

PS: The remote smarthost is not under my control, but running postfix -
installing for testing exim, sasl client authentication works with the
same account data.

Reply via email to