Hi Gunnar, <br><br>As far no answer from the debian group :/ <br><br>however,i've managed to get it work better... at least now i can see in the logs that the kolabpolicy is called... <br><br>now, here's my config : <br>
<br>/etc/postfix/main.cf<br><br><br># Debian specific: Specifying a file name will cause the first<br># line of that file to be used as the name. The Debian default<br># is /etc/mailname.<br>#myorigin = /etc/mailname<br>
<br>smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)<br>biff = no<br><br># appending .domain is the MUA's job.<br>append_dot_mydomain = no<br><br># Uncomment the next line to generate "delayed mail" warnings<br>
#delay_warning_time = 4h<br><br># TLS parameters<br>smtpd_tls_cert_file=/var/smtp/mail.pem<br>smtpd_tls_key_file=/var/smtp/mail.key<br>smtpd_use_tls=yes<br>smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache<br>
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache<br><br># See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for<br># information on enabling SSL in the smtp client.<br><br>myhostname = <a href="http://myhost.mydomain.org">myhost.mydomain.org</a><br>
alias_maps = hash:/etc/aliases<br>alias_database = hash:/etc/aliases<br>myorigin = /etc/mailname<br>mydestination = <a href="http://myhost.mydomain.org">myhost.mydomain.org</a>, <a href="http://mydomain.org">mydomain.org</a>, localhost<br>
relayhost = <br>mynetworks = <a href="http://127.0.0.0/8">127.0.0.0/8</a><br>mailbox_command = procmail -a "$EXTENSION"<br>mailbox_size_limit = 0<br>recipient_delimiter = +<br>inet_interfaces = all<br><br>virtual_alias_maps = ldap:/etc/postfix/kolab-<a href="http://ldapdistlist.cf">ldapdistlist.cf</a>,ldap:/etc/postfix/kolab-<a href="http://ldapvirtual.cf">ldapvirtual.cf</a><br>
# transport_maps = ldap:/etc/postfix/kolab-<a href="http://ldaptransport.cf">ldaptransport.cf</a><br><br>mailbox_transport = kolabmailboxfilter<br>smtpd_sasl_auth_enable = yes<br>smtpd_sasl_security_options = noanonymous<br>
# Support broken clients like Microsoft Outlook Express 4.x which expect AUTH=LOGIN instead of AUTH LOGIN<br>broken_sasl_auth_clients = yes<br>smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,reject_unauth_destination, reject_unlisted_recipient, check_policy_service unix:private/kolabpolicy<br>
#smtpd_sender_restrictions = permit_mynetworks, check_policy_service unix:private/kolabpolicy<br><br>relay_domains=<br><br>kolabpolicy_time_limit = 3600<br>kolabpolicy_max_idle = 20<br><br>----------------------------------------------------------------------<br>
<br>/etc/postfix/master.cf<br><br>#<br># Postfix master process configuration file. For details on the format<br># of the file, see the master(5) manual page (command: "man 5 master").<br>#<br># ==========================================================================<br>
# service type private unpriv chroot wakeup maxproc command + args<br># (yes) (yes) (yes) (never) (100)<br># ==========================================================================<br>smtp inet n - n - - smtpd<br>
#submission inet n - - - - smtpd<br># -o smtpd_enforce_tls=yes<br># -o smtpd_sasl_auth_enable=yes<br># -o smtpd_client_restrictions=permit_sasl_authenticated,reject<br>smtps inet n - n - - smtpd<br>
-o smtpd_tls_wrappermode=yes<br> -o smtpd_sasl_auth_enable=yes<br> -o smtpd_client_restrictions=permit_sasl_authenticated,reject<br>#628 inet n - - - - qmqpd<br>pickup fifo n - - 60 1 pickup<br>
cleanup unix n - - - 0 cleanup<br>qmgr fifo n - n 300 1 qmgr<br>#qmgr fifo n - - 300 1 oqmgr<br>tlsmgr unix - - - 1000? 1 tlsmgr<br>
rewrite unix - - - - - trivial-rewrite<br>bounce unix - - - - 0 bounce<br>defer unix - - - - 0 bounce<br>trace unix - - - - 0 bounce<br>
verify unix - - - - 1 verify<br>flush unix n - - 1000? 0 flush<br>proxymap unix - - n - - proxymap<br>smtp unix - - - - - smtp<br>
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops<br>relay unix - - - - - smtp<br> -o fallback_relay=<br># -o smtp_helo_timeout=5 -o smtp_connect_timeout=5<br>
showq unix n - - - - showq<br>error unix - - - - - error<br>discard unix - - - - - discard<br>local unix - n n - - local<br>
virtual unix - n n - - virtual<br>lmtp unix - - - - - lmtp<br>anvil unix - - - - 1 anvil<br>scache unix - - - - 1 scache<br>
#<br># ====================================================================<br># ====================================================================<br># Interfaces to non-Postfix software. Be sure to examine the manual<br>
# pages of the non-Postfix software to find out what options it wants.<br>#<br># Many of the following services use the Postfix pipe(8) delivery<br># agent. See the pipe(8) man page for information about ${recipient}<br>
# and other message envelope options.<br># ====================================================================<br>#<br># maildrop. See the Postfix MAILDROP_README file for details.<br># Also specify in <a href="http://main.cf" target="_blank">main.cf</a>: maildrop_destination_recipient_limit=1<br>
#<br>maildrop unix - n n - - pipe<br> flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}<br>#<br># See the Postfix UUCP_README file for configuration details.<br>#<br>uucp unix - n n - - pipe<br>
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)<br>#<br># Other external delivery methods.<br>#<br>ifmail unix - n n - - pipe<br> flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)<br>
bsmtp unix - n n - - pipe<br> flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient<br>scalemail-backend unix - n n - 2 pipe<br> flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}<br>
mailman unix - n n - - pipe<br> flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py<br> ${nexthop} ${user}<br>kolabfilter unix - n n - - pipe user=nobody null_sender= argv=/usr/bin/php<br>
-c /etc/php4/cli/php.ini<br> -f /usr/share/kolab-resource-handlers/kolabfilter.php<br> --<br> -h <a href="http://myhost.mydomain.org">myhost.mydomain.org</a><br> -s ${sender}<br> -r ${recipient}<br> -c ${client_address}<br>
<br>kolabmailboxfilter unix - n n - - pipe user=nobody null_sender= argv=/usr/bin/php<br> -c /etc/php4/cli/php.ini<br> -f /usr/share/kolab-resource-handlers/kolabmailboxfilter.php<br>
--<br> -h <a href="http://myhost.mydomain.org">myhost.mydomain.org</a><br> -s ${sender}<br> -r ${recipient}<br> -c ${client_address}<br>kolabpolicy unix - n n - - spawn user=kolab argv=/usr/sbin/kolab_smtpdpolicy -v<br>
<br>------------------------------------------------------------<br><br>and finally,<br><br>/etc/kolab/kolab_smtpdpolicy.conf<br><br>ldap_uri: ldap://127.0.0.1:389<br>basedn: dc=mydomain,dc=org<br>binddn: cn=manager,cn=internal,dc=mydomain,dc=org<br>
bindpw: mypassword<br>domain: <a href="http://mydomain.org">mydomain.org</a><br>
allow_unauth: 1<br>permithosts: localhost<br><br>Do these config files seem good to you? <br><br>i can't understand why when putting
allow_unauth: 0 then i get the following error when i send a mail from an external user to a kolab user <br><br>Feb 20 21:47:47 mailhost /usr/sbin/kolab_smtpdpolicy[18637]: Checking sender="<a href="mailto:me@gmail.com">me@gmail.com</a>", recipient="<a href="mailto:kolabuser@mydomain.org">kolabuser@mydomain.org</a>", username="", domains= permithosts=localhost, conf_allowunauth=0 <br>
Feb 20 21:47:47 mailhost /usr/sbin/kolab_smtpdpolicy[18637]: LDAP search returned 0 objects <br>Feb 20 21:47:47 mailhost /usr/sbin/kolab_smtpdpolicy[18637]: Attempt to fake address <a href="mailto:me@gmail.com">me@gmail.com</a><br>
Feb 20 21:47:47 mailhost /usr/sbin/kolab_smtpdpolicy[18637]: Action: REJECT Invalid sender <br>Feb 20 21:47:47 mailhost postfix/smtpd[18631]: NOQUEUE: reject: RCPT from <a href="http://myserver.gmail.com">myserver.gmail.com</a>: 554 5.7.1 <<a href="mailto:me@gmail.com">me@gmail.com</a>>: Sender address rejected: Invalid sender; from=<<a href="mailto:me@gmail.com">me@gmail.com</a>> to=<<a href="mailto:olabuser@mydomain.org">olabuser@mydomain.org</a>> proto=ESMTP helo=<<a href="http://smtp.gmail.com">smtp.gmail.com</a>><br>
<br>When i send a mail directly from Horde (which is on the same server) the policy is not called to treat the message... I suppose that it has something to do with the order of parameters in smtpd_recipient_restrictions ? <br>
<br>Many thanks for your help, <br><br>Eleni<br><br><br><div class="gmail_quote"><br></div><br>