Virtual Users not getting populated in verify_cache

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Virtual Users not getting populated in verify_cache

John Schmerold
One of everyone's favorite topics:

I added "virtual_alias_maps = hash:/etc/postfix/virtual" to main.cf

Then I added "[hidden email] [hidden email]" to /etc/postfix/virtual

/etc/postfix/main.cf includes:
relay_domains = hash:/etc/pmg/domains
transport_maps = hash:/etc/pmg/transport
smtpd_recipient_restrictions =
         permit_mynetworks
         reject_unauth_destination
         reject_non_fqdn_recipient
         check_recipient_access  regexp:/etc/postfix/rcptaccess
check_sender_access  regexp:/etc/postfix/senderaccess
check_client_access  cidr:/etc/postfix/clientaccess check_policy_service
inet:127.0.0.1:10022 reject_unknown_recipient_domain
reject_unverified_recipient

unverified_recipient_reject_code = 450

Domains & transport include:
/etc/pmg/domains:katy.net 1
/etc/pmg/transport:katy.net smtp:mail.katy.net:25

[hidden email] gets delivered, any attempts to deliver [hidden email]
nets a 450 error: SERVER -> CLIENT: 450 4.7.1 : Recipient address
rejected: Service is unavailable (try later)
SMTP ERROR: RCPT TO command failed: 450 4.7.1 : Recipient address
rejected: Service is unavailable (try later)

I suspect I need to add something to "check_recipient_access" in
main.cf, but I am not sure what syntax will get the job done.

--
John Schmerold
Katy Computer Systems, Inc
https://katycomputer.com
St Louis

Reply | Threaded
Open this post in threaded view
|

Re: Virtual Users not getting populated in verify_cache

John Schmerold

On 10/14/2019 11:41 AM, John Schmerold wrote:

> One of everyone's favorite topics:
>
> I added "virtual_alias_maps = hash:/etc/postfix/virtual" to main.cf
>
> Then I added "[hidden email] [hidden email]" to /etc/postfix/virtual
>
> /etc/postfix/main.cf includes:
> relay_domains = hash:/etc/pmg/domains
> transport_maps = hash:/etc/pmg/transport
> smtpd_recipient_restrictions =
>         permit_mynetworks
>         reject_unauth_destination
>         reject_non_fqdn_recipient
>         check_recipient_access  regexp:/etc/postfix/rcptaccess
> check_sender_access  regexp:/etc/postfix/senderaccess
> check_client_access  cidr:/etc/postfix/clientaccess
> check_policy_service inet:127.0.0.1:10022
> reject_unknown_recipient_domain reject_unverified_recipient
>
> unverified_recipient_reject_code = 450
>
> Domains & transport include:
> /etc/pmg/domains:katy.net 1
> /etc/pmg/transport:katy.net smtp:mail.katy.net:25
>
> [hidden email] gets delivered, any attempts to deliver [hidden email]
> nets a 450 error: SERVER -> CLIENT: 450 4.7.1 : Recipient address
> rejected: Service is unavailable (try later)
> SMTP ERROR: RCPT TO command failed: 450 4.7.1 : Recipient address
> rejected: Service is unavailable (try later)
>
> I suspect I need to add something to "check_recipient_access" in
> main.cf, but I am not sure what syntax will get the job done.
>
Looks like a found a solution in "Unix & Linux System Administration
Handbook":

main.cf needs two lines (I just had one - virtual_alias_maps):
virtual_alias_domains = $virtual_alias_maps
virtual_alias_maps = hash:/etc/postfix/virtual

John Schmerold
Katy Computer Systems, Inc
https://katycomputer.com
St Louis

Reply | Threaded
Open this post in threaded view
|

Re: Virtual Users not getting populated in verify_cache

John Schmerold

On 10/14/2019 1:30 PM, John Schmerold wrote:

>
> On 10/14/2019 11:41 AM, John Schmerold wrote:
>> One of everyone's favorite topics:
>>
>> I added "virtual_alias_maps = hash:/etc/postfix/virtual" to main.cf
>>
>> Then I added "[hidden email] [hidden email]" to /etc/postfix/virtual
>>
>> /etc/postfix/main.cf includes:
>> relay_domains = hash:/etc/pmg/domains
>> transport_maps = hash:/etc/pmg/transport
>> smtpd_recipient_restrictions =
>>         permit_mynetworks
>>         reject_unauth_destination
>>         reject_non_fqdn_recipient
>>         check_recipient_access  regexp:/etc/postfix/rcptaccess
>> check_sender_access  regexp:/etc/postfix/senderaccess
>> check_client_access  cidr:/etc/postfix/clientaccess
>> check_policy_service inet:127.0.0.1:10022
>> reject_unknown_recipient_domain reject_unverified_recipient
>>
>> unverified_recipient_reject_code = 450
>>
>> Domains & transport include:
>> /etc/pmg/domains:katy.net 1
>> /etc/pmg/transport:katy.net smtp:mail.katy.net:25
>>
>> [hidden email] gets delivered, any attempts to deliver [hidden email]
>> nets a 450 error: SERVER -> CLIENT: 450 4.7.1 : Recipient address
>> rejected: Service is unavailable (try later)
>> SMTP ERROR: RCPT TO command failed: 450 4.7.1 : Recipient address
>> rejected: Service is unavailable (try later)
>>
>> I suspect I need to add something to "check_recipient_access" in
>> main.cf, but I am not sure what syntax will get the job done.
>>
> Looks like a found a solution in "Unix & Linux System Administration
> Handbook":
>
> main.cf needs two lines (I just had one - virtual_alias_maps):
> virtual_alias_domains = $virtual_alias_maps
> virtual_alias_maps = hash:/etc/postfix/virtual
>
> John Schmerold
> Katy Computer Systems, Inc
> https://katycomputer.com
> St Louis
>

Not so fast... I started reading Mr Hildebrandt's 2005 book (page 192 -
Catchall Entries), and thought I would try expanding
/etc/postfix/virtual to include:
@katy.net       [hidden email]

Postfix doesn't like [hidden email] - he kicks off a 450 error.

So, I guess I am back to where I started. How do I get Postfix to accept
recipients as defined by virtual_alias_maps ?

John Schmerold
Katy Computer Systems, Inc
https://katycomputer.com
St Louis

Reply | Threaded
Open this post in threaded view
|

Re: Virtual Users not getting populated in verify_cache

Wietse Venema
In reply to this post by John Schmerold
John Schmerold:
> One of everyone's favorite topics:
>
> I added "virtual_alias_maps = hash:/etc/postfix/virtual" to main.cf
>
> Then I added "[hidden email] [hidden email]" to /etc/postfix/virtual

You also need to execute:

# postmap hash:/etc/postfix/virtual
# postfix reload

after every map update.

        Wietse