On 6/25/2012 11:59 PM, santosh malavade wrote:
> 
> 
> On Mon, Jun 25, 2012 at 10:17 PM, Noel Jones <njo...@megan.vbhcs.org
> <mailto: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 <http://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. 

The example is intended to hold incoming messages.  If you need to
also hold outgoing messages, you'll need something like:

HOLD_OK =
  check_client_access static:HOLD
  permit_auth_destination
  permit_sasl_authenticated
  permit_mynetworks



  -- Noel Jones

Reply via email to