From: Stas <stas.grumbler@gmail.com> To: ALT Linux Community general discussions <community@lists.altlinux.org> Subject: [Comm] clamav + spamd для postfix Date: Fri, 26 Jan 2018 19:33:40 +0500 Message-ID: <20bb7d45-3a97-2694-efbb-624b21e3be7c@gmail.com> (raw) Приветствую! Подскажите, как в Альтлинуксе нынче грамотно делать фильтрацию и спама, и вирусов в postfix? Для sendmail это делается через milter и там проблем никаких. С postfix ситуация такая, что "в коробке" проверка на спам осуществляется из скрипта content_filter, который вызывается из опции content_filter (указана в master.cf) postfix поддерживает только одну опцию content_filter (можно указать несколько, но работает только один просто потому, чтописьмо уходит в фильтр и в этот процесс уже не возвращается) Вижу два варианта: 1 - дополнить скрипт content_filter (и я это реализовал у себя на сервере): .... cat "$TEMPFILE" | /usr/bin/clamdscan --quiet -l /tmp/clamdscan.log - case $? in 0) rm /tmp/clamdscan.log AVMSG=" virus free," ;; 1) logger -t $0 -p mail.info "message-id=${MessageID}, from=$2, to=$4, virus detected, action DROP" exit ;; 2) logger -t $0 -p mail.err "clamdscan error, (message-id=${MessageID}, from=$2, to=$4) $(ls -l $TEMPFILE)" ;; esac 2 - указать в "приёмнике" первого фильтра следующий фильтр: smtp inet n - - - - smtpd -o content_filter=scan:127.0.0.1:10026 127.0.0.1:10025 inet n - n - 16 smtpd -o content_filter=filter:spamcheck -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_address_mappings -o smtpd_helo_restrictions= -o smtpd_client_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks_style=host -o smtpd_authorized_xforward_hosts=127.0.0.1/32 # -o recipient_bcc_maps=cdb:/etc/postfix/maps/bcc # -o receive_override_options=no_address_mappings Какой вариант использовать лучше, или может быть есть другие варианты? -- Станислав Дёгтев Служба "Ваш админ" Мои контакты: - jabber: grumbler@grumbler.org - email: stas.grumbler@gmail.com и stas@vashadmin.su - телефоны в Е-бурге +79045430461, +79222112259, +79505571146
next reply other threads:[~2018-01-26 14:33 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-01-26 14:33 Stas [this message] 2018-01-27 17:12 ` Sergey
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20bb7d45-3a97-2694-efbb-624b21e3be7c@gmail.com \ --to=stas.grumbler@gmail.com \ --cc=community@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git