John Peacock wrote:
> Peter J. Holzer wrote:
>> Run qpsmtpd (not forkserver or the apache module) after setting the
>> TCPREMOTEIP environment variable:
>>
>> TCPREMOTEIP=127.0.0.1 perl -d qpsmtpd
>
> That would be 'perl -dT qpsmtpd' (else you'll get a warning).
I ended up using that exact command last night when I tried it out. I
got a huge debugging dump as it printed the output from the requires,
etc., and then it stopped here:
[... lots of stuff ...]
Qpsmtpd::varlog('Qpsmtpd::TcpServer=HASH(0x8546788)', 7, 'trying
to get config for timeout') called at lib/Qpsmtpd.pm line 54
Qpsmtpd::log('Qpsmtpd::TcpServer=HASH(0x8546788)', 7, 'trying to
get config for timeout') called at lib/Qpsmtpd.pm line 131
Qpsmtpd::get_qmail_config('Qpsmtpd::TcpServer=HASH(0x8546788)',
'timeout', 'undef') called at lib/Qpsmtpd.pm line 108
Qpsmtpd::config('Qpsmtpd::TcpServer=HASH(0x8546788)', 'timeout')
called at lib/Qpsmtpd/TcpServer.pm line 55
Qpsmtpd::TcpServer::read_input('Qpsmtpd::TcpServer=HASH(0x8546788)')
called at lib/Qpsmtpd/TcpServer.pm line 49
Qpsmtpd::TcpServer::run('Qpsmtpd::TcpServer=HASH(0x8546788)')
called at ./qpsmtpd line 24
I was able to step through the smtp conversation just find but when I
finished the DATA section I got the bare LF error:
http://smtpd.develooper.com/barelf.html
Sorry if I seem a bit obtuse, but how to I generate the full CRLF on my
Linux box so that I can enter my data_post plugin handler?
> I actually have a
> debug script that I use:
>
> #!/bin/sh
> exec /usr/local/bin/softlimit -m 25000000 \
> /usr/local/bin/tcpserver -c 10 -v -R -p \
> 127.0.0.1 2525 \
> perl -d ./qpsmtpd
I tried this and here's what I got:
harpua qpsmtpd-0.31.1 # sh qpsmtpd_single.sh
tcpserver: status: 0/10
helo foo.com
<no response from server>
Thanks for your help with this - beats the methods I was using before :)
> which lets me test more than one message in one debugging session. It is also
> very helpful to put:
>
> $DB::single=1;
>
> at the point in your plugin where you want to break. Note also that qpsmtpt
> is
> is very noisy under the debugger (basically it echos all sorts of nonsense).
> I
> keep meaning to get back to trying to get ebug_http working.
>
> John