bouncing, queueing and exit codes (was: Re: cabot-20040212.tar.gz ? ...)

Joost van Baal joostvb@mdcc.cx
Fri, 13 Feb 2004 21:28:07 +0100


--t4h8pR5TgOYIPOP9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Feb 13, 2004 at 12:02:59PM +0100, Peter Palfrader wrote:
> On Fri, 13 Feb 2004, Laurent Fousse wrote:
>=20
> > > BTW: what happens when there's a syntax error in ca-recv?  Or when
> > > ca-recv exits non-zero?  Is the mail queued or bounced?  I'm afraid t=
his
> > > is very MTA specific.  You might want to think about what would be be=
st,
> > > and on how to achieve this.
> >=20
> > If there is a syntax error in ca-recv, then ca-recv itself can
> > probably not do anything about it. As for the non zero exit status,
> > maybe we could add a function to dump the mail somewhere on a
> > temporary file before ca-recv exits. It should not exit with an error
> > anyway.

It _does_ exit with an error if e.g. ~/.cabotrc doesn't exist:

 die "No file $config present.  See ca-config(5).\n"

=2E  This is good.  However, it might be better to have the MTA _queue_
the received message in such circumstances, than to bounce it.

One completely NOT the only true mailer but an ugly evil non-free one
(well documented though) has in its qmail-command(8) manpage:

 EXIT CODES

       command's  exit  codes  are  interpreted  as  follows: 0 means
 that the delivery was successful; 99 means that the delivery was
 successful, but that  qmail-local  should ignore all further delivery
 instructions; 100 means that the delivery failed permanently (hard
 error); 111 means that the  delivery  failed but should be tried again
 in a little while (soft error).

       Currently 64, 65, 70, 76, 77, 78, and 112 are considered  hard
 errors, and  all  other  codes  are  considered soft errors, but command
 should avoid relying on this.

I believe there is at least one exit code EX_TEMPFAIL(?) which is
understood by all popular MTA's.  In case something goes wrong in
ca-recv, it should exit with EX_TEMPFAIL.  This would make it safe to
call ca-recv in a .forward pipe.

> We can always change the documented practive to include a Maildir spool
> and have ca-recv run out of hourly cron.  It doesn't yet read maildirs
> but that would be quite trivial.

That would be another solution.  Likely is better portable among MTA's.
It would be more work too :)

Bye,

Joost



--t4h8pR5TgOYIPOP9
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFALTNXBgac8paUV/ARAo38AJ4pztJloER3gFYcieC7/zWuODl3kgCghhfe
ZDRzOM3YpKQkrEnB/Pb4WgM=
=FJgg
-----END PGP SIGNATURE-----

--t4h8pR5TgOYIPOP9--