These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Global procmailrc help on the new forum.
I have a default virtualmin gpl installation running on debian 5.0.
I am trying to integrate zarafa on my machine and it calls for this:
:0 w | /usr/bin/zarafa-dagent [user name] EXITCODE=$?
to be added to the global procmailrc file.
How do I add this in so that I can retain virtualmin's spam & virus filtering and pass into the above code to deliver the message instead of the users home maildir directory.
my current procmailrc is:
LOGFILE=/var/log/procmail.log TRAP=/etc/webmin/virtual-server/procmail-logger.pl :0wi VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME :0 * ?/usr/bin/test "$VIRTUALMIN" != "" { INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN } DEFAULT=$HOME/Maildir/ ORGMAIL=$HOME/Maildir/ DROPPRIVS=yes :0 $DEFAULT
Thanks,
Andrew
Howdy,
Well, the actual delivery is taking place at the end -- the 2 lines with ":0" and "$Default". If you place your code above those two, I suspect that may actually do the trick for you.
-Eric
The only issue doing it in the global is that if the spam or virus returns true I need to add a -J to the zarafa-agent command, how can I do that from the global procmailrc?
Andrew
Well, you may be able to use what's in "/etc/webmin/virtual-server/procmail" as a guide there.
For example, for spam processing, those scripts to this to detect if a message was marked as spam:
:0
* ^X-Spam-Status: Yes
You could use a block beginning with that to call zarafa-agent with the appropriate parameters.
Then, you could do something similar with the Virus scanner -- look for a header that ClamAV sets, and then test on it to see if a virus was detected.
-Eric