From owner-freebsd-questions@FreeBSD.ORG Fri Dec 28 18:29:23 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C949B16A421 for ; Fri, 28 Dec 2007 18:29:23 +0000 (UTC) (envelope-from af300wsm@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by mx1.freebsd.org (Postfix) with ESMTP id 837FC13C455 for ; Fri, 28 Dec 2007 18:29:23 +0000 (UTC) (envelope-from af300wsm@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so5967900waf.3 for ; Fri, 28 Dec 2007 10:29:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; bh=RPW3mKkCX+qJlq4o022Tyo7neP2Zxw4DVBcpzRO48yo=; b=XjrctGUe/RhM9K6KidHeWdIwKYTdY0NRXSsAU/dnlZhyDwdclv0eAJBO71ZieHROTIgUbtJRVGqT0tJMtv7WbXO5K/tgPdgvwJZtWVO7IGyXqDNTnKnK47ecNK4SbUL/hkImOFBlnQlk8ZeinPb778Qh56rt3CguZzgSK5dkbkI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=fZGH3uLU3hA1u+TkOngVeo0hSag/9TP+LWUNOGYsYSwp4SuGHcRxBzMXC5+ybN4R5AUDXS+VKJ2kycphrPcGzCpe3qLS6KTifzZ5s0c7erTui2+oJncxvVXbvvegilBB8q2cmvuS0BjGL00vHZH1+3t8F2UdTtiGXhCIVEOjEmc= Received: by 10.115.108.1 with SMTP id k1mr9627332wam.141.1198866562926; Fri, 28 Dec 2007 10:29:22 -0800 (PST) Received: from sniper ( [71.221.173.206]) by mx.google.com with ESMTPS id c26sm16004000waa.58.2007.12.28.10.29.21 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Dec 2007 10:29:22 -0800 (PST) From: Andrew Falanga To: Peter Schuller Date: Fri, 28 Dec 2007 11:29:15 -0700 User-Agent: KMail/1.9.6 References: <200712261534.03553.af300wsm@gmail.com> <200712270013.58919.peter.schuller@infidyne.com> In-Reply-To: <200712270013.58919.peter.schuller@infidyne.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712281129.15900.af300wsm@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: dovecot questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2007 18:29:23 -0000 On Wednesday 26 December 2007 16:13:50 Peter Schuller wrote: > > Dovecot doesn't really care. You provide the method of obtaining the user > list from the database, in the form of SQL statements (assuming they differ > from defaults), and it's up to you to make sure this returns the > appropriate information (so in other words, dovecot doesn't add users for > you). > > I used to run a pg+dovecot+postfix, but have since moved away from it and I > don't have the configs easily accessible to check out specifics. But > googling, this should be useful in terms of providing a bunch of real-world > configuration examples: > > http://www.gjdv.at/snippets/linux/virtual_mail_hosting Thanks for this link. I think it will be helpful, though at this point, I'm overwhelmed. > > > Also, with respect to the configuration file (dovecot.conf) why are there > > so many passdb/userdb? If I have passdb sql "turned on", should I "turn > > off" all other passdb sections? What is the significance of the userdb > > static { } section in that file? It appears that it is necessary for use > > if using a single user to access several mailboxes (i.e. virtual users > > which is what I want to implement). Is this true? > > I can't answer each one of the above off hand, but things like uids is > controlled by the user database that it sounds like you want to keep in > PostgreSQL. This includes the ability to set the uid/gid, which you can > have different for each user, the same, or some combination thereof, on a > per-user basis. Your exact table design is up to you, as long as you can > give dovecot the appropriate SQL statements for obtaining relevant > information. Ok, if I may run this by you, I've made a user id for this virtual mail stuff, the virtual mail user is "vmail." Yes I know, very inventive. The users home directory is /usr/home/vmail, but I'm thinking that what dovecot cares about is where mail is stored. In this case, I'm pretty sure it's /var/mail/vmail. I've followed the instructions in http://wiki.dovecot.org/AuthDatabase/SQL and created the table as defined on this page. If my understaning is correct, this field will contain the entry "/var/mail/vmail," correct? Further, if I'm following, dovecot somehow delivers all mails to this virtual user and somehow categorizes them according to the virtual users? Does this sound correct? I wonder, sometimes attachments get large, if I'm anywhere near correct, I wonder if I should use a directory under /usr instead of /var? > > > If I'm understanding things correctly, the next, very important item, is > > how do I setup new users and how would those users then manage things > > like passwords, etc.? > > This is up to you. dovecot does not provide and user interfaces for > managing accounts (that I am aware of). Typically a reason to have the user > database in a relational database would be to enable the construction of > such interfaces, or perhaps use of existing tools. But unless I am missing > something, user management is beyond the scope of what dovecot itself is > providing. Ok, that makes it simpler though some additional work for me coming up with an easy way to add people to the list. Thanks for all the help. Andy