Well now I am even more confused.

So I was doing some further testing and was getting a 454 relay access
denied when trying to send mail through postfix to u...@mydomain.com. In my
postfix config mydomain was set to mydomain and mydestination was set to
$myhostname, localhost.$mydomain and localhost.

The default setting for relay_domains is mydestination and subdomains
thereof. So since mydestination contains $myhostname which is set to
hostname.$mydomain  mydomain should be in that list for relay_domains. But
I had to explicitly add mydomain to relay_domains. Once I did that it
honored the relay_recipient_maps.

I guess my understanding of the default value relay_domains takes is
incorrect.

Thanks


On Tue, Feb 12, 2013 at 9:41 PM, Matthew Ceroni <matthewcer...@gmail.com>wrote:

> I thought that was the issue, but when I try submitting via SMTP (using
> telnet as my test) it still doesn't work. I supply an invalid email and it
> still relays it to the relay server.
>
> When I run postmap -q to test (with debug turned on) it logs everything in
> /var/log/maillog. But I don't see that same debug output when testing
> through telnet to the SMTP port.
>
>
>
>
> On Tue, Feb 12, 2013 at 5:17 PM, Wietse Venema <wie...@porcupine.org>wrote:
>
>> Matthew Ceroni:
>> > I am trying to setup the relay_recipient_maps option.
>> >
>> > I created my LDAP file (/etc/postfix/ldap-relay_recipients.cf) and
>> tested
>> > it using postmap -q. When a valid user is supplied it returns 0 and when
>> > not it returns 1.
>>
>> As documented this is used in the SMTP daemon to reject mail for
>> non-existent recipients.
>>
>> > However when I send an email (testing using the local command tool
>> mail) it
>> > doesn't seem to matter and the message is sent to the relay anyways.
>>
>> Local submission does not arrive via the SMTP daemon. Also, I wonder
>> what you want, Postfix returning an error status when you use the
>> "mail" command? How should such mail be returned to sender if it
>> never makes it into the mail system in the first place?
>>
>>         Wietse
>>
>
>

Reply via email to