master.cf:

smtp      inet  n       -       n       -       -       smtpd
        -o content_filter=filter:dummy
9009      inet  n       -       n       -       -       smtpd
        -o content_filter=filter:dummy
filter    unix  -       n       n       -       20      pipe
        flags=Rq user=filter argv=/var/antispam/myscript -f ${sender}
-- ${recipient}

policy  unix  -       n       n       -       0       spawn
        user=nobody argv=/usr/bin/perl /usr/libexec/postfix/greylist.pl
#       -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps    inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission   inet    n       -       n       -       -       smtpd
#  -o smtpd_etrn_restrictions=reject
#  -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628      inet  n       -       n       -       -       qmqpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
        -o fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
retry     unix  -       -       n       -       -       error
proxywrite unix -       -       n       -       1       proxymap


postconf -n:

alias_database = hash:/etc/mail/aliases
alias_maps = hash:/etc/mail/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
disable_vrfy_command = yes
html_directory = no
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
message_size_limit = 100240000
mydestination = $transport_maps
mydomain = foo.com
myhostname = server.foo.com
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
relay_domains =
proxy:mysql:/etc/postfix/mysql_relay_domains_maps.cf,hash:/etc/postfix/relay
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_host_lookup = native,dns
smtpd_client_connection_count_limit = 50
smtpd_client_restrictions =
permit_sasl_authenticated,permit_mynetworks,reject_non_fqdn_sender,
reject_rbl_client list.dsbl.org,reject_rbl_client
sbl-xbl.spamhaus.org,reject_non_fqdn_hostname,reject_non_fqdn_recipient
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_sasl_authenticated,
permit_mynetworks, reject_invalid_hostname
smtpd_recipient_restrictions =
permit_mynetworks,permit_sasl_authenticated,check_sender_access
hash:/etc/postfix/whitelist/whitelist_reject_non_fqdn_sender,reject_non_fqdn_sender,reject_non_fqdn_sender,reject_unauth_destination,reject_unauth_pipelining,reject_rbl_client
list.dsbl.org,reject_rbl_client
sbl-xbl.spamhaus.org,reject_non_fqdn_hostname,reject_non_fqdn_recipient
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = sasl2/smtpd
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = cyrus
smtpd_sender_restrictions =
permit_sasl_authenticated,permit_mynetworks,check_sender_access
hash:/etc/postfix/whitelist/whitelist_reject_non_fqdn_sender,reject_non_fqdn_sender,reject_unknown_sender_domain,reject_non_fqdn_hostname,reject_non_fqdn_recipient
strict_rfc821_envelopes = yes
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:102
virtual_mailbox_base = /var/spool/postfix/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 100240000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 1000
virtual_transport = virtual
virtual_uid_maps = static:1000


On Thu, Nov 13, 2008 at 5:08 PM, mouss <[EMAIL PROTECTED]> wrote:
> nik600 wrote:
>>
>> Hi to all.
>>
>> I've go a problem:
>> i've set up postfix to call a script in master.cf:
>>
>> smtp      inet  n       -       n       -       -       smtpd
>>        -o content_filter=filter:dummy
>> filter    unix  -       n       n       -       20      pipe
>>        flags=Rq user=filter argv=/var/antispam/myscript -f ${sender}
>> -- ${recipient}
>>
>> /var/antispam/myscript
>>
>> is a script shell that submit the mail using spamc to spamd.
>>
>> Spamc is invoked using spamc -u $4 where $4 is the destination user.
>>
>> Now, suppose that $4 is [EMAIL PROTECTED] and [EMAIL PROTECTED] is an alias 
>> to
>> [EMAIL PROTECTED]
>>
>> [EMAIL PROTECTED] has a spam score of 4 in the spampref table.
>>
>> with these configuration, [EMAIL PROTECTED] receives the email, but these
>> email has been checked with a default spam score, and not with the
>> spam score of 4.
>>
>> I'd like to scan the email with the preference of the real user that
>> receives the email, is it possibile?
>>
>> Is it possible to scan the email AFTER postfix has determined the real
>> user/users associated to the email? (even if this can imply to re-scan
>> the email multiple times one for each user associated to the alias).
>>
>
> unless you disable address rewrite, the filter should get the address after
> it was expanded. so your problem doesn't match your description.
>
> show your master.cf and the output of 'psoctonf -n'.
>



-- 
/*************/
nik600
http://www.kumbe.it

Reply via email to