LDA: Difference between revisions

From QmailToaster
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:
  # mkdir /var/log/dovecot-lda && chmod 770 /var/log/dovecot-lda && chown vpopmail:vchkpw /var/log/dovecot-lda
  # mkdir /var/log/dovecot-lda && chmod 770 /var/log/dovecot-lda && chown vpopmail:vchkpw /var/log/dovecot-lda
  # touch /etc/logrotate.d/dovecot-lda
  # touch /etc/logrotate.d/dovecot-lda
  # cp /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.bak
  # cp /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.bak.orig
  # cat >> /etc/dovecot/dovecot.conf << __EOF__
  # cat >> /etc/dovecot/dovecot.conf << __EOF__
  protocol lda {
  protocol lda {
Line 30: Line 30:
'''Dovecot Sieve'''
'''Dovecot Sieve'''
  # yum -y install dovecot-pigeonhole
  # yum -y install dovecot-pigeonhole
  Add to /etc/dovecot/dovecot.conf
'''Dovecot Sieve'''
  mail_location = maildir:~/Maildir
  # cp -p /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.lda.orig
  protocols = $protocols imap pop3 sieve
# yum -y install dovecot-pigeonhole
  plugin {
# cat >> /etc/dovecot/dovecot.conf << __EOF__
      sieve = ~/.dovecot.sieve
protocols = $protocols imap pop3 sieve
      sieve_dir = ~/.sieve
plugin {
  }
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/.sieve
}
protocol lda {
  mail_plugins = $mail_plugins sieve
}
 
 
 
 
 
 
 
   service managesieve-login {
   service managesieve-login {
       inet_listener sieve {
       inet_listener sieve {

Revision as of 14:23, 20 October 2024

Back

Dovecot LDA

# qmailctl stop
# cd /home/vpopmail/domains/domain.tld
# cp -p .qmail-default .qmail-default.bak
# cat > .qmail-default << __EOF__
| /usr/bin/dspam --user \$EXT@\$HOST --deliver=stdout --feature=no,wh \
| /usr/bin/rspamc --mime  \
| /var/qmail/bin/preline -f /usr/libexec/dovecot/deliver -d \$EXT@\$USER
__EOF__
# setfacl -m  u:vpopmail:rw,g:vchkpw:rw  /var/run/dovecot/stats-writer
# mkdir /var/log/dovecot-lda && chmod 770 /var/log/dovecot-lda && chown vpopmail:vchkpw /var/log/dovecot-lda
# touch /etc/logrotate.d/dovecot-lda
# cp /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.bak.orig
# cat >> /etc/dovecot/dovecot.conf << __EOF__
protocol lda {
   deliver_log_format = From:<%f>-<%e> :: Subject:<%s> :: Status:<%$> :: MsgID:<%m> :: Size<%p> :: vSize<%w>
   log_path = /var/log/dovecot-lda/dovecot-lda-errors.log
   info_log_path = /var/log/dovecot-lda/dovecot-lda.log
}
service stats {
   unix_listener stats-writer {
      group = vchkpw
      mode = 0660
   }
}
__EOF__
# systemctl restart dovecot

Dovecot Sieve

# yum -y install dovecot-pigeonhole

Dovecot Sieve

# cp -p /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.lda.orig
# yum -y install dovecot-pigeonhole
# cat >> /etc/dovecot/dovecot.conf << __EOF__
protocols = $protocols imap pop3 sieve
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/.sieve
}
protocol lda {
  mail_plugins = $mail_plugins sieve
}




 service managesieve-login {
     inet_listener sieve {
     port = 4190
     }
 }
 protocol lda {
     mail_plugins = $mail_plugins sieve
     .
     .
     .
 }
# cd /home/vpopmail/domains/domain.tld/user
# mkdir .sieve
# touch .sieve/user.sieve
# ln -s .sieve/user.sieve .dovecot.sieve
# chown -R vpopmail:vchkpw .sieve
# chown vpopmail:vchkpw .dovecot.sieve
# chmod 700 .sieve
Add Sieve rules to .sieve/user.sieve