Re: TMDA and postfix?
Lloyd Zusman <[email protected]>
| Newsgroups | gmane.mail.spam.tmda.user |
|---|---|
| Message-ID | <[email protected]> |
Stephen Warren <[email protected]> writes: > Lloyd Zusman wrote: >> All my users are virtual and use a Maildir for their incoming mail. For >> example, for the email address [email protected], their mailbox is >> this: >> >> /var/vmail/virtdomain.com/user/{cur,new,tmp} >> >> [ ... ] > > I would categorize the following as the user's HOME: > > /var/vmail/virtdomain.com/user Yes, however, the HOME environment variable is not set to this value, nor is it in the output of getpwuid(). Given that all email is delivered as user = "vmail" and group = "vmail", all email accounts have the same home directory: it's the home directory associated with user "vmail", which is /var/vmail on my system. > If possible, can you move the maildir into a subdir, so it's: > > /var/vmail/virtdomain.com/user/Maildir > > This probably isn't strictly needed, but it might keep things clean. Yes, I can do that. > Logically, given the above definition of HOME, the .forward file would be: > > /var/vmail/virtdomain.com/user/.forward OK. And then, I can put each user's ~/.tmda directory in /var/vmail/virtdomain.com/user/.tmda > However, I'm wondering if that would actually work. What local delivery > agent are you using? I assume not the standard postfix LDA; isn't that > for system users only? If you are using the standard postfix LDA, the > above .forward location would probably work. I'm just now setting up postfix, and therefore, I haven't set up any special LDA. Later on, I'll see if the standard LDA indeed runs the .forward file from that directory. If so, I can put something like this into this file (one long line): | /path/to/tmda-filter --environ=VHOME=/var/vmail/virtdomain.com/user \ --vhome-script=/path/to/some-script where where "user" and "virtdomain.com" are different for each email account, and where "some-script" simply does an "echo $VHOME". ... or some such thing. Does that seem right? However, if it turns out that the postfix LDA uses the HOME environment variable or getpwuid() to locate the .forward file, then I'm out of luck. If that turns out to be the case, what other options do I have? Thank you very much for all your help. -- Lloyd Zusman [email protected] God bless you.