On Mon, 21 Sep 2020, Dan Mahoney (Gushi) wrote:
Figured it out.
Turns out with a virtual domain, you still need to point it somwhere, and
the reject map needs to match the RIGHT HAND SIDE of that map, not the
left.
In my case, I pointed it at webmaster@localhost, and updated the
recipient_map to have a left hand side of webmaster@localhost, and
then started getting the right message.
-Dan
I have these things in place already. This is also a virtual domain:
# Insert text from sample-virtual.cf if you need virtual domain support.
virtual_maps = hash:$config_directory/delivery_maps/final_delivery_foo,
where webmas...@foo.org webmas...@ops.foo.org
If I have an entry in the recipient map, the mail goes through to its final
destination and I do not get a bounce.. If I do not, I get this error:
----- The following addresses had permanent fatal errors -----
<webmas...@foo.org>
(reason: 550 5.1.1 <webmas...@foo.org>: Recipient address rejected: User
unknown in virtual alias table)
In neither case do I get the error specified in my whitelist_recipients map:
webmas...@foo.org REJECT Sorry this has been abused please
contact webmaster2...@foo.org
Here are the relevant bits of main.cf:
local_recipient_maps =
$relocated_maps,
$alias_maps,
unix:passwd.byname,
$virtual_maps
virtual_maps = hash:$config_directory/delivery_maps/final_delivery_foo,
hash:$config_directory/delivery_maps/mail2news,
regexp:$config_directory/delivery_maps/regex_aliases
smtpd_recipient_restrictions =
permit_mynetworks,
reject_unknown_sender_domain,
reject_unknown_recipient_domain,
reject_unauth_destination,
reject_invalid_hostname,
reject_non_fqdn_hostname,
check_client_access cidr:$config_directory/access/spammers,
check_client_access cidr:$config_directory/access/whitelist,
check_sender_access hash:$config_directory/access/sender_access,
check_recipient_access
hash:$config_directory/access/whitelist_recipients,
reject_rbl_client zen.spamhaus.org
4. reload postfix
Kouga
-Dan
--
--------Dan Mahoney--------
Techie, Sysadmin, WebGeek
Gushi on efnet/undernet IRC
FB: fb.com/DanielMahoneyIV
LI: linkedin.com/in/gushi
Site: http://www.gushi.org
---------------------------
--
"Hitler, Satan, those Hanson kids, anything. Just not the curious
anteater."
-Peter Scolari, as Wayne Szalinki in "Honey, I Shrunk The Kids--The
Series"
--------Dan Mahoney--------
Techie, Sysadmin, WebGeek
Gushi on efnet/undernet IRC
FB: fb.com/DanielMahoneyIV
LI: linkedin.com/in/gushi
Site: http://www.gushi.org
---------------------------