Difference between revisions of "Email"

From Jon's Wiki
 
Line 1: Line 1:
 +
== Fiddling with sieve ==
 +
 
Stuff about sieve.
 
Stuff about sieve.
  

Latest revision as of 11:57, 26 June 2021

Fiddling with sieve

Stuff about sieve.

Using dovecot, set up for Maildir format in ~/Maildir directory. DSpam uses procmail to deliver, so user ~/.procmailrc should have:

PATH=/bin:/usr/bin:/usr/sbin
MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR/

DELIVER="/usr/lib/dovecot/deliver -d $LOGNAME"

# deliver to INBOX and stop
:0 w
| $DELIVER

Then set up dovecot to use sieve:

# /etc/dovecot/conf.d/15-lda.conf
protocol lda {
  mail_plugins = $mail_plugins sieve
}
# /etc/dovecot/conf.d/90-sieve.conf
plugin {
  sieve = file:~/sieve;active=~/.dovecot.sieve
  sieve_user_log = ~/.dovecot.sieve.log
}

mbox to Maildir

If it's all gone to hell and ended up in /var/mail/$USER then you can re-deliver it:

cat /var/mail/$USER | formail -s procmail