|
Good
points. I have a "bounce processor" for my (30K addresses) mail list and it
ignores ALL email unless the sender is [EMAIL PROTECTED]. Further, I kill any
attempt to send to that address after the second failure, 25 is WAAAAAAY to
many. I'll retry after 60 days, but then 1 failure is enough for another 2 month
nap.
Doesn't make it right, but it's what I do. It gets NDR's from the foreign
hosts and invalid host/user from IMail attempted deliveries. All the "Vacation"
messages and auto-replies come to the same mailbox, but they
are from the sender, not from my postmaster. I do get "full
mailbox" messages, but an unattended email box is often an abandoned
mailbox. If they are out of town for two weeks, tough. They'll start to receive
the newsletter in a couple months if they get their mailbox back below
quota.
Further, since I have 5M of mail to process after a newsletter send, I
don't bother with IMail POP3, I just read the .mbx file. The logic is probably
flawed, but it's a newsletter, not rocket surgery.
Dan
Logic:
InMessage <= false;
for each line in the .mbx file
if it starts "FROM <"
if it starts "FROM
<[EMAIL PROTECTED]>" then set
InMessage
else reset InMessage;
if InMessage
if the line contains an email
address and
does not contain
"Message-Id:" and
does not contain
"In-Reply_To:"
then
Add/Increment the address to/in the database;
end for each;
erase .mbx file;
The
logic behind "if the line contains an email address" is [way too long to convert
to pseudo-language. Take it in Pascal or fergeddaboutit<g> - It starts nar
the bottom):
function FindAddress(arg: string): string;
const GoodCharsR = ['a'..'z', '0'..'9', '.', '-']; GoodCharsL = ['a'..'z', '0'..'9', '.', '-', '+', '-', '_']; // These also are valid but seldom used. // '!', '#', '$', '%', '&', '*', '/', '=', '?', '^', // '`', '{', '|', '}', '~' var i: integer; sl, sr: string; function trimlefts(arg: string):
string;
var i: integer; begin result := ''; arg := lowercase(arg); for i := length(arg) downto 1 do if arg[i] in GoodCharsL then result := arg[i] + result else break; end; function trimrights(arg: string):
string;
var i: integer; begin result := ''; arg := lowercase(arg); i := pos('..',arg); if i > 0 then arg[i] := '='; for i := 1 to length(arg) do if arg[i] in GoodCharsR then result := result + arg[i] else break; end; begin <<<< START
HERE!
result := ''; i := pos('@', arg); if i <> 0 then begin sl := copy(arg, 1, i-1); sr := copy(arg, i+1, length(arg)-i); if (length(sl) > 2) and (length(sr) > 4) then begin sl := trimlefts(sl); sr := trimrights(sr); if (length(sl) > 2) and (length(sr) > 4) and (length(sl + '@' + sr) < 70) and (sr <> 'visioncomm.net') and (sr <> 'mail.visioncomm.net') and (sr <> 'caravansheet.com') and (sl <> 'mailer-daemon') and (sl <> 'daemon') and (sl <> 'root') and (sl <> 'nobody') and (sl <> 'challenge') and (sl <> 'postmaster') and (lastemail <> sl + '@' + sr) then begin lastemail := sl + '@' + sr; result := lastemail; end; end; end; end; hth,
Dan
|
