Sender vs recipient restrictions.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Sender vs recipient restrictions.

Chas-6
I've been reading today about;

reject_unknown_sender_domain

and I'm wondering if it is only allowed under 'smtpd_sender_restrictions'
whereas I've had it under 'smtpd_recipient_restrictions'. Is this correct?

thanks,
Chas.
Reply | Threaded
Open this post in threaded view
|

Re: Sender vs recipient restrictions.

Costin Gusa-2
On Wed, Mar 18, 2009 at 3:11 PM,  <[hidden email]> wrote:

> I've been reading today about;
>
> reject_unknown_sender_domain
>
> and I'm wondering if it is only allowed under 'smtpd_sender_restrictions'
> whereas I've had it under 'smtpd_recipient_restrictions'. Is this correct?
>
> thanks,
> Chas.
>

all smtpd_recipient_restrictions can appear in smtpd_sender_restrictions.

from man 5 postconf:

smtpd_sender_restrictions (default: empty)
       Optional  restrictions that the Postfix SMTP server applies in the con-
       text of the MAIL FROM command.

[list of restrictions]

       Other restrictions that are valid in this context
[...]
       ·      SMTP command specific restrictions described under smtpd_recipi-
              ent_restrictions.  When  recipient restrictions are listed under
              smtpd_sender_restrictions,   they   have   effect   only    with
              "smtpd_delay_reject  =  yes", so that $smtpd_sender_restrictions
              is evaluated at the time of the RCPT TO command.
Reply | Threaded
Open this post in threaded view
|

Re: Sender vs recipient restrictions.

Paweł Leśniak
W dniu 2009-03-18 14:23, Costin Guşă pisze:
On Wed, Mar 18, 2009 at 3:11 PM,  [hidden email] wrote:
  
I've been reading today about;

reject_unknown_sender_domain

and I'm wondering if it is only allowed under 'smtpd_sender_restrictions'
whereas I've had it under 'smtpd_recipient_restrictions'. Is this correct?

thanks,
Chas.
    

all smtpd_recipient_restrictions can appear in smtpd_sender_restrictions.
  
