Re: Strange Postfix-LDAP-Amavis behaviour
El Viernes, 7 de Mayo de 2004 00:40, Theodore Knab escribió: If you are using ldap with postfix, the mapping is not a hash anymore. It becomes a ldap querry. That's exactly what I'm trying to do. You need to create mappings like this. virtual_maps = hash:/etc/postfix/virtual, ldap:ldapaltmail #ldap virtual aliases (...) ldapaltmail_domain = hash:/etc/postfix/searchdomains This is a hash, so this is not what I want... What I'm trying to do is to put/get the maximum info on the ldap server, and put/get the minimum info from HD config files. This hash makes accepted domains are stored in HD, and I want to store/get them from LDAP server... Read the documents called LDAP_README.gz in your /usr/share/doc/postfix directory. Done carefully, be sure ;) That's not the problem. Postfix gets the aliases correctly with my config. But when the maildrop is a non-local email, amavis drops it back. I am trying now file /etc/postfix/master.cf, maybe the problem is there, but I'm not sure. Here's what I added to this file for amavis: smtp-amavis unix - - n - 2 smtp -o smtp_data_done_timeout=1200 -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 I've been tuning this parameters, but I can't find the solution... Any hint? Thanks Here's the log entries for an aliased account that sends email to a local-email and a non-local-email. We can see it delivers the mail to local correctly, but fails to non-local: May 7 11:10:19 orc postfix/smtpd[24258]: connect from unknown[172.16.1.11] May 7 11:10:19 orc postfix/smtpd[24258]: 0C24393293: client=unknown[172.16.1.11] May 7 11:10:19 orc postfix/trivial-rewrite[24260]: warning: dict_ldap_lookup: accepteddomains: Fixed query_filter (associatedDomain=*) is probably useless May 7 11:10:19 orc postfix/cleanup[24259]: 0C24393293: message-id=[EMAIL PROTECTED] May 7 11:10:19 orc postfix/qmgr[24253]: 0C24393293: from=[EMAIL PROTECTED], size=1234, nrcpt=2 (queue active) May 7 11:10:19 orc postfix/smtpd[24258]: disconnect from unknown[172.16.1.11] May 7 11:10:19 orc postfix/trivial-rewrite[24260]: warning: dict_ldap_lookup: accepteddomains: Fixed query_filter (associatedDomain=*) is probably useless May 7 11:10:19 orc postfix/trivial-rewrite[24260]: warning: dict_ldap_lookup: accepteddomains: Fixed query_filter (associatedDomain=*) is probably useless May 7 11:10:19 orc postfix/smtpd[24262]: connect from localhost[127.0.0.1] May 7 11:10:19 orc postfix/smtpd[24262]: 4C3A693294: client=localhost[127.0.0.1] May 7 11:10:19 orc postfix/trivial-rewrite[24260]: warning: dict_ldap_lookup: accepteddomains: Fixed query_filter (associatedDomain=*) is probably useless May 7 11:10:19 orc postfix/trivial-rewrite[24260]: warning: dict_ldap_lookup: accepteddomains: Fixed query_filter (associatedDomain=*) is probably useless May 7 11:10:19 orc postfix/smtpd[24262]: 4C3A693294: reject: RCPT from localhost[127.0.0.1]: 550 [EMAIL PROTECTED]: User unknown in virtual mailbox table; from=[EMAIL PROTECTED] to=[EMAIL PROTECTED] proto=ESMTP helo=localhost May 7 11:10:19 orc postfix/cleanup[24259]: 4C3A693294: message-id=[EMAIL PROTECTED] May 7 11:10:19 orc postfix/smtpd[24262]: disconnect from localhost[127.0.0.1] May 7 11:10:19 orc postfix/qmgr[24253]: 4C3A693294: from=[EMAIL PROTECTED], size=1644, nrcpt=1 (queue active) May 7 11:10:19 orc postfix/smtpd[24262]: connect from localhost[127.0.0.1] May 7 11:10:19 orc postfix/smtpd[24262]: 7DF3793295: client=localhost[127.0.0.1] May 7 11:10:19 orc postfix/trivial-rewrite[24260]: warning: dict_ldap_lookup: accepteddomains: Fixed query_filter (associatedDomain=*) is probably useless May 7 11:10:19 orc postfix/cleanup[24259]: 7DF3793295: message-id=[EMAIL PROTECTED] May 7 11:10:19 orc postfix/qmgr[24253]: 7DF3793295: from=, size=2977, nrcpt=1 (queue active) May 7 11:10:19 orc postfix/smtpd[24262]: disconnect from localhost[127.0.0.1] May 7 11:10:19 orc postfix/smtp[24261]: 0C24393293: to=[EMAIL PROTECTED], orig_to=[EMAIL PROTECTED], relay=127.0.0.1[127.0.0.1], delay=0, status=sent (250 2.6.0 Ok, id=23870-02, from MTA: 250 Ok: queued as 4C3A693294, but 1 REJECT) May 7 11:10:19 orc postfix/smtp[24261]: 0C24393293: to=[EMAIL PROTECTED], orig_to=[EMAIL PROTECTED], relay=127.0.0.1[127.0.0.1], delay=0, status=sent (250 2.6.0 Ok, id=23870-02, from MTA: 250 Ok: queued as 4C3A693294, but 1 REJECT) May 7 11:10:19 orc postfix/virtual[24263]: 4C3A693294: to=[EMAIL PROTECTED], relay=virtual, delay=0, status=sent
Re: Strange Postfix-LDAP-Amavis behaviour
On Fri, May 07, 2004 at 11:24:19AM +0200, Tomàs Núñez Lirola wrote: ldapaltmail_domain = hash:/etc/postfix/searchdomains This is a hash, so this is not what I want... What I'm trying to do is to put/get the maximum info on the ldap server, and put/get the minimum info from HD config files. This hash makes accepted domains are stored in HD, and I want to store/get them from LDAP server... Just for info., I had _really bad_ performances when getting domains from ldap, this makes a lot of queries. I recommend using some caching (ldap caching needs libldap rebuild with this option), or simply dump your domains from ldap to a hash with a cron. That's not the problem. Postfix gets the aliases correctly with my config. But when the maildrop is a non-local email, amavis drops it back. I am trying now file /etc/postfix/master.cf, maybe the problem is there, but I'm not sure. Just a hint (without a big read at your problem :/), look at the local_recipient_maps if you change your local delivery agent, depending on your setup, it should be necessary to modify it. -- Emmanuel Lacour Easter-eggs 44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 41 35 00 76 mailto:[EMAIL PROTECTED] -http://www.easter-eggs.com -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Returned mail: User unknown
- The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown - Header of original message follows - Return-Path: [EMAIL PROTECTED] Received: from t-online.de ([213.140.17.105]) by mailin07.sul.t-online.de with esmtp id 1BM7UZ-0Du4K80; Fri, 7 May 2004 17:42:27 +0200 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Thanks! Date: Fri, 7 May 2004 17:43:22 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary==_NextPart_000_0004_2AC4.6256 X-Priority: 3 X-MSMail-Priority: Normal X-Seen: false X-TOI-SPAM: n;0;2004-05-07T15:42:30Z -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
For your health
Start enjoying your life Take actions for your private life This is not a joke, is real Convince yourself http://www.topsummer.biz/vprx/ Stop: http://www.summertimenews.info/vprx/buddy.php
Re: Strange Postfix-LDAP-Amavis behaviour
El Viernes, 7 de Mayo de 2004 00:40, Theodore Knab escribió: If you are using ldap with postfix, the mapping is not a hash anymore. It becomes a ldap querry. That's exactly what I'm trying to do. You need to create mappings like this. virtual_maps = hash:/etc/postfix/virtual, ldap:ldapaltmail #ldap virtual aliases (...) ldapaltmail_domain = hash:/etc/postfix/searchdomains This is a hash, so this is not what I want... What I'm trying to do is to put/get the maximum info on the ldap server, and put/get the minimum info from HD config files. This hash makes accepted domains are stored in HD, and I want to store/get them from LDAP server... Read the documents called LDAP_README.gz in your /usr/share/doc/postfix directory. Done carefully, be sure ;) That's not the problem. Postfix gets the aliases correctly with my config. But when the maildrop is a non-local email, amavis drops it back. I am trying now file /etc/postfix/master.cf, maybe the problem is there, but I'm not sure. Here's what I added to this file for amavis: smtp-amavis unix - - n - 2 smtp -o smtp_data_done_timeout=1200 -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 I've been tuning this parameters, but I can't find the solution... Any hint? Thanks Here's the log entries for an aliased account that sends email to a local-email and a non-local-email. We can see it delivers the mail to local correctly, but fails to non-local: May 7 11:10:19 orc postfix/smtpd[24258]: connect from unknown[172.16.1.11] May 7 11:10:19 orc postfix/smtpd[24258]: 0C24393293: client=unknown[172.16.1.11] May 7 11:10:19 orc postfix/trivial-rewrite[24260]: warning: dict_ldap_lookup: accepteddomains: Fixed query_filter (associatedDomain=*) is probably useless May 7 11:10:19 orc postfix/cleanup[24259]: 0C24393293: message-id=[EMAIL PROTECTED] May 7 11:10:19 orc postfix/qmgr[24253]: 0C24393293: from=[EMAIL PROTECTED], size=1234, nrcpt=2 (queue active) May 7 11:10:19 orc postfix/smtpd[24258]: disconnect from unknown[172.16.1.11] May 7 11:10:19 orc postfix/trivial-rewrite[24260]: warning: dict_ldap_lookup: accepteddomains: Fixed query_filter (associatedDomain=*) is probably useless May 7 11:10:19 orc postfix/trivial-rewrite[24260]: warning: dict_ldap_lookup: accepteddomains: Fixed query_filter (associatedDomain=*) is probably useless May 7 11:10:19 orc postfix/smtpd[24262]: connect from localhost[127.0.0.1] May 7 11:10:19 orc postfix/smtpd[24262]: 4C3A693294: client=localhost[127.0.0.1] May 7 11:10:19 orc postfix/trivial-rewrite[24260]: warning: dict_ldap_lookup: accepteddomains: Fixed query_filter (associatedDomain=*) is probably useless May 7 11:10:19 orc postfix/trivial-rewrite[24260]: warning: dict_ldap_lookup: accepteddomains: Fixed query_filter (associatedDomain=*) is probably useless May 7 11:10:19 orc postfix/smtpd[24262]: 4C3A693294: reject: RCPT from localhost[127.0.0.1]: 550 [EMAIL PROTECTED]: User unknown in virtual mailbox table; from=[EMAIL PROTECTED] to=[EMAIL PROTECTED] proto=ESMTP helo=localhost May 7 11:10:19 orc postfix/cleanup[24259]: 4C3A693294: message-id=[EMAIL PROTECTED] May 7 11:10:19 orc postfix/smtpd[24262]: disconnect from localhost[127.0.0.1] May 7 11:10:19 orc postfix/qmgr[24253]: 4C3A693294: from=[EMAIL PROTECTED], size=1644, nrcpt=1 (queue active) May 7 11:10:19 orc postfix/smtpd[24262]: connect from localhost[127.0.0.1] May 7 11:10:19 orc postfix/smtpd[24262]: 7DF3793295: client=localhost[127.0.0.1] May 7 11:10:19 orc postfix/trivial-rewrite[24260]: warning: dict_ldap_lookup: accepteddomains: Fixed query_filter (associatedDomain=*) is probably useless May 7 11:10:19 orc postfix/cleanup[24259]: 7DF3793295: message-id=[EMAIL PROTECTED] May 7 11:10:19 orc postfix/qmgr[24253]: 7DF3793295: from=, size=2977, nrcpt=1 (queue active) May 7 11:10:19 orc postfix/smtpd[24262]: disconnect from localhost[127.0.0.1] May 7 11:10:19 orc postfix/smtp[24261]: 0C24393293: to=[EMAIL PROTECTED], orig_to=[EMAIL PROTECTED], relay=127.0.0.1[127.0.0.1], delay=0, status=sent (250 2.6.0 Ok, id=23870-02, from MTA: 250 Ok: queued as 4C3A693294, but 1 REJECT) May 7 11:10:19 orc postfix/smtp[24261]: 0C24393293: to=[EMAIL PROTECTED], orig_to=[EMAIL PROTECTED], relay=127.0.0.1[127.0.0.1], delay=0, status=sent (250 2.6.0 Ok, id=23870-02, from MTA: 250 Ok: queued as 4C3A693294, but 1 REJECT) May 7 11:10:19 orc postfix/virtual[24263]: 4C3A693294: to=[EMAIL PROTECTED], relay=virtual, delay=0, status=sent
Re: Strange Postfix-LDAP-Amavis behaviour
On Fri, May 07, 2004 at 11:24:19AM +0200, Tomàs Núñez Lirola wrote: ldapaltmail_domain = hash:/etc/postfix/searchdomains This is a hash, so this is not what I want... What I'm trying to do is to put/get the maximum info on the ldap server, and put/get the minimum info from HD config files. This hash makes accepted domains are stored in HD, and I want to store/get them from LDAP server... Just for info., I had _really bad_ performances when getting domains from ldap, this makes a lot of queries. I recommend using some caching (ldap caching needs libldap rebuild with this option), or simply dump your domains from ldap to a hash with a cron. That's not the problem. Postfix gets the aliases correctly with my config. But when the maildrop is a non-local email, amavis drops it back. I am trying now file /etc/postfix/master.cf, maybe the problem is there, but I'm not sure. Just a hint (without a big read at your problem :/), look at the local_recipient_maps if you change your local delivery agent, depending on your setup, it should be necessary to modify it. -- Emmanuel Lacour Easter-eggs 44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité Phone: +33 (0) 1 43 35 00 37- Fax: +33 (0) 1 41 35 00 76 mailto:[EMAIL PROTECTED] -http://www.easter-eggs.com
[SOLVED] Re: Strange Postfix-LDAP-Amavis behaviour
Well... I was going the wrong way... Amavis was not the problem, I took out amavis and the problem was still there. So here is the solution: I added a field on each domain in LDAP: destinationIndicator: virtual I added transport_maps to /etc/postfix/main.cf: transport_maps = ldap:ldaptransport hash:/etc/postfix/transport ldaptransport_server_host = localhost ldaptransport_server_port = 389 ldaptransport_bind = no ldaptransport_search_base = dc=domain,dc=com ldaptransport_query_filter = (associatedDomain=%d) ldaptransport_result_attribute = destinationIndicator and I added a line to /etc/postfix/transport * smtp: This way postfix redirects all non-local aliases. I don't know if I'm misusing the destinationIndicator field, but I think if I need this field in the future, I can change whenever I want to :) Thanks all for the hints! :) El Jueves, 6 de Mayo de 2004 17:12, Tomàs Núñez Lirola escribió: Hi again I've recently installed a mail server using Postfix-LDAP-Amavis. I stored accepted domains on a file postmapped (/etc/postfix/virtualdomains) and everything was ok. Now I've tried to store this accepted domains in the LDAP server and I've found some problem: amavis returns non-local aliases. No problem with local aliases, no problem with local delivery. Well, this config works perfectly (well, at least it seems to): /etc/postfix/main.cf: virtual_mailbox_domains = $virtual_mailbox_maps hash:/etc/postfix/virtualdomains /etc/postfix/virtualdomains: mydomain.com required LDAP Alias: dn: cn=Aliased account,ou=People,dc=mydomain.com,ou=Commercial, ou=Dealer,dc=root,dc=ldap mail: [EMAIL PROTECTED] sn: Aliased account cn: Aliased account objectClass: courierMailAlias objectClass: inetOrgPerson objectClass: top maildrop: [EMAIL PROTECTED] LDAP MyDomain: dn: dc=mydomain.com,ou=Commercial,ou=Dealer,dc=root,dc=ldap associatedDomain: mydomain.com dc: mydomain.com objectClass: top objectClass: dnsdomain objectClass: domainRelatedObject main.cf: virtual_maps = ldap:valiases valiases_server_host = localhost valiases_search_base = dc=mydomain,dc=com valiases_query_filter = ((mail=%s)(objectClass=CourierMailAlias)) valiases_result_attribute = maildrop And this other don't work at all. All the same except: virtual_mailbox_domains = $virtual_mailbox_maps ldap:accepteddomains accepteddomains_server_host = localhost accepteddomains_server_port = 389 accepteddomains_search_base = dc=mydomain,dc=com accepteddomains_query_filter = (associatedDomain=*) accepteddomains_result_attribute = associatedDomain This config works correctly with local mail, local aliases, but not with non-local aliases. When I send an email to this aliased account, I get an email from AMAVIS with the following error: From: amavisd-new [EMAIL PROTECTED] To: [EMAIL PROTECTED] at host mydomain. Our internal reference code for your message is 22949-09. Return-Path: [EMAIL PROTECTED] Your message [EMAIL PROTECTED] could not be delivered to: [EMAIL PROTECTED]: 127.0.0.1 said: 550 5.1.0 [EMAIL PROTECTED]: User unknown in virtual mailbox table I've been looking everywhere for what am I doing wrong, but I can't find it. I've got tons of docs, mans and discussion threads but unsuccessful. Any of you can tell me where to look at, please? Where may be the problem? Thanks ins advance
Returned mail: User unknown
- The following addresses had permanent fatal errors - [EMAIL PROTECTED] - Transcript of session follows - RCPT To:[EMAIL PROTECTED] 550 [EMAIL PROTECTED]... User unknown 550 [EMAIL PROTECTED]... User unknown - Header of original message follows - Return-Path: debian-isp@lists.debian.org Received: from t-online.de ([213.140.17.105]) by mailin07.sul.t-online.de with esmtp id 1BM7UZ-0Du4K80; Fri, 7 May 2004 17:42:27 +0200 From: debian-isp@lists.debian.org To: [EMAIL PROTECTED] Subject: Re: Thanks! Date: Fri, 7 May 2004 17:43:22 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary==_NextPart_000_0004_2AC4.6256 X-Priority: 3 X-MSMail-Priority: Normal X-Seen: false X-TOI-SPAM: n;0;2004-05-07T15:42:30Z
For your health
Start enjoying your life Take actions for your private life This is not a joke, is real Convince yourself http://www.topsummer.biz/vprx/ Stop: http://www.summertimenews.info/vprx/buddy.php