Hello,
We have a lot of virtual_alias_maps like
[EMAIL PROTECTED] => [EMAIL PROTECTED], [EMAIL PROTECTED], 
[EMAIL PROTECTED]      (1)
and also some of the form
[EMAIL PROTECTED] => [EMAIL PROTECTED], [EMAIL PROTECTED], 
[EMAIL PROTECTED]      (2)

Each [EMAIL PROTECTED] has different spam and virus policies (selected 
via $sql_select_policy
from Postgresql database) and different white- and blacklists 
($sql_select_white_black_list).

Unfortunatelly the aliases will be interpreted by postfix after the 
mailfiltering, so amavisd-new
can't select the different policies per user.
How do I change this?

If I remove the line 'receive_override_options = no_address_mappings' 
form main.cf
aliases of the type (2) start to work like the following:
- [EMAIL PROTECTED] receives a mail for [EMAIL PROTECTED] once (which is OK)
- [EMAIL PROTECTED] receives a mail for [EMAIL PROTECTED] twice (which is 
not OK)
- [EMAIL PROTECTED] receives a mail for [EMAIL PROTECTED] twice (which is 
not OK)
... and I'm not sure if the per user will be used.


Any help would be aprecciated.
Thanks valli



Here's some relevant configuration:
 >> /etc/postfix/master.cf
...
  smtp-amavis     unix    -       -       n       -       2       smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes
    -o disable_dns_lookups=yes
  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
    -o smtpd_client_connection_count_limit=0
    -o smtpd_client_connection_rate_limit=0
    -o 
receive_override_options=no_header_body_checks,no_unknown_recipient_checks
...

 >> /etc/postfix/main.cf
...
  content_filter=smtp-amavis:[127.0.0.1]:10024
  receive_override_options = no_address_mappings

 >> /etc/amavisd.conf
...
# Section V - Per-recipient and per-sender handling, whitelisting, etc.
@lookup_sql_dsn =
   ( ['DBI:Pg:host=localhost;dbname=ics_hosting_db', 'mail_prg', 
'XXXXXX'] );

$sql_select_policy = 'SELECT * FROM mail_prg.v_policy'.
  ' WHERE (email_address IN (%k))';

$sql_select_white_black_list = 'SELECT wb FROM mail_prg.v_whiteblack_list'.
  ' WHERE (mail_mailbox_id=?) AND (from_address IN (%k))'.
  ' ORDER BY priority DESC';
...
$localpart_is_case_sensitive = 0;
...


-- 
Valentin Schmid
[EMAIL PROTECTED]
Tel.: ++41 81 936 03 75
Fax:  ++41 81 936 03 76
ICSurselva AG - Internet Intranet Solutions



_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to