4 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] MySQL Access Via Mail...
FromSent OnAttachments
rob...@digitalphx.comMar 5, 2006 5:30 pm 
moussMar 15, 2006 1:40 pm 
rob...@digitalphx.comMar 15, 2006 1:58 pm 
moussMar 16, 2006 1:49 pm 
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] MySQL Access Via Maildrop Script?Actions...
From:mouss (mou@netoyen.net)
Date:Mar 16, 2006 1:49:54 pm
List:net.sourceforge.lists.courier-maildrop

rob@digitalphx.com a écrit :

rob@digitalphx.com a écrit :

Can you do sql queries in a maildrop script with MySQL? If so, then how?

By running the 'mysql' command.

You mean inside the maildrop config file I can run mysql queries? I looked all over for google for that and cant find any examples. Any suggestions?

you can run any command inside a maildrop config file.

You probably already saw something like this in the examples:

#create the maildir if it doesn't exist `test -d $DEFAULT if ($RETURNCODE != 0 ) { `$maildirmake $DEFAULT }

the 'test' thing is just a shell command.

You may or may not have seen something like: `/usr/bin/logger -t maildrop -p mail.info from=<${SENDER}> to=<${RECIPIENT}> folder=$FOLDER ...`

now, if one needs to run external commands, the need for maildrop decreases... (I put ML messages into ML specific folders, and I now use grep/awk/... because lookup() can't handle this. but I'll move to mysql soon).