[prev in list] [next in list] [prev in thread] [next in thread] 

List:       majordomo-users
Subject:    Re: Non-domained address
From:       Dan Liston <dan () sonny ! org>
Date:       2000-03-28 3:10:37
[Download RAW message or body]

Todd A. Lyons wrote:

>Dan Liston wrote:
>
>> Non-domained address was not an issue in 1.94.4.  So much for sending
>> majordomo commands from the command line any more...
>> Maybe, rather than piping through "mail", we should be piping through
>> "sendmail -fmyaddress@fully.qualified.domain"
>
>We just ssh to another machine on the network and send mail from that
>machine.  Works good and works fast, plus it's under very controlled
>conditions.

Not every internet mail system has the luxury of a local network.  Some
are just a single host at the end of a dialup connection with a static
IP address.  This should be able to be worked via a lab system that is
not even connected to a network of any kind for truly controlled 
conditions.

There are two ways I have gotten around the
"
MAJORDOMO ABORT (mj_majordomo)!!

Majordomo@your.domain.tld: First Last <login> is not a valid return
address.
"
error message.  

Using Sendmail, use the "FEATURE(always_add_domain)dnl" in your m4
sendmail.mc file.  This will tag @your.domain.tld onto any local user or
alias that sends mail from the local machine.

OR

Edit majordomo.pl (thanks Mike O.).
Line 605 in Version 1.94.5 from;
		if (!(/\@/ && /\./)) {
to what Line 590 in Version 1.94.4 used to be;
		if (/\@/ && !/\./) {

In my opinion, the 1.94.4 version is more correct as login names and
aliases do not need to be fully qualified when they are on the same host
as the mail server or list server.  login@host is even a valid mail
address in relation to the local network, which is what the 1.94.4
version was trying to catch (if the address has an at sign but no dot). 
Neither the "@" nor the "." should be mandatory to the list server if
the MTA does not require them.  While it is easier to manage a
subscriber list by requiring the "@" and "." for a human, it makes no
difference to sendmail.

On the other hand, "if (!(/.+\@.+\..+/)) {" as Mike suggests is a much
better test if you DO wish to force "@" and "." in the correct sequence
in an email (or from) address.  This expression says the address must
have at least one or more of any character followed by an at sign, one
or more characters followed by a dot, and one or more characters. 

Considering no TLD has numerics, dashes, underscores or other
mathematical or punctuation characters, the final "." in the expression
could easily be replaced with "[a-z]" assuming all lower casing has 
already happened, or "[a-zA-Z]" if lower casing has not happened yet.  
With the exception of .arpa, .nato, .firm, and .store, no TLD has less 
than 2 or more than 3 characters.  While these TLDs are probably valid 
for web browsing, I doubt their validity for useful email addressing, 
bringing us back to a 2 or 3 letter TLD.  A tighter narrowing of valid 
addressing could be a regex of 

"if (!(/.+\@[a-z][-a-z0-9\.]*\.[a-z][a-z]/ || 
/.+\@[a-z][-a-z0-9\.]*\.[a-z][a-z][a-z]/)) {" 

but even then, should not be tested except on subscribe and unsubscribe
commands.  We should let the MTA determine validity of a "from" address 
during the SMTP conversation.

Dan

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic