ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Ilya Palagin <tux@fioc.kz>
To: ALTLinux community <community@altlinux.ru>
Subject: [Comm] Re: postfix filtering
Date: Tue, 10 Jun 2003 22:46:05 +0700
Message-ID: <20030610154605.GA1014@tux> (raw)
In-Reply-To: <20030610144330.GE21307@mrkooll.tdr.pibhe.com>

On Tue, Jun 10, 2003 at 05:43:30PM +0300, Maxim Tyurin wrote:
> Hi.
> Появилась у меня проблема которую не знаю как решить. Нужно проверять
> в письме одновременно и 'From:' и 'To:'.
> Т.е. мне нужно отрубить прием почты с некоторых доменов (точнее
> запретить прием писем например от @domain.com) но при этом от
> некоторых принимать письма (это делается через
> smtpd_sender_restrictions).
> 
> Но при этом мне не хотелось бы отбивать письма из рассылок
> хочу сделать так:
> From: *@domain.com  
> To: community@altlinux.* - принять
> ....
> Все остальные от 
> From: *@domain.com - отфутболить postfix'ом 
> 
> как это сделать?

# Определяем собственный класс проверки доступа
smtpd_restriction_classes = custom_restrictions_1
custom_restrictions_1 = check_sender_access regexp:/etc/postfix/uce/list_1
                        reject

smtpd_recipient_restrictions = permit_mynetworks
                               check_recipient_access regexp:/etc/postfix/uce/recipient_regex
                               check_relay_domains
																																														 
содержимое list_1 - список внешних адресов, с которых можно принимать
письма на контролируемые адреса:
...........
/a@domain.com/  OK
/b@domain.com/  OK
...........


содержимое recipient_regex - список контролируемых адресов в
вашей сети:
...........
/^community@altlinux.*/  custom_restrictions_1
...........

Алгоритм такой: получив письмо на адрес community@altlinux.*,
постфикс запустит для него проверку правила
custom_restrictions_1. Если отправитель не принадлежит списку
list_1, его письмо попадет на reject.



  reply	other threads:[~2003-06-10 15:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-10 14:43 [Comm] " Maxim Tyurin
2003-06-10 15:46 ` Ilya Palagin [this message]
2003-06-10 16:02   ` [Comm] " Ilya Palagin
2003-06-10 16:35     ` Maxim Tyurin

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=20030610154605.GA1014@tux \
    --to=tux@fioc.kz \
    --cc=community@altlinux.ru \
    /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