Понадобилось настроить почтовик с авто-ответами, конфиги ниже.
Устанавливаем dovecot с подддержкой sieve: apt install dovecot-sieve dovecot-managesieved.
1) dovecot.conf
=================================================
protocols = imap pop3 sieve
protocol sieve {
}
protocol lda {
mail_plugins = $mail_plugins sieve
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
}
protocol lmtp {
mail_plugins = quota sieve
lmtp_save_to_detail_mailbox = yes
recipient_delimiter = +
}
service managesieve-login {
inet_listener sieve {
address = 127.0.0.1
port = 4190
}
inet_listener sieve {
mail_plugins = $mail_plugins sieve
mail_plugins = quota sieve
plugin {
sieve_before = file:~/sieve;active=~/.dovecot.sieve
sieve_extensions = +vacation-seconds
sieve_vacation_min_period = 0
sieve_vacation_max_period = 0
sieve_max_actions = 0
sieve_quota_max_scripts = 0
dovecot unix - n n - - pipe
5) Если все ок то видим в логах такие записи.
Sep 11 04:56:26 server postfix/cleanup[7846]: 8BA291E41279: message-id=<dovecot-sieve-1536641786-518262-0@server.sender.kz>
Sep 11 04:56:26 server dovecot: lda(nurlan): sieve: msgid=<422aa741f0a88f0ac5958be11ddbf048@test.kz>: sent vacation response to <nurlan@test.kz>
Sep 11 04:56:26 server postfix/qmgr[5570]: 8BA291E41279: from=<>, size=676, nrcpt=1 (queue active)
Sep 11 04:56:26 server postfix/smtpd[7843]: disconnect from unknown[192.168.1.1] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
Sep 11 04:56:26 server dovecot: lda(nurlan): sieve: msgid=<422aa741f0a88f0ac5958be11ddbf048@test.kz>: stored mail into mailbox 'INBOX'
Sep 11 04:56:26 server postfix/local[7847]: 3FFE61E4125F: to=<nurlan@sender.kz>, relay=local, delay=0.58, delays=0.38/0/0/0.19, dsn=2.0.0, status=sent (delivered to command: /usr/lib/dovecot/deliver)
Sep 11 04:56:26 server postfix/qmgr[5570]: 3FFE61E4125F: removed
Sep 11 04:56:27 server postfix/smtp[7851]: 8BA291E41279: to=<nurlan@test.kz>, relay=mail.test.kz[192.168.1.1]:25, delay=1.3, delays=0.12/0/0.94/0.26, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as F1243A04F2)
Sep 11 04:56:27 server postfix/qmgr[5570]: 8BA291E41279: removed
Устанавливаем dovecot с подддержкой sieve: apt install dovecot-sieve dovecot-managesieved.
1) dovecot.conf
=================================================
protocols = imap pop3 sieve
protocol sieve {
}
protocol lda {
mail_plugins = $mail_plugins sieve
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
}
protocol lmtp {
mail_plugins = quota sieve
lmtp_save_to_detail_mailbox = yes
recipient_delimiter = +
}
service managesieve-login {
inet_listener sieve {
address = 127.0.0.1
port = 4190
}
inet_listener sieve {
mail_plugins = $mail_plugins sieve
mail_plugins = quota sieve
plugin {
sieve_before = file:~/sieve;active=~/.dovecot.sieve
sieve_extensions = +vacation-seconds
sieve_vacation_min_period = 0
sieve_vacation_max_period = 0
sieve_max_actions = 0
sieve_quota_max_scripts = 0
}
====================================================================
2) Для postfix в main.cf ниже home_maildir добавляем строчку: mailbox_command = /usr/lib/dovecot/deliver
3) В master.cf добавляем строки.
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient
===========================================================
4) Для Roundcube устанавливаем плагин Filters(managesieve)
5) Если все ок то видим в логах такие записи.
Sep 11 04:56:26 server postfix/cleanup[7846]: 8BA291E41279: message-id=<dovecot-sieve-1536641786-518262-0@server.sender.kz>
Sep 11 04:56:26 server dovecot: lda(nurlan): sieve: msgid=<422aa741f0a88f0ac5958be11ddbf048@test.kz>: sent vacation response to <nurlan@test.kz>
Sep 11 04:56:26 server postfix/qmgr[5570]: 8BA291E41279: from=<>, size=676, nrcpt=1 (queue active)
Sep 11 04:56:26 server postfix/smtpd[7843]: disconnect from unknown[192.168.1.1] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
Sep 11 04:56:26 server dovecot: lda(nurlan): sieve: msgid=<422aa741f0a88f0ac5958be11ddbf048@test.kz>: stored mail into mailbox 'INBOX'
Sep 11 04:56:26 server postfix/local[7847]: 3FFE61E4125F: to=<nurlan@sender.kz>, relay=local, delay=0.58, delays=0.38/0/0/0.19, dsn=2.0.0, status=sent (delivered to command: /usr/lib/dovecot/deliver)
Sep 11 04:56:26 server postfix/qmgr[5570]: 3FFE61E4125F: removed
Sep 11 04:56:27 server postfix/smtp[7851]: 8BA291E41279: to=<nurlan@test.kz>, relay=mail.test.kz[192.168.1.1]:25, delay=1.3, delays=0.12/0/0.94/0.26, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as F1243A04F2)
Sep 11 04:56:27 server postfix/qmgr[5570]: 8BA291E41279: removed
Комментариев нет:
Отправить комментарий