[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Matti Aarnio wrote:
> On Tue, Sep 26, 2000 at 04:27:52PM +0200, Martin Wendel wrote:
> > I've seen that rfc2033 has been included for quite a while in the
> > doc directory, however there is no implementation of LMTP. Does
> > anyone have a good suggestion of a LMTP transport agent to use
> > with zmailer?
>         'smtp' ?
>         It will need some changes, of course, but I have not
>         had any reason for implementing it.
>         I recall the main difference from normal SMTP is that
>         at the end of DATA (and BDAT ?) one shall collect
>         reports for all (successfully accepted) recipients.

OK, I've modified smtp.c to collect the reports in smtpwrite()
if (dotmode == 1). It works well if all recipients are successfully
accepted but fails to respond to error reports in dotmode. Errors
handled as below are silently ignored, the message is treated as
delivered OK.

/* Looped through syncrp for every lmtp response (when dotmode) */
if (rc != EX_OK)
	if (rc == EX_TEMPFAIL)
		SS->rcptstates |= RCPTSTATE_400;
		sprintf(SS->remotemsg, "lmtp; 400 (temporary error on recipient %s)",
		SS->rcptstates |= RCPTSTATE_500;
		sprintf(SS->remotemsg, "lmtp; 500 (permanent error on recipient %s)",
	notaryreport(syncrp->addr->user, FAILED, NULL, NULL);
	diagnostic(syncrp, rc, 0, "%s", SS->remotemsg);

When smtpwrite is called when dotmode is set it always returns EX_OK if
any of the lmtp responses are OK, else the message would be delivered
times to some users. 

To be honest I don't quite understand the way notaryreport() and
communicates with the scheduler, so this code is just stolen from
elsewhere in
smtp.c. Aparently this is not the correct way to do it. Do you have any
on how to report these errors to the scheduler?


E-Mail: Martin.Wendel@ITS.UU.SE        Snail-Mail:  ITS
Tel:    018 471 77 80                               Box 887
Int:    +46 18 471 77 80                            S-751 08 Uppsala
Fax:    +46 18 471 77 25                            Sweden