...Using procmail for this example.
Let's assume the user in question is called test.
1. First, create a Maildir for the user:
for x in cur new tmp ; do2. Install procmail and edit the user's .procmailrc file:
mkdir -p /home/test/Maildir/${x}
done
chown -R test:test /home/test/Maildir
chmod -R 700 /home/test/Maildir
pkg_add -rv procmail3. Tell sendmail to use procmail as delivery agent (suppose my hostname is dvorak):
echo ":0" >> /home/test/.procmailrc
echo "/home/test/Maildir/" >> /home/test/.procmailrc
cd /etc/mailAdd the line:
vi dvorak.mc
FEATURE(local_procmail)dnlSave, quit; build the new sendmail.cf:
make && make install && make restartDone. Now sendmail will deliver all mail for test@dvorak in /home/test/Maildir(/new).
0 comments:
Post a Comment