Re: sendmail with dovecot with nologin account

2007-04-18 Thread David Robillard

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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: sendmail with dovecot with nologin account

2007-04-17 Thread Jonathan Horne
On Tuesday 17 April 2007 19:55:18 David Banning wrote:
> > >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?
> >
> > Not an expert but I am just starting to think about moving from mbox to
> > mdir on my home server, so Id be interested in how you get on.
> > man procmail says
> >   If  no rcfiles and no -p have been specified on the command line,
>
> Well as to my problem, it turns out that a shell is not needed for
> procmailrc to work. It was the permissions on the users home directory
> that caused me grief.
>
> On the use of mdir, I am not yet a veteran user but so far I like
> it. It seems fast. I really like having each file separate, since
> I am backing up the users mail; with mdir I can backup only the
> new email which saves a lot of time on backup. I am sold on imap
> P
> as a mail delivery process. I was using imap-uw but it was not possible
> to create subdirectories with mail clients.
>
> Two webmail clients, squirrelmail, and round-cube are both excellent
> for imap use.  For mbox to mdir conversion, I used mb2md which kept
> the original file date in tact - (better than mbox2mdir in the
> ports) I used the page
>
> http://batleth.sapienti-sat.org/projects/mb2md/
>
> for reference which provides some good examples to automatically
> setup directories and convert mailboxes.
>
> All said, simple to setup and run. Dovecot also includes pop3 if
> you want to run it. If you have any questions you can try me.
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "[EMAIL PROTECTED]"

david, instead of squirrelmail, take a look at squirreloutlook.  same authors 
i believe, but the interface is much more modern feeling.

cheers,
-- 
Jonathan Horne
http://dfwlpiki.dfwlp.org
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: sendmail with dovecot with nologin account

2007-04-17 Thread David Banning
> >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?
> >
> >  
> Not an expert but I am just starting to think about moving from mbox to 
> mdir on my home server, so Id be interested in how you get on.
> man procmail says
>   If  no rcfiles and no -p have been specified on the command line, 

Well as to my problem, it turns out that a shell is not needed for 
procmailrc to work. It was the permissions on the users home directory
that caused me grief.

On the use of mdir, I am not yet a veteran user but so far I like
it. It seems fast. I really like having each file separate, since
I am backing up the users mail; with mdir I can backup only the
new email which saves a lot of time on backup. I am sold on imap
P
as a mail delivery process. I was using imap-uw but it was not possible
to create subdirectories with mail clients. 

Two webmail clients, squirrelmail, and round-cube are both excellent
for imap use.  For mbox to mdir conversion, I used mb2md which kept
the original file date in tact - (better than mbox2mdir in the
ports) I used the page

http://batleth.sapienti-sat.org/projects/mb2md/

for reference which provides some good examples to automatically
setup directories and convert mailboxes.

All said, simple to setup and run. Dovecot also includes pop3 if 
you want to run it. If you have any questions you can try me.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: sendmail with dovecot with nologin account

2007-04-17 Thread Vince

David Banning wrote:
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?

  
Not an expert but I am just starting to think about moving from mbox to 
mdir on my home server, so Id be interested in how you get on.

man procmail says
  If  no rcfiles and no -p have been specified on the command line, 
proc-
  mail will, prior to reading $HOME/.procmailrc, interpret 
commands  from
  /usr/local/etc/procmailrc (if present).  Care must be taken when 
creat-
  ing /usr/local/etc/procmailrc, because,  if  circumstances  
permit,  it
  will  be  executed  with  root privileges (contrary to the 
$HOME/.proc-

  mailrc file of course).

So you may need to set the default location here.
Something like
DEFAULT=$HOME/Maildir/

Vince





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"
  


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


sendmail with dovecot with nologin account

2007-04-17 Thread David Banning
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?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"