On 11/21/2014 2:25 PM, A. Schulze wrote: > Hi, > > a smtpd_recipient_restrictions for a submission service usually end > with explicit "reject". That result in a smtp response string > 554 5.7.1 <recipient>: Recipient address rejected: Access denied > > Sometimes it's helpful to have a more detailed error, > "please authenticate", "go away", "goto http://here.you.get/help", > or any other descriptive text. > > currently I do this with a separate file. > > ... > smtpd_recipient_restrictions = > check_foo_to_allow_something, > check_recipient_access pcre:$config_directory/nice_reject.pcre > # never reached > reject > > nice_reject.pcre: > /.*/ REJECT you did this or that wrong, call +49 ... for assistance > > It would be nice if I could specify this direct as argument to > reject in main.cf. > > <wish> > smtpd_recipient_restrictions = > check_foo_to_allow_something, > reject "you did this or that wrong, call +49 ... for assistance" > </wish> > > Is that possible? > At least the configuration would be much [easier|more precise]. > > > Andreas > >
We use the built-in feature for this: http://www.postfix.org/postconf.5.html#smtpd_reject_footer It's a really nice idea, but in practice few people ever use the contact or correction info provided in a reject message -- some end-user mail programs seem to go to great effort to hide potentially helpful info from the user, so a lot of people never see it. A couple times a year someone actually uses our online contact form, seldom enough that I'm always surprised. But it makes me feel better to know it's always there, waiting to help some poor soul. -- Noel Jones