From owner-freebsd-questions@freebsd.org Thu Jan 25 17:47:36 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB4A2EC2726 for ; Thu, 25 Jan 2018 17:47:35 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-ot0-x229.google.com (mail-ot0-x229.google.com [IPv6:2607:f8b0:4003:c0f::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79F2868DFE for ; Thu, 25 Jan 2018 17:47:35 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: by mail-ot0-x229.google.com with SMTP id d9so7419431oth.6 for ; Thu, 25 Jan 2018 09:47:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=g0cCZo4q7cgNVmHQivbZvlGrF6fjttCAhkPA6pr/SO8=; b=HCTdu/fsXmi7uoH2Nc1085UYbZnwDU/j0R3L/yfRRUJpHHjckI17PtLJIAJ04F3qyR NBOgFVgnhkb2emAFpXBy1BMpKhZmLtIFUFTJcVmyXg6DrwH6thLSpPGJDPOsOTJFT78k sapxbTyfXq91cuyMNIkXf/78ZmdEFPgJL+M8tn8m1+cp8Vl4Ie6uYhxFYWIBM8rgewJV LTHc2W1M7rCTsSENuuqPUTJRctGb8p2rT/nM2tNLDJw1ld5qRctS5LjNskmxLCnkfKnw a1eCTMHdlGJKsK0ZeDP3vLB4wMc6+dGeFpo/j5JYhoFvst28rUPw6ikS5AKuiAHuHfft mF8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=g0cCZo4q7cgNVmHQivbZvlGrF6fjttCAhkPA6pr/SO8=; b=Z7ujokrZev6Sohk0+wXUkjh47e9hYw2mp95TuINpYPUn9mZdz6ZpXO6L9XyBSScM6N GBsrbJZoRg+yQN3/f9o98726SpmhXjbFySTxXVa0NcvKrCYoARh/Si04BQRYQrt8xr1p RCP4tqP1FcO7R0I+wSuzrpyviexng4aC30KUP5YwWcWuuxbHvBsyX4IjiZSRl/yrAbOv mHRB9qpz/2uPRXaMvUSBpBGYnFTcsdN5FqACwIiS15bSYMVEpCU+GWDj0JPs+gYQoA9d WHJbIP50XcA0RAzQ/ERZBGYCQQ2UfBrbmzZptLY5w6Qlx7PLSeR2JSeCCOZ7EUxOWvRd ZXsQ== X-Gm-Message-State: AKwxyteL5CAgkQBhv4UsnavKtFfhwsarLU5X3a5tUgLIqu82F15hUyO6 RfxKUAurgJRDbRGHY9soao0elQcjQ1IPBX+lp8MvDQ== X-Google-Smtp-Source: AH8x226LEMqvfmdaZUpmjXzuJdCi3oVZH3Yxc+lZ8em7+imhl6chzAeC4wCMoik4HlGWRmnP7IXYOD0CzkBq5dINk4s= X-Received: by 10.157.2.132 with SMTP id 4mr12666608otl.295.1516902454666; Thu, 25 Jan 2018 09:47:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.35.12 with HTTP; Thu, 25 Jan 2018 09:46:54 -0800 (PST) In-Reply-To: <1d04cf39c6f6c55dd878ed002d449d7f@roundcube.fjl.org.uk> References: <20180125141451.GB919@lena.kiev> <525396fb1902007fb9d1733b1afd441c@roundcube.fjl.org.uk> <1d04cf39c6f6c55dd878ed002d449d7f@roundcube.fjl.org.uk> From: Odhiambo Washington Date: Thu, 25 Jan 2018 20:46:54 +0300 Message-ID: Subject: Re: Exim authentication under FreeBSD To: Frank Leonhardt Cc: User Questions Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2018 17:47:36 -0000 On 25 January 2018 at 20:23, Frank Leonhardt wrote: > On 2018-01-25 15:28, Vincent Hoffman-Kazlauskas wrote: > >> On 25/01/2018 14:32, Frank Leonhardt wrote: >> >>> On 2018-01-25 14:14, Lena@lena.kiev.ua wrote: >>> >>>> From: Frank Leonhardt >>>>> >>>>> How do people do outgoing SMTP user-account authentication using Exim? >>>>> >>>>> I'm talking about traditional user accounts (/etc/passwd) here, not >>>>> glorious LDAP or SQL database virtual users. If you've not come across >>>>> this little problem-ette, Exim does not ever run as root and therefore >>>>> can't check /etc/master.passwd like sendmail/saslauthd can. >>>>> >>>> >>>> I run a POP3 server (port mail/popa3d) on the same machine >>>> and use obsolete removed port security/pam_pop3 with Exim's >>>> server_condition = ${if pam{ >>>> and /etc/pam.d/exim : >>>> >>>> auth required /usr/local/lib/pam_pop3.so hostname=localhost info >>>> pwprompt=Password: timeout=5 >>>> account required pam_permit.so >>>> >>> >>> Thanks. This exact method is actually in the Exim documentation, but as >>> you state, the port no longer exists. >>> >> >> I dont use exim on freebsd but >> https://github.com/Exim/exim/wiki/AuthenticatedSmtpUsingSaslauthd >> suggests you could use it with cyrus-sasl-authd which is an option in >> the port has that as an option in "make config" but not selected by >> default. >> Another option the port has is dovecot auth if you run dovecot imap/pop3 >> https://wiki.dovecot.org/HowTo/EximAndDovecotSASL >> I use the dovecot sasl with postfix happily, but as I said I've not >> tried exim. >> > > Thanks. It's not the same on FreeBSD but it is possible to get it working > with a bit of fiddling (i.e. add the third parameter which it will use to > select the appropriate PAM module from /etc/pam.d/xxxx). > > There used to be a system called pwcheck but this is now deprecated by > Exim; hence the question - what are other people doing? > > You can, theoretically, have Dovecot authenticate it (according to the > Dovecot documentation). That's fine if you're running a IMAP/POP3 server on > the same box. > > > Regards, Frank. > > If you are not running an IMAP4/POP3 on the server, I still think it's trivial to generate a username:password pair from /etc/master.passwd and create a file that is only readable by the Exim user and use that for auth using a lookup passwd method. I remember doing that many years ago. -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft."