From owner-freebsd-questions@FreeBSD.ORG Wed Apr 18 20:18:22 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8815116A401 for ; Wed, 18 Apr 2007 20:18:22 +0000 (UTC) (envelope-from david.robillard@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.freebsd.org (Postfix) with ESMTP id 143A413C4BC for ; Wed, 18 Apr 2007 20:18:21 +0000 (UTC) (envelope-from david.robillard@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so421240ugh for ; Wed, 18 Apr 2007 13:18:20 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=tjg8K6QWJqjKBGOSn1JCC0ey2Axu9DRlbKVPDAZNg2tEsT3uNC7BK1vP8R2FfpevxgLMlxhWZGBuDjE/eHnKKS0XYbWsQ+SdCzQQmuSggO1/YnlDXIwGZPOfM6E8RP1pVJwCkbbQEZX67KiavIgM4lHphb47r2WucxIAuyAnvhA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=RTxtirsZINQDvpXnBuy5fH2GetJsHcFfFcAcLKN5aXYGJUE/6DROy8KZx0U+/tSri/PwOTtTeoY8TsL1GUJ41/1p0VqnrvsG34Kvvy/+PNCnGWC+wJFZ4+SKibZYOgHgptso2xDZk4dd+UY/J0l91lCc6sS8dBpo9+I+ChouSwE= Received: by 10.67.76.16 with SMTP id d16mr1475982ugl.1176927500730; Wed, 18 Apr 2007 13:18:20 -0700 (PDT) Received: by 10.67.9.4 with HTTP; Wed, 18 Apr 2007 13:18:20 -0700 (PDT) Message-ID: <226ae0c60704181318h4db18492jd431a59ab1f7e879@mail.gmail.com> Date: Wed, 18 Apr 2007 16:18:20 -0400 From: "David Robillard" To: "FreeBSD Questions" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: David Banning Subject: Re: sendmail with dovecot with nologin account 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: Wed, 18 Apr 2007 20:18:22 -0000 > I am using dovecot imap and I am having a problem directing mail to > go to users in Maildir format when they do not have a login shell. > > It seems that the .procmailrc file is ignored and the mail is put > in mbox format into /var/mail > > For mail-only users with-out a shell, what is the best way to direct > mail to them in Maildir format within ~/Maildir - maybe directly from > .forward? Hello David, We run dovecot + sendmail + procmail and also store mails in Maildirs. All of our 3500+ users don't have any access to the mailserver and it works like a charm. The trick is to keep things as simple as possible. No home directory for users nor any valid shell plus a global procmailrc file which is used for all of the users. For example, start by instructing sendmail to use procmail in the /etc/mail/`hostname`.mc FEATURE(`local_procmail')dnl Then make sure dovecot knows where the mail is stored: default_mail_env = maildir:/var/mail/%u Our example mail user has this entry in master.passwd(5) : example.user::13431:231::0:0:Example User:/nonexistent:/sbin/nologin And the Global procmail configuration is very simple: cat /usr/local/etc/procmailrc # procmailrc # # $Id: procmailrc,v 1.1 2006/10/20 13:08:25 drobilla Exp $ # # System wide procmail(1) configuration file. # This configuration causes procmail(1) to deliver mail # to maildir format as the recipient's UID. DROPPRIVS = yes :0 /var/mail/$LOGNAME/ # EOF A single file to rule them all Sorry, couldn't resist :) Let me know if you need any help with this setup. Cheers, David -- David Robillard UNIX systems administrator & Oracle DBA CISSP, RHCE & Sun Certified Security Administrator Montreal: +1 514 966 0122