>спасибо, а не подскажете как sieve настроить с dovecot? dovecot.conf
protocol lda {
postmaster_address = postmaster@nospam.thank.you
hostname = mail.domain.tld
mail_plugins = cmusieve
mail_plugin_dir = /usr/local/lib/dovecot/lda
log_path = /var/log/dovecot-local-deliver.log
sendmail_path = /usr/sbin/sendmail
auth_socket_path = /var/run/dovecot/auth-master
# sieve_global_path = /tmp/dovecot.sieve <- один на всех
}
plugin {
sieve = /mail/sieve-scripts/%u.sieve <- каждому свой скрипт
...
}
postfix/master.cf
...
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}
# vmail владеет почтовыми каталогами (папками, где письма хранятся)
postfix/main.cf
...
dovecot_destination_recipient_limit = 1
virtual_transport = dovecot
...
как в sendmaile не знаю, сорри
потом
/mail/sieve-scripts/postmaster@domain.tld.sieve #пример sieve скрипта
require ["fileinto", "body"];
if body :raw :contains "Session aborted, reason: lost connection"
{
fileinto "urgent.lost";
stop;
}
elsif header :is "Subject" "port_scanned_on_site"
{
fileinto "portscan";
stop;
}
вроде ничего не забыл