[Zope-dev] MailHost, 2.2.0, and qmail mailserver
The change in the sendmail tag to use the SMTP module has caused a problem for me when sending to a qmail mailserver. After investigation, it would appear that the smtplib module function: SMTP.mail(self,sender,options=[]): appends a space to the end of the FROM: address when there are no options. The offending line is: self.putcmd("mail", "FROM:%s %s" % (quoteaddr(sender) ,optionlist)) This space upsets the qmail server which response with SMTPSenderRefused. A quick fix is to remove this space and home that no optionlist is ever past. A more permanent fix to smtplib would seem in order. Richard ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Converters.field2date, allow empty string to return None?
Brad Clements writes: One thing that has been bothering me is that I can't easily test my ZSQL Methods if they accept a date type unless I completely fill all the date arg types. For example, if the sqlmethod has argument type startdate:date='' and in the body I have dtml-if startdate ... When i use the test form, I can't leave the date field empty, otherwise I get a conversion error from Converters.field2date() One solution would be to use a valid (special) date as default value and test against it in the body. I see that converters required: exists, but does that imply that all other converters allow an empty string to return None? Or do we need to add an explicit "optional" type? I think, we should have an explicit "optional" because that is the most clear way to say, this argument is optional. Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Converters.field2date, allow empty string to return None?
On 3 Sep 2000, at 13:33, Dieter Maurer wrote: One solution would be to use a valid (special) date as default value and test against it in the body. I don't like this "solution" because the end-user has to know what the special date is, it looks ugly on the form and it still does *not* fix the problem of using the test function in an SQL Method. Brad Clements,[EMAIL PROTECTED] (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com AOL-IM: BKClements ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns: transaction bug
ZPatterns 0.4.2a1 PlugIns.py bug? I get a 'Name Error' aq_base when I hit the following code while trying to update the index_html method of one of my Specialists from CVSMixin.. I think that this would get hit anytime you add an object whose id is already in the acquisition path -steve diff -c -r1.1.1.2 PlugIns.py *** PlugIns.py 2000/09/04 14:17:29 1.1.1.2 --- PlugIns.py 2000/09/04 18:53:17 *** *** 265,271 # An object by the given id exists either in this # ObjectManager or in the acquisition path. flags = getattr(obj, '__replaceable__', NOT_REPLACEABLE) ! if hasattr(aq_base(self), id): # The object is located in this ObjectManager. if not flags REPLACEABLE: raise 'Bad Request', ('The id "%s" is invalid - ' \ --- 265,271 # An object by the given id exists either in this # ObjectManager or in the acquisition path. flags = getattr(obj, '__replaceable__', NOT_REPLACEABLE) ! if hasattr(self.aq_base, id): # The object is located in this ObjectManager. if not flags REPLACEABLE: raise 'Bad Request', ('The id "%s" is invalid - ' \ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] MailHost, 2.2.1, and tracebacks
Shane Hathaway wrote: Bill Anderson wrote: ... File /local/ZopeSites/TestBed/lib/python/AccessControl/Owned.py, line 152, in getOwner (Object: mailPasswordTemplate) ValueError: (see above) By any chance does it say something to the effect of "Unpack tuple of incorrect size"? If so, I suggest you add a "print owner" statement just before line 152 of Owner.py and tell us what it says. Hi Shane, I apologize for the delay, been working on other aspects of it. I added a print statement, and it prints []. line 52 reads: udb, oid = owner Which makes sense that it would barf, since the list is zero-length. Here is the code bit, with my print statement added in: - def getOwner(self, info=0, aq_get=aq_get, None=None, UnownableOwner=UnownableOwner, ): """Get the owner If a true argument is provided, then only the owner path and id are returned. Otherwise, the owner object is returned. """ owner=aq_get(self, '_owner', None, 1) if owner is None: return owner if info: return owner if owner is UnownableOwner: return None print owner udb, oid = owner root=self.getPhysicalRoot() udb=root.unrestrictedTraverse(udb, None) if udb is None: return SpecialUsers.nobody owner = udb.getUserById(oid, None) if owner is None: return SpecialUsers.nobody return owner -- The following patch seems to alleviate the problem, but I dunno if it affects anything else: == --- lib/python/AccessControl/Owned.py Mon Sep 4 13:56:52 2000 +++ lib/python/AccessControl/Owned.py Mon Sep 4 13:55:40 2000 @@ -149,6 +149,8 @@ if owner is UnownableOwner: return None +if len(owner)==0: return None + udb, oid = owner root=self.getPhysicalRoot() udb=root.unrestrictedTraverse(udb, None) === Basically, I test for an empty list, and return None. -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] MailHost, 2.2.1, and tracebacks
Bill Anderson wrote: ... The following patch seems to alleviate the problem, but I dunno if it affects anything else: yeah, it makes zope ignore the cookie login setup, and instead triggers basic Auth ... will work on it today. Ugh. -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] MailHost, 2.2.1, and tracebacks
Bill Anderson wrote: Bill Anderson wrote: ... The following patch seems to alleviate the problem, but I dunno if it affects anything else: yeah, it makes zope ignore the cookie login setup, and instead triggers basic Auth ... will work on it today. Ugh. Thi sis getting old, replying to my own posts... But anyway, I wa sincorrect, it was a lack of a dtml-else causing this problem. So far, it works fine. -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )