mouss | 14 May 15:22

Re: relay_recipient_maps doens't work

chantal <at> antenna.nl wrote:
> Hi list,
>
> I want to use relay_recipient_maps on a postfix 2.5.1 relay server but 
> it doens't appear to be doing anything. I want to accept mail for 
> existing users only but it accepts mail for all users.
>
> this is postconf -n
>
> append_at_myorigin = no
> append_dot_mydomain = no
> biff = no
> config_directory = /etc/postfix
> content_filter = smtp-amavis:[127.0.0.1]:10024
> inet_interfaces = all
> local_recipient_maps =
> mailbox_size_limit = 0
> message_size_limit = 25000000
> mydestination =
> myhostname = server.domain.com
> mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
> myorigin = domain.com
> readme_directory = no
> recipient_delimiter = +
> relay_domains = mysql:$config_directory/mysql_relay_domains_maps.cf
> relay_recipient_maps = mysql:$config_directory/mysql_relay_maps.cf
> smtp_host_lookup = native,dns
> smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
> transport_maps = mysql:$config_directory/mysql_transport_maps.cf
> unknown_address_reject_code = 450
> unknown_local_recipient_reject_code = 450
> virtual_alias_maps = mysql:$config_directory/mysql_virtual_alias_maps.cf
>
> this is mysql_relay_maps.cf
>
> user = username
> password = secret
> dbname = database
> hosts = maildb
> query = SELECT user_name FROM database WHERE user_name='%s'
>
>
> the mysql connection works (or else mail would not be delivered at all)
>
>
>
>

chose an address that does not exist in your relay recipient maps, let's 
say foo <at> example.com (of course, example.com must be a relay domain) and 
post the results of the following three commands.

# postmap -q example.com mysql:mysql_relay_domains_maps.cf
# postmap -q foo <at> example.com mysql:mysql_relay_maps.cf
# postmap -q foo <at> example.com mysql_virtual_alias_maps.cf

Also show transaction logs.


Gmane