3 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Re: Environment varia...
FromSent OnAttachments
Martin List-PetersenDec 27, 2001 4:21 am 
Sam VarshavchikDec 27, 2001 4:50 am 
Martin List-PetersenDec 27, 2001 6:17 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] Re: Environment variables available in Maildrop Actions...
From:Martin List-Petersen (mar@list-petersen.dk)
Date:Dec 27, 2001 6:17:43 am
List:net.sourceforge.lists.courier-maildrop

Martin List-Petersen writes:

Is there any environment variable available, which tells, what account actually is beeing processed and there a possibility to include another ruleset based on that ?

Consult the documentation for your mail server, for that information.

Found the solution: it's LOGNAME

However, here is a solution for anybody, who is using Postfix, Maildir, userdb (my setup uses mysql for that), Courier-IMAP, Courier-POP3 and Maildrop and doesn't want to have two tables with homedirs/maildirs (one for postfix and one for courier-stuff), but instead of one for the whole thing.

Since postfix uses a constant value for the homedir, you're pretty bound to having your homedir at "/home/vmail" or so. The user maildirs then are "/domain.toplevel/user/" in my case. This could also be "/domain.toplevel/user/Maildir/" but doesn't really matter, since the homedir not is the "/domain.toplevel/user/" dir.

In "/home/vmail" you place a .mailfilter - file with the following content: ---------start snip---------- include "/home/vmail/.mailfilters/$LOGNAME" ---------stop snip----------

Please align the directory to your setup. I did choose .mailfilters/ to put my include files in, they could be placed anywhere, that you want. Small tip besides: you can also put some global rules in the the .mailfilter file, which you want to apply to all users (blacklisting-stuff or what so ever.)

in my example i put then a mailfilter-file in "/home/vmail/.mailfilters/", which is named "user@domain.toplevel" and holds the user-specific rules.

For you guys, that use sqWebMail also, you can point MAILDIRFILTER in your maildirfilterconfig file to /home/vmail/.mailfilters/user@domain.toplevel and your users will actually also be able to edit their rules (*nice*)