Gabriel Araujo <[email protected]> ha escrit:

>    Let me say I have been using Anubis for a while and its an excellent
>    piece of software - congrats!

Thanks.  Wojciech and I are very pleased to hear that :)

>    To be able to use  esmtp-* keywords into rule section would be great -
>    not sure how hard it is to implement.

Technically speaking, Anubis sends each SMTP command to the remote server
immediately after receiving it from the client, so if esmtp-auth
is requested in your config file, then authorization takes place immediately
after receiving the EHLO reply from the remote server.  If this decision
should depend on the value of a particular message header (this is
basically what you need), then Anubis would have to suspend all
SMTP dialogue with the remote server until at least the requested header
(or end of header marker) has been received from the client as a part of DATA
block, and then "replay" it back.  This constitutes a rather considerable
rewrite of the program's logic.

The things would become easier if the decision should depend not on a message
header, but on the value of a SMTP command (e.g., that of MAIL FROM).  This
would require relatively small changes and would permit to achieve the
same effect (provided the client is able to alter the value of
that command, of course).

In other words, this change will allow you to write such a rule:

BEGIN SMTP
if command ["mail from:"] "<[email protected]>.*"
  esmtp-auth-id "smtp-user1"
  esmtp-password "pass1"
else if  command ["mail from:"] "<[email protected]>.*"
   esmtp-auth-id "smtp-user2"
   esmtp-password "pass2"
 fi
fi
END

I think I'll start from implementing this approach as a proof of concept,
and then switch to the full-fledged implementation.

What do you think?

Regards,
Sergey



_______________________________________________
Bug-anubis mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-anubis

Reply via email to