In regard to: [Imap-uw] tweaking env_unix.c for different spool directory.,...:

Hi

I'm installing a new mail server and I'm trying to compile imap 2006c1
properly so that it uses the mix format and I'm not quite sure if what I'm
doing is correct.

I would like to deliver email directly to user's home directory.  We also
use procmail to filter user's emails.  Emails mark as spam are
automatically delivered to the "Spam" folder.

I'm modifying the env_unix.c file currently.  I changed the  lines in
char *sysinbox () to:
            sprintf (tmp,"%s/INBOX",myhomedir());  /* new INBOX location */

If I want everything to be MIX format in my new system, is the INBOX called %s/INBOX or %s/INBOX/. Does it matter?

You probably don't need to modify the source.  You *may* need/want to
set CREATEPROTO in src/osdep/unix/Makefile.  *If* you precreate the
"INBOX" file (in MIX format) in the user's home directory when the account
is created using mailutil, then you don't need to do this.

The advantage of setting CREATEPROTO is (AFAIK), that folders that users
create via imapd will also be in MIX format.

I then need to use dmail to deliver email. Does anyone have the procmail recipe they use? Does dmail know what to do automagically or do I have to mkdir ~username/INBOX?

$cat /etc/procmailrc

MAILDIR=$HOME
LOGFILE=/dev/null
DROPPRIVS=yes
INCLUDERC=$HOME/.procmailrc

# Use dmail to deliver to MBX style mailboxes in ~/INBOX. # (1) IMPORTANT: For this to work /var/spool/mail must have it's # permissions set to 000 or must not exist or else dmail will # create a mbox mailbox there and deliver mail to it. # (2) IMPORTANT: All procmail rules that deliver must deliver
# using dmail or delivery will fail.
:0 W
| /usr/local/sbin/dmail -D

# MAW: This rule is REQUIRED to make sure that when mail delivery
# fails to $HOME/INBOX (e.g. over quota) it is requeued and # not delivered to /var/spool/mail/$LOGNAME (which is the # default behavior for procmail. :0 e: tells procmail to # take the specified action if the previous rule encountered
#      an error. The action to be taken in this case is for
# procmail to exit with signal EX_TEMPFAIL which will cause # sendmail to requeue the message.
:0 e:
{
        EXITCODE = 75 # Exit with signal EX_TEMPFAIL: retry later; requeue
        HOST     = "Mail delivery failed"
}





The comment in the file I show isn't quite correct -- it's procmail that
falls back to deliverying to /var/spool/mail/username if it can't deliver
to their home directory (because of quotas or other issues).  dmail isn't
to blame.

Note that once you have an INBOX file in a user's home directory, any
mail that gets delivered to /var/spool/mail/username is effectively
invisible, so you want to make sure nothing ever gets delivered to
/var/spool/mail/username

HTH,

Tim
--
Tim Mooney                              [EMAIL PROTECTED]
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
_______________________________________________
Imap-uw mailing list
Imap-uw@u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to