Postifx Dovecot lmtp,筛子不工作

Postifx Dovecot lmtp,筛子不工作

我的邮件服务器有问题。我想安装 sieve,但规则不起作用。据我所知,我认为 lmtp 到 dovecot 的移交不起作用。可以接收和发送电子邮件,但规则不起作用。如果我停止 dovecot,邮件仍存储在 /var/vmail 中

错误在哪里?

Debian 9.5 Postfix 3.1.8 Dovecot 2.2.27

收到电子邮件时的邮件日志

Aug 30 22:46:09 vps582284 postfix/smtpd[28317]: connect from mx09lb.world4you.com[81.19.149.119]
Aug 30 22:46:09 vps582284 postfix/smtpd[28317]: 856843F6A9: client=mx09lb.world4you.com[81.19.149.119]
Aug 30 22:46:09 vps582284 postfix/cleanup[28323]: 856843F6A9: message-id=<[email protected]>
Aug 30 22:46:09 vps582284 postfix/qmgr[28309]: 856843F6A9: from=<[email protected]>, size=1923, nrcpt=1 (queue active)
Aug 30 22:46:09 vps582284 postfix/virtual[28324]: 856843F6A9: to=<[email protected]>, relay=virtual, delay=0.17, delays=0.15/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
Aug 30 22:46:09 vps582284 postfix/qmgr[28309]: 856843F6A9: removed
Aug 30 22:46:09 vps582284 postfix/smtpd[28317]: disconnect from mx09lb.world4you.com[81.19.149.119] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7

doveconf-n

# 2.2.27 (c0f36b0): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:150: listen=..:port has been replaced by service { inet_listener { port } }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:150: protocol { listen } has been replaced by service { inet_listener { address } }
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:150: listen=..:port has been replaced by service { inet_listener { port } }
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:150: protocol { listen } has been replaced by service { inet_listener { address } }
# OS: Linux 4.9.0-7-amd64 x86_64 Debian 9.5
auth_mechanisms = plain login
disable_plaintext_auth = no
mail_debug = yes
mail_location = mbox:~/mail:INBOX=/var/mail/%u
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext
namespace inbox {
  inbox = yes
  location =
  mailbox Archive {
    auto = subscribe
    special_use = \Archive
  }
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Junk {
    auto = subscribe
    special_use = \Junk
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
  separator = /
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  mail_debug = yes
  sieve = /var/vmail/%d/%n/sieve
  sieve_dir = /var/vmail/%d/%n/sieve-scripts
  sieve_storage = /var/vmail/%d/%n/sieve-scripts
}
protocols = imap lmtp sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
}
service imap-login {
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service lmtp {
  unix_listener lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
ssl = required
ssl_cert = </etc/letsencrypt/live/dest-domain.com/fullchain.pem
ssl_cipher_list = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA128-SHA:AES128-SHA
ssl_dh_parameters_length = 2048
ssl_key =  # hidden, use -P to show it
ssl_prefer_server_ciphers = yes
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocol lmtp {
  mail_plugins = " sieve"
  postmaster_address = [email protected]
}

后配置-n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
inet_interfaces = all
inet_protocols = all
local_transport = virtual
mailbox_size_limit = 0
mydestination = $myhostname, localhost dest-domain.com
myhostname = mail.dest-domain.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_ciphers = high
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_rbl_client zen.spamhaus.org, reject_rbl_client ix.dnsbl.manitu.net, reject_unverified_recipient, permit
smtpd_relay_restrictions =
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/dest-domain.com/fullchain.pem
smtpd_tls_ciphers = high
smtpd_tls_dh1024_param_file = /etc/letsencrypt/live/dest-domain.com/dh.pem
smtpd_tls_key_file = /etc/letsencrypt/live/dest-domain.com/privkey.pem
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_high_cipherlist = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA128-SHA:AES128-SHA
virtual_alias_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/vmail
virtual_mailbox_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_uid_maps = static:5000
postconf: warning: /etc/postfix/main.cf: unused parameter: dovecot_destination_recipient_limit=1

谢谢你,

丹尼尔

答案1

Dovecot 的sieve本地交付由deliver捆绑的实用程序执行dovecot。您的设置不使用deliver并执行postfix与 无关的LDA sieve。您必须postfix按照此处描述的方式更改配置:https://wiki.dovecot.org/LDA/Postfix

相关内容