Current time: 12-24-2024, 03:44 AM Hello There, Guest! (LoginRegister)


Post Reply 
per user server side filtering for virtual users
Author Message
MrRagga Offline


Posts: 4
Joined: Apr 2008
Reputation: 0
Post: #1
per user server side filtering for virtual users
Hi,
I am wondering how to set up per user server side filtering as easy as possible. As far as i understand I can only use a procmailrc for local users, since virtual_transport is set to virtual. The server side filtering should be possible for every email account, so that i can filter every message to the appropriate maildir folder.
So what is the easiest solution to enable this? It doesn't matter if i use maildrop, procmail or whatever. I am just interested in that kind of solution without modifying too much.

Cheers Jonas
04-13-2008 12:31 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #2
RE: per user server side filtering for virtual users
there's a post about doing this with procmail - but well, the forum is broken, so you won't find it...

Basically it this in the master.cf:
Code:
procmail  unix  -       n       n       -       -       pipe
    flags=DRhu user=vmail argv=/usr/bin/procmail HOME=/var/mail
    DEFAULT=/var/mail/virtual/${nexthop}/${user}/

then you can put a .procmailrc in every mail account

/var/mail/virtual/domain/user/.procmailrc

Give it a try...

/J
04-13-2008 05:53 PM
Visit this user's website Find all posts by this user Quote this message in a reply
MrRagga Offline


Posts: 4
Joined: Apr 2008
Reputation: 0
Post: #3
RE: per user server side filtering for virtual users
Hi,
filtering does not work. Do I need to change the main.cf too? Do you have an example of a working procmailrc?

Cheers Jonas
(This post was last modified: 04-13-2008 11:24 PM by MrRagga.)
04-13-2008 10:57 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #4
RE: per user server side filtering for virtual users
Yeah - I just found the original thread in archive.org

http://web.archive.org/web/2007062916431...t-676.html

at least the first 10 posts...

You also need the following in main.cf:

Code:
virtual_transport = procmail
procmail_destination_recipient_limit = 1

(replace the actual virtual_transport...)

and a .procmailrc example, well some fragments and trials - I'll post the complete fragments...

Code:
# MAILDIR=$HOME/Maildir/
# DEFAULT=$MAILDIR
#VERBOSE=on
LOGFILE=$HOME/procmail.log

#LOGFILE="/var/log/procmail.log"
VERBOSE=yes

# MAILDIR=$DEFAULT
# FORMAIL=/usr/bin/formail
# SENDMAIL=/usr/sbin/sendmail

:0:
* ^X-Spam-Flag: YES
$DEFAULT.Spam/

This one just does some logging into /var/mail/procmail.log

-> HOME is HOME of user vmail...

You have to try with several variables $DEFAULT and others to get the MAILDIR root...

Would you mind trying this out and writing a howto which can be placed into the howto on this site?
04-14-2008 02:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
MrRagga Offline


Posts: 4
Joined: Apr 2008
Reputation: 0
Post: #5
RE: per user server side filtering for virtual users
joximu Wrote:Would you mind trying this out and writing a howto which can be placed into the howto on this site?

Done.

http://www.isp-control.net/documentation...p_procmail

Thanks.

Cheers Jonas
06-01-2008 11:44 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)