[Pymilter] delrcpt errors
Stuart D. Gathman
stuart at bmsi.com
Mon Apr 26 12:52:49 EDT 2004
Eric S. Johansson wrote:
> trying to delete recipients and haven't quite figured out what I'm
> doing wrong. The line "recipient list" is the list of addresses taken
> from the SMTP protocol level by 'envrcpt'. I do my munching and then
> I have a list of addresses I want to delete. I go through that list
> and I get a "cannot delete recipient" exception. As far as I can tell
> the strings are identical and I'm trying to delete recipients inside
> of eom. I'm puzzled.
>
> Milter: recipient list = ['<root at redweb.harvee.org>',
> '<dawson at redweb.harvee.org>']
> Milter: address <root at redweb.harvee.org>
> Milter: delete recipient cannot delete recipient
> Milter: address <dawson at redweb.harvee.org>
> Milter: delete recipient cannot delete recipient
You have to tell sendmail you might be deleting recipients by setting
DELRCPT in the flags. Here is a snippet from the startup in bms.py:
flags = Milter.CHGBODY + Milter.CHGHDRS + Milter.ADDHDRS
if wiretap_dest or smart_alias or dspam_userdir:
flags = flags + Milter.ADDRCPT
if srs or len(discard_users) > 0 or smart_alias or dspam_userdir:
flags = flags + Milter.DELRCPT
Milter.set_flags(flags)
More information about the Pymilter
mailing list