Returning an Error Response

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Returning an Error Response

Doug Hardie
When using virtual domains, is there a way to return a temp fail message for a specific user in a domain?  I am not finding anything about that in the documentation.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Returning an Error Response

Noel Jones-2
On 7/6/2017 1:45 PM, Doug Hardie wrote:
> When using virtual domains, is there a way to return a temp fail message for a specific user in a domain?  I am not finding anything about that in the documentation.
>

You can use a check_{sender, recipient}_access map (whichever is
appropriate, or both) and return DEFER for that user.  There isn't a
way to defer in the virtual map itself.



  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Returning an Error Response

/dev/rob0
In reply to this post by Doug Hardie
On Thu, Jul 06, 2017 at 11:45:01AM -0700, Doug Hardie wrote:
> When using virtual domains,

(That part is not relevant.)

> is there a way to return a temp fail message for a specific
> user in a domain?  I am not finding anything about that in the
> documentation.

http://www.postfix.org/SMTPD_ACCESS_README.html
http://www.postfix.org/access.5.html
http://www.postfix.org/postconf.5.html#check_recipient_access

main.cf :

...
smtpd_recipient_restrictions = ...
    check_recipient_access hash:/path/to/rcpt-tempfail
    ...
...

/path/to/rcpt-tempfail :

[hidden email] 450 4.2.1 This mailbox is unavailable

Don't forget: "postmap /path/to/rcpt-tempfail"
--
  http://rob0.nodns4.us/
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Returning an Error Response

Doug Hardie
Thanks for the pointers on that.  I spent a couple days digging around and never found it.


On 6 July 2017, at 12:06, /dev/rob0 <[hidden email]> wrote:

>
>
> On Thu, Jul 06, 2017 at 11:45:01AM -0700, Doug Hardie wrote:
>> When using virtual domains,
>
> (That part is not relevant.)
>
>> is there a way to return a temp fail message for a specific
>> user in a domain?  I am not finding anything about that in the
>> documentation.
>
> http://www.postfix.org/SMTPD_ACCESS_README.html
> http://www.postfix.org/access.5.html
> http://www.postfix.org/postconf.5.html#check_recipient_access
>
> main.cf :
>
> ...
> smtpd_recipient_restrictions = ...
>    check_recipient_access hash:/path/to/rcpt-tempfail
>    ...
> ...
>
> /path/to/rcpt-tempfail :
>
> [hidden email] 450 4.2.1 This mailbox is unavailable
>
> Don't forget: "postmap /path/to/rcpt-tempfail"
> --
>  http://rob0.nodns4.us/
>  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Returning an Error Response

Wietse Venema
Doug Hardie:
> Thanks for the pointers on that.  I spent a couple days digging
> around and never found it.

Alternative:

/etc/postfix/main.cf:
    transport_maps = hash:/etc/postfix/transport

/etc/postfix/transport:
    [hidden email] retry:This mailbox is temporarily unavailable
    [hidden email] error:This mailbox is permanently unavailable

(see 'man 5 transport' and 'man 8 error' for background).

Don't forget to 'postmap hash:/etc/postfix/transport'

        Wietse
Loading...