[Mailman-Users] Question about sync_members

Richard Barrett R.Barrett at ftel.co.uk
Fri Nov 8 15:11:36 CET 2002


Forget what I originally said. below. That AddMember function is not called 
during execution of sync_members.

Indeed, it appears that there is no check in sync_members (or indeed 
add_members) to prevent a list being subscribed to itself. This is so in MM 
2.0.13. and also in 2.1b4.

Getting back to your problem.

Utils.ValidateEmail is first called at line 194 of sync_members for each 
email address in the input file. If an incoming mail address is invalid the 
script should print something like this and exit:

Invalid: <faulty email address>
You must fix the preceding invalid addresses first.

You do not say that you are getting this output which identifies the faulty 
email address.

Utils.ValidateEmail checks each email address as follows:

1. it has a userid and domain part separated by an @ char

2. the userid is not empty

3.  the domain has at least one period character in it

If you are not getting that error message output from sync_members, the 
strange thing is that the Errors.MMBadEmailError would then seem to 
originate when the Utils.ValidateEmail  is called a second time in respect 
of the same datum.

This occurs when Utils.ValidateEmail is again called at line 1096 of 
Mailman/MailList.py as the new members are actually added to the list.

The traceback you supplied seems to indicate this is when the error is 
occurring.

If this exception is being reported during this second round of processing 
it is not immediately obvious to me why this is happening.

If your or anybody else can offer a solution I'd like to know what it is. 
Must be something obvious but I cannot spot it right now.

At 19:53 07/11/2002, Jim Tomasello wrote:
>Good afternoon. I'm running a new setup of mailman, the version that comes 
>with Red Hat 8.0. My problem isn't with Mailman per se, but with the 
>sync_members script that comes with it.
>

Its better to specify the actual Mailman version number but lets assume 
that it is 2.0.x

>I am trying to load members from a text file. The file has one email 
>address per line and contains 2,086 emails. When I run the script using 
>the following command while logged in as root, "./sync_members -n -w=no 
>-a=no -f members realtor-members", doing the dry run, everything seems 
>fine. When I remove the -n parameter to run it live, it gets through 2,043 
>emails and then generates the following error:
>
>Traceback (most recent call last):
>   File "./sync_members", line 257, in ?
>     main()
>   File "./sync_members", line 240, in main
>     welcome, notifyadmin)
>   File "/var/mailman/Mailman/MailList.py", line 1054, in ApprovedAddMember
>     raise e, v
>Mailman.Errors.MMBadEmailError
>Now I've looked at the addresses around the one it appears to be dying on, 
>and they look fine. I have no idea what this is telling me the problem is. 
>I've looked in the /var/logs/mailman dir to see if I can find any evidence 
>of what's going on, to no avail. Anyone out there have any idea where I 
>should start looking to figure this one out? Any help would be appreciated.
>

Looking at the MM 2.0.13 code.

The only circumstance that I can see where Errors.MMBadEmailError is raised 
without  sync_members printing something like this and exiting:

Invalid :  <faulty email address>'
You must fix the preceding invalid addresses first.

is if  the maillist's own email address is on the list., i.e. you are 
trying to subscribe the list to itself.. Could that be the case??

This error is generated at line 970 of $prefix/Mailman/MailList.py in 
function AddMember.




More information about the Mailman-Users mailing list