Hi Tim,

On Tue, Oct 21, 2003 at 06:11:17PM -0400, Tim Roberts wrote:
> I am using TMDA on a "gateway/relay" style QMail box. So when I follow 
> the FAQ directions on how to make TMDA relay via a QMail server, all works 
> now but its adding confirmed addresses to a "global" whitelist instead of 
> the individual users whitelist. The FAQ stated to forward all mail to a 
> directory like /var/spool/tmda and "setup the config file however you like"
> ....well the however you like is my problem. I think I screwed that up. So, 
> for instance you can send to [EMAIL PROTECTED] and confirm and it adds it to 
> /var/spool/tmda/.tmda/lists/whitelist and if you send to [EMAIL PROTECTED], 
> and confirm, it adds it to the same file. Is this how it was intended or 
> did I boof again? 

Yes, that is how I intended for it to be.   As I see it, the primary purpose
of TMDA is to make sure that verified senders are allowed to send mail.  If 
a person has verified themself to one person at your organization, then asking
for additional verifications when sending to anyone else is mostly pointless.

Having said that, what you want to do can still be done rather easily.  :)

Since you are using qmail you can take advantage of the environment variables
that are set during delivery.   In particular, the $DEFAULT variable will be
useful for picking the specific account username.  So, your config file would
look something like this (not tested):

  import os

  user = os.environ['DEFAULT'].split("-confirm")[0]
  listdir = "/var/spool/tmda/.tmda/lists/%s/" % user
  wlist = "%s/whitelist" % listdir
  blist = "%s/blacklist" % listdir

  if not os.path.exists(listdir):
      try:
         os.mkdir(listdir)
      except OSError:
          # pass, delivery will fail later, check qmail logs
          pass

  for alist in [wlist,blist]:
    if not os.path.exists(alist):
        fd = os.open(alist, os.O_WRONLY | os.O_CREAT, 0666)
        os.close(fd)
        os.utime(alist, None)

  CRYPT_KEY_FILE = "/var/spool/tmda/.tmda/crypt_key"
  CONFIRM_APPEND = wlist
  DATADIR = "/var/spool/tmda/.tmda/"
  PENDING_WHITELIST_APPEND = CONFIRM_APPEND
  PENDING_BLACKLIST_APPEND = blist
  PENDING_RELEASE_APPEND = CONFIRM_APPEND
  FILTER_INCOMING = "/var/spool/tmda/.tmda/filters/incoming"
  FILTER_OUTGOING = "/var/spool/tmda/.tmda/filters/outgoing"
  HOSTNAME = "as.pfnamerica.com"

You could do the same for the filter files too, if necessary.

> Is there some change I can make to CONFIRM_APPEND = to tell it to use the 
> "users" whitelist built by using vadduser-tmda?

This doesn't make much sense, because vadduser-tmda is useless in the qmail
relay configuration.  How are you using it?

Hope this helps,

Cory

--
Cory Wright
Stand Blue Technology
http://www.standblue.net/
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to