Postfix recognizes EX_CANTCREAT as a permanent failure, but unfortunately there's no standard for an over-quota exit code. EX_CANTCREAT is used by a few packages, but not all.
http://www.irbs.net/internet/postfix/0205/2228.html Looking at the Postfix source, EX_CANTCREAT yields 5.2.0 (as seen in the trace below). There's nothing that yields 5.2.2. >From postfix-2.3.6/src/global/sys_exits.c: /* Global library. */ #include <sys_exits.h> /* Application-specific. */ static SYS_EXITS_DETAIL sys_exits_table[] = { EX_USAGE, "5.3.0", "command line usage error", EX_DATAERR, "5.6.0", "data format error", EX_NOINPUT, "5.3.0", "cannot open input", EX_NOUSER, "5.1.1", "user unknown", EX_NOHOST, "5.1.2", "host name unknown", EX_UNAVAILABLE, "5.3.0", "service unavailable", EX_SOFTWARE, "5.3.0", "internal software error", EX_OSERR, "4.3.0", "system resource problem", EX_OSFILE, "5.3.0", "critical OS file missing", EX_CANTCREAT, "5.2.0", "can't create user output file", EX_IOERR, "5.3.0", "input/output error", EX_TEMPFAIL, "4.3.0", "temporary failure", EX_PROTOCOL, "5.5.0", "remote error in protocol", EX_NOPERM, "5.7.0", "permission denied", EX_CONFIG, "5.3.5", "local configuration error", }; On Wed, 2007-07-11 at 11:15 +0800, asianux-dbmail integration team wrote: > Oops, spoke too soon. > > Works for dbmail-lmtpd. > > Almost works for dbmail-smtp > > Jul 11 10:56:04 ip37 dbmail/smtp[21501]: Message:[smtp] main.c,main(+388): > exit code [73] from DSN [522 Permanent Failure Mailbox Status Mailbox full] > Jul 11 10:56:04 ip37 dbmail/smtp[21501]: Debug:[dsn] > dsn.c,dsnuser_free(+230): dsnuser freed > Jul 11 10:56:04 ip37 dbmail/smtp[21501]: Debug:[smtp] main.c,main(+402): > program memory free > Jul 11 10:56:04 ip37 dbmail/smtp[21501]: Debug:[smtp] main.c,main(+410): > library memory free > Jul 11 10:56:04 ip37 postfix/pipe[21500]: AB8F110791: to=<[EMAIL PROTECTED]>, > relay=dbmail-smtp, delay=0.14, delays=0.07/0.01/0/0.06, dsn=5.2.0, > status=bounced (can't create user output file) > > --Keith > > > Keith Hopkins wrote: > > Hi Aaron, > > > > Your latest fix works-for-me. :) > > > > Thanks, > > --Keith > > > > > > [EMAIL PROTECTED] wrote: > >> The following issue has been RESOLVED. > >> ====================================================================== > >> http://dbmail.org/mantis/view.php?id=617 > >> ====================================================================== > >> Reported By: asianux-keith > >> Assigned To: aaron > >> ====================================================================== > >> Project: DBMail > >> Issue ID: 617 > >> Category: general delivery > >> Reproducibility: always > >> Severity: minor > >> Priority: normal > >> Status: resolved > >> target: > >> Resolution: fixed > >> Fixed in Version: 2.2.6 > >> ====================================================================== > >> Date Submitted: 28-Jun-07 04:47 CEST > >> Last Modified: 09-Jul-07 01:29 CEST > >> ====================================================================== > >> Summary: bad dsn returned for mailbox over quota > >> Description: > >> When postfix get over quota message from dbmail, it returns an 'unknown > >> user' message in the bounce. > >> > >> This similar in symptoms to bug 164. > >> > >> dbmail/smtp[17663]: Info:[dsn] dsn.c,dsn_tostring(+168): Invalid dsn code > >> received [6][0][0] > >> > >> 6.x.x doesn't seem valid > >> RFC 1893 suggests X.2.2 > >> (so, maybe it should be 4.2.2?) > >> > >> ====================================================================== > >> > >> ---------------------------------------------------------------------- > >> aaron - 29-Jun-07 08:49 > >> ---------------------------------------------------------------------- > >> Fixed in SVN. > >> > >> ---------------------------------------------------------------------- > >> asianux-keith - 03-Jul-07 11:00 > >> ---------------------------------------------------------------------- > >> Hi Aaron, > >> > >> The dsn returned by dsn.c is changed, but postfix is still getting 5.1.1 > >> from pipe.c. I think the change you made dsn.c (quota is now CLASS_FAIL) > >> is not effective due to the following in pipe.c. > >> > >> final_dsn = dsnuser_worstcase_int(has_2, has_4, has_5, > >> has_5_2); > >> switch (final_dsn.class) { > >> case DSN_CLASS_OK: > >> /* Success. Address related. Valid. */ > >> set_dsn(&delivery->dsn, DSN_CLASS_OK, 1, 5); > >> break; > >> case DSN_CLASS_TEMP: > >> /* sort_and_deliver returns TEMP is useridnr is 0, > >> aka, > >> * if nothing was delivered at all, or for any > >> other failures. */ > >> > >> /* If there's a problem with the delivery address, > >> but > >> * there are proper forwarding addresses, we're > >> OK. */ > >> if (dm_list_length(delivery->forwards) > 0) { > >> /* Success. Address related. Valid. */ > >> set_dsn(&delivery->dsn, DSN_CLASS_OK, 1, > >> 5); > >> break; > >> } > >> /* Fall through to FAIL. */ > >> case DSN_CLASS_FAIL: > >> /* Permanent failure. Address related. Does not > >> exist. */ > >> set_dsn(&delivery->dsn, DSN_CLASS_FAIL, 1, 1); > >> break; > >> case DSN_CLASS_QUOTA: > >> /* Permanent failure. Mailbox related. Over quota > >> limit. */ > >> set_dsn(&delivery->dsn, DSN_CLASS_FAIL, 2, 2); > >> break; > >> > >> ---------------------------------------------------------------------- > >> aaron - 09-Jul-07 01:29 > >> ---------------------------------------------------------------------- > >> Should actually fixed in SVN now :-) > >> > >> Issue History > >> Date Modified Username Field Change > >> > >> ====================================================================== > >> 28-Jun-07 04:47 asianux-keith New Issue > >> > >> 29-Jun-07 08:49 aaron Status new => resolved > >> > >> 29-Jun-07 08:49 aaron Fixed in Version => 2.2.6 > >> > >> 29-Jun-07 08:49 aaron Resolution open => fixed > >> > >> 29-Jun-07 08:49 aaron Assigned To => aaron > >> > >> 29-Jun-07 08:49 aaron Note Added: 0002265 > >> > >> 03-Jul-07 11:00 asianux-keith Status resolved => > >> feedback > >> 03-Jul-07 11:00 asianux-keith Resolution fixed => reopened > >> > >> 03-Jul-07 11:00 asianux-keith Note Added: 0002273 > >> > >> 09-Jul-07 01:29 aaron Status feedback => > >> resolved > >> 09-Jul-07 01:29 aaron Resolution reopened => fixed > >> > >> 09-Jul-07 01:29 aaron Note Added: 0002285 > >> > >> ====================================================================== > >> > >> _______________________________________________ > >> Dbmail-dev mailing list > >> [email protected] > >> http://twister.fastxs.net/mailman/listinfo/dbmail-dev > >> > >> > >> > > > > > > _______________________________________________ > > Dbmail-dev mailing list > > [email protected] > > http://twister.fastxs.net/mailman/listinfo/dbmail-dev > > > > > > _______________________________________________ > Dbmail-dev mailing list > [email protected] > http://twister.fastxs.net/mailman/listinfo/dbmail-dev _______________________________________________ Dbmail-dev mailing list [email protected] http://twister.fastxs.net/mailman/listinfo/dbmail-dev
