[Comm] Как прикрутить mailfilter
Pavel Stoliarov
=?iso-8859-1?q?mylinux02_=CE=C1_mail=2Eru?=
Пт Сен 17 07:41:41 MSD 2004
Всем привет.
Имеется Master2.2 , установлена связка postfix 2.0.16 + openldap-2.0.27 +
amavisd-new-20030616 + clamav-0.75.1
Все работает замечательно , но возникла проблемка, необходимо прикрутить
mailfilter, ну или proсmail на худой конец , что бы делать некие манимуляции
с почтой прежде чем она попадет в пользовательский maildir. Не могу понять
как это сделать.
настройки main.cf:
myhostname = ns.mydomain.ru
mydomain = mydomain.ru
myorigin = $mydomain
mydestination = localhost, $myhostname, localhost.$mydomain,
$config_directory/mydestination
unknown_local_recipient_reject_code = 550
mynetworks = $config_directory/mynetworks
home_mailbox = Maildir/
mailbox_command = /usr/bin/procmail -a $DOMAIN -d $LOGNAME
smtpd_etrn_restrictions = permit_mynetworks, reject
smtpd_helo_required = yes
readme_directory = /etc/postfix/README_FILES
sample_directory = /etc/postfix/samples
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/share/man
daemon_directory = /usr/lib/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix
biff = no
message_size_limit = 10280000
mailbox_size_limit = 20480000
local_recipient_maps = $virtual_mailbox_maps
unknown_local_recipient_reject_code = 550
maximal_queue_lifetime = 1d
local_transport = virtual
virtual_mailbox_base = /
virtual_mailbox_maps = ldap:ldapvirtual
virtual_mailbox_limit_inbox = no
virtual_mailbox_limit_override = yes
virtual_mailbox_limit_maps = ldap:ldapquota
virtual_mailbox_limit = 2048000000
virtual_maildir_extended = yes
virtual_create_maildirsize = yes
virtual_uid_maps = static:1001
virtual_gid_maps = static:1001
virtual_minimum_uid = 500
ldapvirtual_timeout = 10
ldapvirtual_server_host = localhost
ldapvirtual_server_port = 389
ldapvirtual_search_base = ou=mail,dc=mydomain,dc=ru
ldapvirtual_query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))
(accountstatus=active))
ldapvirtual_result_attribute = mailMessageStore
ldapvirtual_bind = yes
ldapvirtual_bind_dn = cn=postfix,ou=daemons,dc=mydomain,dc=ru
ldapvirtual_bind_pw = postfix
ldapquota_timeout = 10
ldapquota_server_host = localhost
ldapquota_search_base = ou=mail,dc=mydomain,dc=ru
ldapquota_server_port = 389
ldapquota_query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))
(accountstatus=active))
ldapquota_result_attribute = mailQuota
ldapquota_bind = yes
ldapquota_bind_dn = cn=postfix,ou=daemons,dc=mydomain,dc=ru
ldapquota_bind_pw = postfix
virtual_maps = ldap:ldapsource
ldapsource_timeout = 10
ldapsource_server_host = localhost
ldapsource_search_base = ou=mail,dc=mydomain,dc=ru
ldapsource_server_port = 389
ldapsource_domain = mydomain.ru
ldapvirtual_query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))
(accountstatus=active))
ldapsource_result_attribute = uid
ldapsource_bind = yes
ldapsource_bind_dn = cn=postfix,ou=daemons,dc=mydomain,dc=ru
ldapsource_bind_pw = postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
master.cf:
smtp inet n - y - - smtpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - - 300 1 qmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
showq unix n - - - - showq
error unix - - - - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
smtp-amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
--
Best regards
Pavel Stoliarov
Подробная информация о списке рассылки community