On Mon, Jun 25, 2012 at 10:17 PM, Noel Jones <njo...@megan.vbhcs.org> wrote:
> On 6/25/2012 2:03 AM, santosh malavade wrote: > > Hi, > > > > I am trying to hold messages based on the client and sender address, > > but its not getting in hold queue and getting rejected : > > > ... > > > > I have tried to search it on the google, and got one url > > http://comments.gmane.org/gmane.mail.postfix.user/225900 where Noel > > Jones replied giving the following response : > > > > HOLD is not absolute and will be overridden by a later REJECT or > > DISCARD action. > > Yes, still true. > I am afraid, I did not find it in the documentation pertaining to http://www.postfix.org/access.5.html. > > > > I did not understand the said response. > > > > HOLD does not imply "OK". You can create smtpd_restriction_classes > that will do both: > > # main.cf > smtpd_restriction_classes = > HOLD_OK > > HOLD_OK = > reject_unauth_destination > check_client_access static:HOLD > permit > > Then use HOLD_OK as the result in your table lookup > > > > -- Noel Jones > Yes, I tried it, it works, it holds the message, if the mail is sent to the relay domains, If I send email to gmail users, it rejects the message. As per my understanding, the said restriction class HOLD_OK, will reject the messages if the recipient domain does not match to the relay domains. If it matches the relay domains, it will pass on to the next restriction, i.e. client access restriction and since we are using static:HOLD, the lookup results will always be HOLD. As 'HOLD' does not imply OK, it will check the next restriction, which is permit. If I omit permit, by default it may use reject or discard. Regards, Santosh Malavade