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 connection with mysql works and any other operation on it works. this should be the last step for my setting. Have you any hint? Thanks in advance and best regards Matteo Garofano
On Monday 2005-November-28 05:40, Matteo Garofano wrote:> The problem I find is to set up the pop-before-smtp using sql (mysq)snip> Have you any hint?I can't help with your pop-before-SMTP, but I can suggest that you not do that. :) The better way to do it is with SMTP AUTH, which most MUA's should support these days. If your MTA is Postfix (which appears so from your headers) Timo has a patch which ties in SASL AUTH support without using Cyrus SASL. I use it and recommend it highly. See the Postfix SASL_README and the patch at http://dovecot.org/patches/postfix/ (for Postfix 2.2.x) or my own ports of it to the 2.3 snapshots: http://www.nodns4.us/postfix-2.3-20051121-dovecot-auth.patch.gz http://www.nodns4.us/postfix-2.3-20050630-dovecot-auth.patch.gz still exists for those who got on the bleeding edge but were too lazy to stay there. :) -- mail to this address is discarded unless "/dev/rob0" or "not-spam" is in Subject: header
Thanks for your reply, I know that smtp auth is far better from pop-before-smtp but I have to replace a qpopper daemon and not ask any change from client site (they are thousands ...) So I must do the kind of setting I described. If you have any suggestion... thanks again Bye te0x ----- Original Message ----- From: "Matteo Garofano" <m.garofano at internetware.it> To: <dovecot at dovecot.org> Sent: Monday, November 28, 2005 12:40 PM Subject: Pop-before-smtp and MySQL?> 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 connection with mysql works and any other operation on it works. > this should be the last step for my setting. > > Have you any hint? > > Thanks in advance > and > best regards > > Matteo Garofano
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.
Thanks ... so I know inetd is not the issue... I don't know where look for help :-( ----- Original Message ----- From: "Matteo Garofano" <m.garofano at internetware.it> To: <dovecot at dovecot.org> Sent: Tuesday, November 29, 2005 1:39 PM Subject: Re: [Dovecot] Pop-before-smtp and MySQL?>I can add, i run dovecot standalone not inetd or xinetd. > does it change something about the pop-before-smtp issue ? > > Thanks > te0x > > ----- Original Message ----- > From: "Lorens" <dovecot.fdop at tagged.lorens.org> > To: "Matteo Garofano" <m.garofano at internetware.it> > Cc: <dovecot at dovecot.org> > Sent: Monday, November 28, 2005 6:23 PM > Subject: Re: [Dovecot] Pop-before-smtp and MySQL? > > >> On Mon, Nov 28, 2005 at 04:21:27PM +0100, Matteo Garofano wrote: >>> dovecot: Nov 28 14:50:41 Info: Dovecot v1.0-stable starting up >>> dovecot: Nov 28 14:50:42 Info: auth(default): mysql: Connected to >>> postfix >>> Login from , parameters 1=/usr/local/libexec/dovecot/pop3, 2=, 3=, 4>>> dovecot: Nov 28 14:50:59 Info: pop3-login: Login: teo at xarrampicate.it >>> [192.168.100.70] >>> >>> it seems that no variable is passed during the execution of the >>> mail_execute commands >> >> It does seems that way. Sorry, I cannot explain that. Maybe you >> have a different version than I do, but they are both -stable >> and your dovecot.conf syntax resembles mine. No idea... maybe >> something in the compilation (you give your compilation options >> so I suppose you compiled it yourself; I took a debian package). >> >> >
On 28.11.2005, at 13:40, Matteo Garofano wrote:> 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 don't know why that script had $3 there, Dovecot has never given any parameters to imap/pop3 processes. But the IP address exists in IP environment, so you can just remove the "IP=.." line from the script and it should work. I updated the wiki already. -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20051202/7113519a/attachment.bin>