From: Mickael CANEVET on
Hi,

I'd like postfix to treat EX_CANTCREAT (73) as "temporary failure".

I use this command to deliver my mails:

mailbox_command = /usr/bin/formail -D 8192 ~/.msgid.cache
-s /usr/libexec/dovecot/deliver

The problem is that if the filesystem containing home directories is not
mounted, formail returns an EX_CANTCREAT error, which is a permanent
exception for postfix (by default).

Is it possible to tell postfix to not reject permanently this kind of
error ?

Thanks a lot.

Mickaël.
From: Victor Duchovni on
On Thu, Jan 21, 2010 at 02:57:17PM +0100, Mickael CANEVET wrote:

> Hi,
>
> I'd like postfix to treat EX_CANTCREAT (73) as "temporary failure".
>
> I use this command to deliver my mails:
>
> mailbox_command = /usr/bin/formail -D 8192 ~/.msgid.cache
> -s /usr/libexec/dovecot/deliver
>
> The problem is that if the filesystem containing home directories is not
> mounted, formail returns an EX_CANTCREAT error, which is a permanent
> exception for postfix (by default).
>
> Is it possible to tell postfix to not reject permanently this kind of
> error ?

Wrap this command in a script that tests for this return code, and
returns EX_TEMPFAIL.

Why would the file system not be mounted, and why would this condition
be temporary? Why is Postfix running when the system is not fully
functional? Is this a good system design?

--
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomo(a)postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

From: Wietse Venema on
Victor Duchovni:
> On Thu, Jan 21, 2010 at 02:57:17PM +0100, Mickael CANEVET wrote:
>
> > Hi,
> >
> > I'd like postfix to treat EX_CANTCREAT (73) as "temporary failure".
> >
> > I use this command to deliver my mails:
> >
> > mailbox_command = /usr/bin/formail -D 8192 ~/.msgid.cache
> > -s /usr/libexec/dovecot/deliver
> >
> > The problem is that if the filesystem containing home directories is not
> > mounted, formail returns an EX_CANTCREAT error, which is a permanent
> > exception for postfix (by default).
> >
> > Is it possible to tell postfix to not reject permanently this kind of
> > error ?

/etc/postfix/main.cf:
require_home_directory = yes

Wietse

From: Mickael CANEVET on
Thanks a lot for your answer.

The filesystem could be unavailable because it is located on NAS. I
don't want my mails to be bounced if the NAS falls.

On Thu, 2010-01-21 at 12:58 -0500, Victor Duchovni wrote:
> On Thu, Jan 21, 2010 at 02:57:17PM +0100, Mickael CANEVET wrote:
>
> > Hi,
> >
> > I'd like postfix to treat EX_CANTCREAT (73) as "temporary failure".
> >
> > I use this command to deliver my mails:
> >
> > mailbox_command = /usr/bin/formail -D 8192 ~/.msgid.cache
> > -s /usr/libexec/dovecot/deliver
> >
> > The problem is that if the filesystem containing home directories is not
> > mounted, formail returns an EX_CANTCREAT error, which is a permanent
> > exception for postfix (by default).
> >
> > Is it possible to tell postfix to not reject permanently this kind of
> > error ?
>
> Wrap this command in a script that tests for this return code, and
> returns EX_TEMPFAIL.
>
> Why would the file system not be mounted, and why would this condition
> be temporary? Why is Postfix running when the system is not fully
> functional? Is this a good system design?
>

From: Mickael CANEVET on
It works like a charm.

Thanks a lot.

On Thu, 2010-01-21 at 13:36 -0500, Wietse Venema wrote:
> Victor Duchovni:
> > On Thu, Jan 21, 2010 at 02:57:17PM +0100, Mickael CANEVET wrote:
> >
> > > Hi,
> > >
> > > I'd like postfix to treat EX_CANTCREAT (73) as "temporary failure".
> > >
> > > I use this command to deliver my mails:
> > >
> > > mailbox_command = /usr/bin/formail -D 8192 ~/.msgid.cache
> > > -s /usr/libexec/dovecot/deliver
> > >
> > > The problem is that if the filesystem containing home directories is not
> > > mounted, formail returns an EX_CANTCREAT error, which is a permanent
> > > exception for postfix (by default).
> > >
> > > Is it possible to tell postfix to not reject permanently this kind of
> > > error ?
>
> /etc/postfix/main.cf:
> require_home_directory = yes
>
> Wietse
>