I gather that this was originally BOFHCHECKDNS?
Why just HELO and not also EHLO ?

That being said, this is a cool addition that I'm sure people will find
useful.

On Wed, 27 Aug 2003 [EMAIL PROTECTED] wrote:

> This patch drops the connection on non-resolvable helo with
> 501 Helo rejected: resolvable hostname required.
> 
> Its quite simple (too simple to be integrated into courier...),
> but keeps the constantly hammering Sobig off the server for now.
> I am planning to move the reject after the MAIL FROM which would
> allow to exclude authenticated users but have no time for testing.
> 
> BOFHCHECKHELO=1 required in etc/esmtpd
> 
> 
> +++ courier/module.esmtp/courieresmtpd.c        Wed Aug 27 20:37:40 2003
> @@ -38,6 +38,14 @@
>  #include       "numlib/numlib.h"
>  #include       "tcpd/spipe.h"
>  #include       "tcpd/tlsclient.h"
> +
> +// PATCH: BOFHCHECKDNS: requires rfc1035* and prototype
> +#include       "rfc1035/rfc1035.h"
> +#include       "rfc1035/rfc1035mxlist.h"
> +static int bofh(const char *bofh);
> +
>  static const char rcsid[]="$Id: courieresmtpd.c,v 1.40 2003/06/30 03:51:44
> mrsam Exp $";
> 
>  static char helobuf[256];
> @@ -132,9 +140,23 @@
>  "250 DSN\r\n";
>  const char *me=config_me();
> 
> +// PATCH: BOFHCHECKHELO
> +struct  rfc1035_mxlist *mxlist;
> +
>         helobuf[0]=0;
>         strncat(helobuf, heloname, sizeof(helobuf)-1);
> 
> +// PATCH: BOFHCHECKHELO, http://cie.bilkent.edu.tr/RFC/1123/90.htm
> +// todo: verify address pointer for unresolved hosts
> +if (bofh("BOFHCHECKHELO"))
> +{
> +       if(rfc1035_mxlist_create(&rfc1035_default_resolver, helobuf, &mxlist)
> == RFC1035_MX_HARDERR)
> +       {
> +               addiovec_error(NULL, "501 Helo rejected: resolvable hostname

Suggest use HELO here instead of Helo.

> required.");
> +               exit(1);
> +       }
> +}
> +
>         if (!extended)
>         {
>                 addiovec("250 ", 4);

--
Democracy is two wolves and a sheep voting on what to have for dinner.
Liberty is two wolves attempting to have a sheep for dinner and
finding a well-informed, well-armed sheep.

Jon Nelson <[EMAIL PROTECTED]>
C and Python Code Gardener


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to