PGNet Dev:
> my usual postfix front-end workflow is
> 
>       postscreen
>               if 'fail', reject
>               if 'pass', then
>                       internal smtp
>                       etc
> 
> i'd like to implement a 'maintenance/offline mode' -- WITH smtp response -- 
> effectively adding
> 
>       postscreen
>               if 'fail', reject
>               if 'pass', then
> +                     if 'maintenance mode' = ON, then
> +                             reply SMTP 4XX, msg = (user specified message, 
> e.g. down 4 maintenance, try again in X hours) 
> +                     else if 'maintenance mode' = OFF, then
>                               internal smtp
>                               etc
> 
> there are many paths to that particular mountain.
> 
> is there an already built-in maintenance-mode, or somesuch, in postfix?
> it'd be most convenient; if it's in docs, i've missed it.

Just let it pass to real smtpd, then reject there.

    smtpd_client_restrictions = 
        check_client_access static:{421 Service down for maintenance}
    # Use if you don't care what mail you aren't receiving.
    smtpd_relay_reject = no

With 421, Postfix will hang up.

        Wietse

Reply via email to