[Dovecot] Pop-before-smtp and MySQL?
Alen Salamun
alien at alienworld.org
Mon Nov 28 16:54:16 EET 2005
I am using pop-before-smtp with no problems with dovecot.
String is:
$pat = '^(... .. ..:..:..) \S+ dovecot: imap-login: Login: user=<\S+>,
method=\S+, rip=(\d+\.\d+\.\d+\.\d+)';
BR, Alen
Lorens wrote:
> On Mon, Nov 28, 2005 at 12:40:08PM +0100, Matteo Garofano wrote:
>> Hi,
>> I found that dovecot have many nice features.
>> Now I write because I'm tring to setup the dovecot server, I would
>> substitute a qpopper daemon (patched for mysql authentication)
>> The problem I find is to set up the pop-before-smtp using sql (mysq) as
>> written in http://wiki.dovecot.org/moin.cgi/PopBSMTPAndDovecot
>> (Waiting for post_login ;-)
>> I would use the script popbsmtp.sh and not a perl pig. (I'm using qpopper
>> patched to store the relay IP in mysql and it works)
>> I set .my.cnf in /root
>> What happen is that the $3 don't contain the IP that should be written to
>> the DB. Is there something I miss ?
>> I tried to modify the dovecot.conf file like this
>> mail_executable = /usr/local/libexec/dovecot/popbsmtp.sh
>> /usr/local/libexec/dovecot/pop3 %r "%r"
>> and it write to the db the litteral value %r and not the ip, otherwise it
>> write nothing.
>
> The first thing to do is some debugging: in the popbsmtp.sh
> script write the received parameters to a file, and decide where
> the problem is! For exemple,
>
> echo "Login from $3, parameters 1=$1, 2=$2, 3=$3, 4=$4" >> /var/log/dovecot3
>
> I did not need to put %r in the dovecot.conf, my line is
>
> mail_executable = /usr/lib/dovecot/popbsmtp.sh /usr/lib/dovecot/pop3
>
> If you put any junk afterwards, you will find that it's not $3
> anymore but $4 or $5 or whatever.
>
> My dovecot version is a 1.0stable.
>
More information about the dovecot
mailing list