Re: ingress SMTP

2008-09-04 Thread David Champion
  Well, that depends on MUA design, of course, but it's just been pointed
  out to me that the RFC says MAY, not MUST.

(That was me.)


 Note that there are TWO relevant RFCs: RFC 4409 and RFC 5068. The latter
 says:
 
 3.1.  Best Practices for Submission Operation

Thanks, Tony.  I hadn't taken account of superceding RFCs, and quoted
2476 to Jay.  2476 permits authN without encouraging or requiring it,
but 4409 both obsoletes 2476 and makes authN mandatory, so it's more
even than a best practice.  It's the law, to the extent that two sites
involved in a dispute may or may not consider RFC to be law.

But as I noted privately, sendmail for one enables MSP out of the box
without authentication -- or did the last few times I set it up --
so there's certainly a significant base of systems that at least are
running MSP on 587 without requiring authentication.  In such cases,
blocking ports is just whacking moles, whether you ticket and fine the
moles for violating RFC or not.

-- 
 -D.[EMAIL PROTECTED]NSITUniversity of Chicago



Re: interger to I P address

2008-08-27 Thread David Champion
 Actually, who needs loops for that?
 ...
 (unsigned char)(((char*)i)[3]),
 (unsigned char)(((char*)i)[2]),
 (unsigned char)(((char*)i)[1]),
 (unsigned char)(((char*)i)[0])

Let data structures work for you.

#include stdio.h

main(int argc, char *argv[])
{
union {
unsigned int i;
unsigned char c[4];
} ip;
int i = 0;

ip.i = 1089055123;
/* endian-neutral iteration: */
printf(%d.%d.%d.%d\n, ip.c[i++], ip.c[i++], ip.c[i++], ip.c[i++]);
return 0;
}


 $ bc
 bc 1.06
 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
 This is free software with ABSOLUTELY NO WARRANTY.
 For details type `warranty'. 
 obase=256
 1089055123
  064 233 169 147

Curse you with your large number bases.  But if you don't do GNU:

dc EOF
[0 sd
 [d 10 % 48 + Sm ld 1 + sd 10 / d 0 M] sM lMx
 [LmP ld 1 - d sd 0 M] sM lMx
] sN
1089055123
[[.]P] sP
4so [d 256 % Si 256 / lo 1 - dso 0 O] sO lOx
4so [Li lNx lo 1 - dd so 0 P 0 O] sO lOx
[
]P
EOF

-- 
 -D.[EMAIL PROTECTED]NSITUniversity of Chicago