I agree, you should only implement these sort of hooks on the header. But would you call the filter at the end of the header, or after each line?
Rob :-) > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Harald Schneider > Sent: Monday, February 02, 2004 11:16 PM > To: [EMAIL PROTECTED] > Subject: [xmail] AW: Re: SMTP Dialog Filter Hooks > > OK .. this is true for checking the data part. Under the aspect of = > decoding > mime mails, it isn't a trivial thing at all. > > But Hooks for the envelope lines and the start of data would be=20 > comparable easy to implement and very valuable for future script = > extensions. > > --Harald > > > > -----Urspr=FCngliche Nachricht----- > > Von: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] Im Auftrag von T. Mike Howeth > > Gesendet: Montag, 2. Februar 2004 07:39 > > An: [EMAIL PROTECTED] > > Betreff: [xmail] Re: SMTP Dialog Filter Hooks > >=20 > >=20 > > I add this functionality to xmail myself and it does not=20 > > inordinately =3D impair performance if 1) other changes are=20 > > made to xmail to improve its =3D intrinsic performance, 2) the=20 > > checks are aborted on messages that are long and 3) binary=20 > > messages are correctly identified and not handled by the=20 > > filter. However, it is not as simple as looking at each line=20 > > presented after the DATA command: to correctly interpret=20 > > input, the code must deal with =3D message decoding on the fly=20 > > (quoted-printable, base64 are trivial, but MIME must =3D be=20 > > dealt with too) and, at a minimum, support a scrolling-window=20 > > type of =3D buffer (DATA lines do not correspond to actual=20 > > message lines). Although I am =3D glad that I can reject=20 > > messages as they come in now, the amount of work =3D involved=20 > > was substantial and unless Davide is a complete masochist,=20 > > there are probably features that would be better uses of=20 > > development time. (And, naturally, about a month after I got=20 > > it basically-where-i-wanted-it, I =3D moved and no longer have=20 > > adequate connectivity to host my own MTA box. Ha.) > >=20 > > (and BTW, if you stop accepting a message during receipt,=20 > > you're telling =3D the other end exactly what they did that=20 > > tripped the wire. It's best to =3D accept the rest -=20 > > discarding it as you go - even after the decision is made to=20 > > reject the message). > >=20 > >=20 > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] =3D On > Behalf Of Harald = > Schneider > > Sent: Sunday, 1 February 2004 8:07 AM > > To: [EMAIL PROTECTED] > > Subject: [xmail] SMTP Dialog Filter Hooks > >=20 > >=20 > > Hi Davide, > >=20 > > is there a chance to see SMTP dialog filter hooks in the next=20 > > release? =3D This would make the filtering engine more flexible: > >=20 > > You could check the RCPT_TO and act before the message is=20 > > accepted. E.g. checking a forwarding target server, if the=20 > > user exists there, before accepting and forwarding the whole = > mail.=3D20 > >=20 > > Hooks after each SMTP command and after each data line would=20 > > be a nice=3D20 thing, e.g.: > >=20 > > HOOK_HELO > > HOOK_MAIL_FROM > > HOOK_RCPT_TO > > HOOK_DATALINE > >=20 > > So a script could also do anti spam and anti virus checking=20 > > on the fly,=3D20 aborting conversation without accepting the=20 > > whole message.=3D20 > >=20 > > What do you think? > >=20 > > All the best, > > Harald > >=20 > >=20 > >=20 > >=20 > > - > > To unsubscribe from this list: send the line "unsubscribe=20 > > xmail" in the =3D body of a message to [EMAIL PROTECTED] > > For general help: send the line "help" in the body of a=20 > > message to [EMAIL PROTECTED] > >=20 > >=20 > >=20 > >=20 > > - > > To unsubscribe from this list: send the line "unsubscribe=20 > > xmail" in the body of a message to [EMAIL PROTECTED] > > For general help: send the line "help" in the body of a=20 > > message to [EMAIL PROTECTED] > >=20 > > - > To unsubscribe from this list: send the line "unsubscribe xmail" in > the body of a message to [EMAIL PROTECTED] > For general help: send the line "help" in the body of a message to > [EMAIL PROTECTED] > - To unsubscribe from this list: send the line "unsubscribe xmail" in the body of a message to [EMAIL PROTECTED] For general help: send the line "help" in the body of a message to [EMAIL PROTECTED]