Date: Wed, 18 Apr 2007 16:18:20 -0400 From: "David Robillard" <david.robillard@gmail.com> To: "FreeBSD Questions" <freebsd-questions@freebsd.org> Cc: David Banning <david+dated+1177259125.e87a07@skytracker.ca> Subject: Re: sendmail with dovecot with nologin account Message-ID: <226ae0c60704181318h4db18492jd431a59ab1f7e879@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
> 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:<encrypted password string>: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 <bad reference>A single file to rule them all</bad reference> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?226ae0c60704181318h4db18492jd431a59ab1f7e879>