Wrong. As SMTP session has MAIL FROM before RCPT TO, you can have sender_restrictions in smtpd_recipient_restrictions, but not vice versa (of course you can, but it'd be useless) - recipient is not known during smtp_sender_restrictions part.

from man 5 postconf:

smtpd_sender_restrictions (default: empty)
       Optional  restrictions that the Postfix SMTP server applies in the con-
       text of the MAIL FROM command.
  
Clearly stated right where you pointed.

Pawel Lesniak


Reply | Threaded
Open this post in threaded view
|

Re: Sender vs recipient restrictions.

Chas-6
> W dniu 2009-03-18 14:23, Costin Guşă pisze:
>> On Wed, Mar 18, 2009 at 3:11 PM,<[hidden email]>  wrote:
>>
>>> I've been reading today about;
>>>
>>> reject_unknown_sender_domain
>>>
>>> and I'm wondering if it is only allowed under
>>> 'smtpd_sender_restrictions'
>>> whereas I've had it under 'smtpd_recipient_restrictions'. Is this
>>> correct?
>>>
>>> thanks,
>>> Chas.
>>>
>>
>> all smtpd_recipient_restrictions can appear in
>> smtpd_sender_restrictions.
>>
> Wrong. As SMTP session has MAIL FROM before RCPT TO, you can have
> sender_restrictions in smtpd_recipient_restrictions, but not vice versa
> (of course you can, but it'd be useless) - recipient is not known during
> smtp_sender_restrictions part.
>
>> from man 5 postconf:
>>
>> smtpd_sender_restrictions (default: empty)
>>         Optional  restrictions that the Postfix SMTP server applies in
>> the con-
>>         text of the MAIL FROM command.
>>
> Clearly stated right where you pointed.
>
> Pawel Lesniak
>
>
>

Thanks for responding.
Am I to understand, then, that the proper place for
'reject_unknown_sender_domain' is in sender restrictions?

Chas.
Reply | Threaded
Open this post in threaded view
|

Re: Sender vs recipient restrictions.

Noel Jones-2
In reply to this post by Paweł Leśniak
Paweł Leśniak wrote:

> W dniu 2009-03-18 14:23, Costin Guşă pisze:
>> On Wed, Mar 18, 2009 at 3:11 PM,  <[hidden email]> wrote:
>>  
>>> I've been reading today about;
>>>
>>> reject_unknown_sender_domain
>>>
>>> and I'm wondering if it is only allowed under 'smtpd_sender_restrictions'
>>> whereas I've had it under 'smtpd_recipient_restrictions'. Is this correct?
>>>
>>> thanks,
>>> Chas.
>>>    
>>
>> all smtpd_recipient_restrictions can appear in smtpd_sender_restrictions.
>>  
> Wrong. As SMTP session has MAIL FROM before RCPT TO, you can have
> sender_restrictions in smtpd_recipient_restrictions, but not vice versa
> (of course you can, but it'd be useless) - recipient is not known during
> smtp_sender_restrictions part.
>
>> from man 5 postconf:
>>
>> smtpd_sender_restrictions (default: empty)
>>        Optional  restrictions that the Postfix SMTP server applies in the con-
>>        text of the MAIL FROM command.
>>  
> Clearly stated right where you pointed.
>
> Pawel Lesniak

You forgot to scroll down a little further to the "Other
restrictions valid in this context".

   -- Noel Jones

Reply | Threaded
Open this post in threaded view
|

Re: Sender vs recipient restrictions.

Noel Jones-2
In reply to this post by Chas-6
[hidden email] wrote:

>> W dniu 2009-03-18 14:23, Costin Guşă pisze:
>>> On Wed, Mar 18, 2009 at 3:11 PM,<[hidden email]>  wrote:
>>>
>>>> I've been reading today about;
>>>>
>>>> reject_unknown_sender_domain
>>>>
>>>> and I'm wondering if it is only allowed under
>>>> 'smtpd_sender_restrictions'
>>>> whereas I've had it under 'smtpd_recipient_restrictions'. Is this
>>>> correct?
>>>>
>>>> thanks,
>>>> Chas.
>>>>
>>> all smtpd_recipient_restrictions can appear in
>>> smtpd_sender_restrictions.
>>>
>> Wrong. As SMTP session has MAIL FROM before RCPT TO, you can have
>> sender_restrictions in smtpd_recipient_restrictions, but not vice versa
>> (of course you can, but it'd be useless) - recipient is not known during
>> smtp_sender_restrictions part.
>>
>>> from man 5 postconf:
>>>
>>> smtpd_sender_restrictions (default: empty)
>>>         Optional  restrictions that the Postfix SMTP server applies in
>>> the con-
>>>         text of the MAIL FROM command.
>>>
>> Clearly stated right where you pointed.
>>
>> Pawel Lesniak
>>
>>
>>
>
> Thanks for responding.
> Am I to understand, then, that the proper place for
> 'reject_unknown_sender_domain' is in sender restrictions?
>
> Chas.

The proper place is in context of what you are trying to
accomplish.
Ignore the false advice that it must be in
smtpd_sender_restrictions.

The statement above:
 >>> all smtpd_recipient_restrictions can appear in
 >>> smtpd_sender_restrictions.
is correct, assuming the default setting of
"smtpd_delay_reject = yes"

http://www.postfix.org/postconf.5.html#smtpd_recipient_restrictions
Scroll down to the "Other restrictions that are valid in this
context" section.

   -- Noel Jones

Reply | Threaded
Open this post in threaded view
|

Re: Sender vs recipient restrictions.

mouss-4
In reply to this post by Paweł Leśniak
Paweł Leśniak a écrit :

> W dniu 2009-03-18 14:23, Costin Guşă pisze:
>> On Wed, Mar 18, 2009 at 3:11 PM,  <[hidden email]> wrote:
>>  
>>> I've been reading today about;
>>>
>>> reject_unknown_sender_domain
>>>
>>> and I'm wondering if it is only allowed under 'smtpd_sender_restrictions'
>>> whereas I've had it under 'smtpd_recipient_restrictions'. Is this correct?
>>>
>>> thanks,
>>> Chas.
>>>    
>>
>> all smtpd_recipient_restrictions can appear in smtpd_sender_restrictions.
>>  
> Wrong. As SMTP session has MAIL FROM before RCPT TO, you can have
> sender_restrictions in smtpd_recipient_restrictions, but not vice versa
> (of course you can, but it'd be useless) - recipient is not known during
> smtp_sender_restrictions part.
>


by default, smtpd_[client|helo|sender|recipient]_restrictions are
executed at RCPT TO time. so it's ok to have a check_recipient_access in
smtpd_client_restrictions and so on.