Helo,

I have a small issue with content filtering and cant get my around  
it.  When I enable @lookup_sql_dsn in the amavisd.conf file postfix  
smtp process gives me an error.

Feb 13 22:59:59 freebsd postfix/smtp[15907]: A365A17F91:  
to=<[EMAIL PROTECTED]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.51,  
delays=0.47/0.01/0.01/0.02, dsn=4.4.2, status=deferred (lost  
connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)

and in the amavis log when it was confined to the console I got this:

Feb 13 23:41:31 freebsd. domain.net /usr/local/bin/amavisd[16291]:  
(16291-01) lookup_sql "ian@ domain.net", query args: "ian@  
domain.net", "@ domain.net", "@. domain.net", "@.net", "@."
Feb 13 23:41:31 freebsd. domain.net /usr/local/bin/amavisd[16291]:  
(16291-01) lookup_sql select: SELECT *,users.id FROM users,policy  
WHERE (users.policy_id=policy.id) AND (users.email IN (?,?,?,?,?))  
ORDER BY users.priority DESC
Feb 13 23:41:31 freebsd. domain.net /usr/local/bin/amavisd[16291]:  
(16291-01) sql begin, nontransaction
Feb 13 23:41:31 freebsd. domain.net /usr/local/bin/amavisd[16291]:  
(16291-01) Connecting to SQL database server
Feb 13 23:41:31 freebsd. domain.net /usr/local/bin/amavisd[16291]:  
(16291-01) connect_to_sql: trying 'DBI:mysql:amavisdPolicies:localhost'
Feb 13 23:41:31 freebsd. domain.net /usr/local/bin/amavisd[16291]:  
(16291-01) connect_to_sql: 'DBI:mysql:amavisdPolicies:localhost'  
succeeded
Feb 13 23:41:31 freebsd. domain.net /usr/local/bin/amavisd[16291]:  
(16291-01) sql: preparing and executing: SELECT *,users.id FROM  
users,policy WHERE (users.policy_id=policy.id) AND (users.email IN  
(?,?,?,?,?)) ORDER BY users.priority DESC
Feb 13 23:41:31 freebsd.domain.net /usr/local/bin/amavisd[16281]:  
Net::Server: Starting "1" children
Feb 13 23:41:31 freebsd. domain.net /usr/local/bin/amavisd[16309]:  
Net::Server: Child Preforked (16309)
Feb 13 23:41:31 freebsd. domain.net /usr/local/bin/amavisd[16309]:  
TIMING [total 6 ms] - bdb-open: 6 (100%)100, rundown: 0 (0%)100



If I disable @lookup_sql_dsn and just use the defaults from the  
amavisd conf file everthing is ok.


Postfix is setup as follows:
master.cf

smtp-amavis unix - - n - 2 smtp
    -o smtp_data_done_timeout=1200
    -o disable_dns_lookups=yes
    -o smtp_send_xforward_command=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_helo_restrictions=
    -o smtpd_client_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


main.cf is as follows

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
fallback_transport = virtual
home_mailbox = Maildir/
html_directory = no
local_recipient_maps = unix:passwd.byname $alias_maps  
$virtual_mailbox_maps
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/share/man
mydestination = $myhostname, $mydomain, localhost
mydomain = domain.net
myhostname = mail. domain.net
mynetworks = my_cidr_list, 127.0.0.0/8, localhost
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /usr/local/var/spool/postfix
readme_directory = no
relay_domains = $transport_maps
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_recipient_restrictions = permit_sasl_authenticated,  
permit_mynetworks, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
transport_maps = mysql:/etc/postfix/sql/transport
unknown_local_recipient_reject_code = 550
virtual_gid_maps = static:500
virtual_mailbox_base = /usr/local/vmail
virtual_mailbox_maps = mysql:/etc/postfix/sql/vmailbox
virtual_minimum_uid = 500
virtual_uid_maps = static:500

Can someone please help??

Thanks,
Ian




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
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