Hi Tarjei

LMTP requires authentication only if using IP domain sockets.  The quickest,
easy fix is to use your fallback_transport entry in main.cf.

The right way to procede, however, is to get postfix to authenticate to
lmtpd.
There are two things necessary here; postfix must try to authenticate, and
lmtpd must accept the authentication id for mail delivery (authorization!)

I'll start with lmtpd authorization, lmtpd will only allow an account it
recognizes
as an admin to deliver mail over an IP socket.  To do this, you need to
create
an account that postfix will use to deliver mail.  For example, if you are
using
sasldb authentication, add a postfix account to sasldb:

    host$ saslpasswd postfixacct
    // enter password twice here

Now you need to configure lmtpd to recognize this account as an
administrator.  You could just add the postfix account to admins: in
imapd.conf.
However, giving postfix general administrator priveledges is unnecessarily
broad and generally a "bad thing(TM)".  The setting lmtp_admins:, still in
imapd.conf, wil give and account administrator priviledges in lmptd only.

/etc/imapd.conf:
    lmtp_admins: postfixacct

Now, get postfix to authorize.  First, you need to make sure that postfix is
compiled with SASL support.  I won't cover that here, I assume you've
already
done this.  Now you need to add an SASL password map and get postfix to
use it.

In your postfix configuration directory ( ie /etc/postfix ) create a file
with the
lmtpd host name(s) and account password pairs.  For instance:

/etc/postfix/lmtp_sasl_pass:
    mailhost.myisp.net  postfixacct:postfixpasswd

And hash this file with postmap.  Now add the following entries to main.cf

/etc/postfix/main.cf:
    lmtp_sasl_auth_enable = yes
    lmtp_sasl_password_maps = hash:/etc/postfix/lmtp_sasl_pass
    lmtp_sasl_security_options = noanonymous

Restart postfix, and you should be good to go.

Cheers
Chris
----- Original Message -----
From: "Tarjei Huse" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 17, 2001 6:37 AM
Subject: LMTP question


> Hi guys,
>
> I'm trying to set up postfix to use lmtp instead of deliver, but I am
getting
> this fine errormessage:
>
> Oct 17 12:21:32 mail postfix/lmtp[3949]: E9659176: to=<[EMAIL PROTECTED]>,
> relay=localhost[127.0.0.1], delay=1, status=bounced (host
localhost[127.0.0.1]
> said: 530 Authentication required
>
> Does anyone know what I should do to remedy the situation?
>
> LMTP Setup:
> [root@mail log]# less /etc/postfix/main.cf |grep lmtp
> lmtp_tcp_port = 24
> mailbox_transport = lmtp:localhost:lmtp
> #fallback_transport = lmtp:unix:/var/imap/socket/lmtp
>
> [root@mail log]# less /etc/postfix/master.cf |grep lmtp
> lmtp      unix  -       -       n       -       -       lmtp
>
> [root@mail log]# less /etc/cyrus.conf |grep lmtp
>  lmtp           cmd="lmtpd" listen="localhost:lmtp" prefork=0
>   lmtpunix      cmd="/usr/cyrus/bin/lmtpd" listen="/var/imap/socket/lmtp"
> prefork=0
>
> Cheers!
>
> Tarjei
>

Reply via email to