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

home-grown transport agent problems



Hi there,

Due to the development of new propiretary mail system my company decided to
adopt ZMailer to suit our needs. This required the development of new
Transport Agent (TA), tailored to our own mail storage schema.

The TA is performing well, delivers mails as required, but I've encountered
the problem I cannot solve: once the mailbox quota is reached, I'd like to
return the letter (or at least -> the information) about unsuccesfull
delivery to the sender. I tried the following code in my TA:


void deliver(...){

  ....

 if (result==5){
    i = EX_UNAVALIABLE;
   diagnostic(startrp,i,0,"size of mailbox exceeds quota for the user");
         notaryreport(startrp->addr->user, "failed",
                 "4.2.2 (Destination mailbox full)",
                 "OnetTA; 500 (Attempting to deliver to full mailbox)");
    return;
  }
}

That's it - I am calling diagnostic() and notaryreport() - as seen in
mailbox.c from zmailer sources, which I tried to follow. When invoking the
TA from command line, it seems to work OK:

ps1:/var/spool/postoffice/transport# /root/bin/onetTA -l
/var/log/mail/onetta
#hungry
P/P/654097-21917
654097/196              ok3 Message delivered succesfully
#hungry
P/Q/654098-21916
654098/196              error2 size of mailbox exceeds quota for the user
#hungry

Unfortunately, the information letter for the second case is NOT sent back
to the sender! I have found out (in sheduler.perflog) the following line:
1012236984 654097-21916 7 8 error onetta/myslot_specification

(we have different storage "slots", TA delivers mails to one of them).
No other line was printed afterwards to any log in /var/log/mail/*

So apparently the scheduler gets informed about the fact, that there was
delivery error, and simply... discards the letter. I checeked in
/var/spool/postoffice directories - the letter is simply removed.

So the question is: what is it, that I am doing wrong? Should I exit() my
TA, returning EX_UNAVALIABLE after each unsccessfull delivery? Or rather,
the TA is ok, it is just zmailer which is misconfigured?

Please - help. I am getting desperate ;-))

Cheers,
Marek.

-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi