On Sun, Jun 15, 2003 at 12:34:11AM -0400, Tim Legant wrote:
> Or in your TMDA config file:
>
> os.environ['RECIPIENT'] = os.environ['RECIPIENT'].replace('localhost.', '')
Hey this is a good idea, why do this in procmail when we have Python?
However, this causes problems for tmda-inject, since there is no
RECIPIENT variable set by tmda-sendmail on outgoing mail:
Traceback (most recent call last):
File "/home/guy/tmda-0.80/bin/tmda-inject", line 123, in ?
from TMDA import Cookie
File "/usr/local/lib/python2.2/Cookie.py", line 30, in ?
# by Timothy O'Malley <[EMAIL PROTECTED]>
File "./TMDA/Defaults.py", line 89, in ?
File "/home/guy/.tmda/config", line 22, in ?
os.environ['RECIPIENT'] = os.environ['RECIPIENT'].replace('localhost.',
'')
File "/usr/local/lib/python2.2/UserDict.py", line 14, in __getitem__
def __getitem__(self, key): return self.data[key]
KeyError: RECIPIENT
But this does work:
if 'RECIPIENT' in os.environ:
os.environ['RECIPIENT'] = os.environ['RECIPIENT'].replace('localhost.', '')
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users