Rene Bartsch wrote: >> Brian Evans - Postfix List wrote: >> >>> Rene Bartsch wrote: >>> >>> >>>>> Rene Bartsch wrote: >>>>> >>>>> >>>>> >>>>>> Hi, >>>>>> I'm running the combination of Postfix, Postfix-GLD (Greylisting) and >>>>>> DBMail(MDA) as a >>>>>> >>>>>> >>>>>> >>>> stand-alone >>>> >>>> >>>> >>>>>> Internet host on a Ubuntu-9.04 system. The file 'sql-recipients.cf' >>>>>> provides the MySQL access >>>>>> >>>>>> >>>>>> >>>> information for the list of mail-aliases in DBMail and 'sql-domains.cf' >>>> provides the list of >>>> > virtual domains extracted from the mail-aliases. > >>>> >>>>> According to your config below, you are trying to use local as virtual. >>>>> Don't do this. >>>>> >>>>> >>>>> >>>> According to http://www.dbmail.org/dokuwiki/doku.php/setup_postfix I shall >>>> do this. >>>> >>>> >>>> >>>> >>> This documentation tries to override the Address Classes that Postfix has >>> defined in the >>> > ADDRESS_CLASS_README. > >>> No guarantees are given with unsupported configurations. >>> >>> >>> >>>> If I use virtual as you proposed, remote clients can send mail to postfix, >>>> but postfix doesn't >>>> > relay mail from local (loopback or private network) users to the internet. > >>>> (Message not sent. Server replied: >>>> Action not performed: mailbox not available >>>> 550 5.1.1 <postfix-users@postfix.org>: Recipient address rejected: User >>>> unknown in virtual >>>> mailbox table >>>> >>>> >>>> >>>> >> In addition, why are you accepting mail locally as postfix.org? >> > > I do NOT ACCEPT mail as "postfix.org". That error occurrs when I try to SEND > MAIL to the internet > (in this case to the postfix ML). > > With the following configuration I can receive mail from the internet with > DBMAIL and send mail > from local hosts to DBMAIL accounts, but I CANNOT SEND MAIL TO THE INTERNET > getting the error: > "550 5.1.1 $recipient: Recipient address rejected: User unknown in virtual > mailbox table" > > ------------------------------------ snip > ------------------------------------------------------- > > append_dot_mydomain = no > biff = no > config_directory = /etc/postfix > mail_owner = postfix > mynetworks = 127.0.0.0/8, 10.214.224.0/24, 10.214.234.0/24 > myorigin = $mydomain > readme_directory = no > recipient_delimiter = + > relay_domains = > setgid_group = postdrop > smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) > virtual_mailbox_domains = mysql:/etc/postfix/sql-virtual_mailbox_domains.cf > virtual_mailbox_maps = > mysql:/etc/postfix/sql-virtual_mailbox_maps.cf virtual_transport = > dbmail-lmtp:127.0.0.1:24 > > ------------------------------------ snap > ------------------------------------------------------- > > When I disable the virtual* entries I can send mail fine, but cannot receive > mail, of course. > > I used "postmap -q" to check the MySQL results: > > "mysql:/etc/postfix/sql-virtual_mailbox_domains.cf" returns a comma-separated > list of the domains >
I hope you are not trying to list all domains with every query. For virtual_(alias|mailbox)_domains or mydestination using a mysql map, Postfix expect to give a domain to a query . If *any* result is returned, the return value is ignored and the lookup is considered a success. This can be where Postfix is confusing all domains to be relayed locally. An example: query = SELECT 1 from domains where domain='%s' > to receive mail for and "mysql:/etc/postfix/sql-virtual_mailbox_maps.cf" > returns the full mail > address queried for or nothing if there is no alias or account in DBMail. > It would help to show the mysql maps you are using here (hide user/pass).