How to get both sender and recipient address for mail-hook

[email protected] (Tapio Salonsaari)
Newsgroups perl.qpsmtpd
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello!

I'm building an web-based gui for qpsmtpd and currently I'm
writing/modifying plugin for white/blacklists per domain.

My web gui stores black / white lists into psql-database and the idea is
to do an SQL-search like:
SELECT * FROM blacklist WHERE sender="$senderdomain" AND
recipient="$recipientdomain";

Then if the query returns any rows the plugin would return DENY. If
there's no rows on blacklist search the same for whitelist -table and
process the data accordingly.

I'm using http://devin.com/qpsmtpd/whitelist as an base (don't know if
there's something more suitable to start with) and currently I'm stuck
with sub mail_handler, since I can't figure out how to pass both sender
and recipient addresses to function.

I'm not too familiar with qpsmtpd and it's quite possible that I'm going
to wrong direction in the first place, so if there's something already
available which would suit my needs better I'm glad to hear about it.

Any help will be appreciated.

- -- 
Tapio Salonsaari

My public GPG key is available
at http://take.nerd.fi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0sQE4ACgkQh/RMqfItS5UAEQCfTbkWexiu1aRTrsXsout1Bd3W
w28Anidw/N5PO/cMMgRzHRID26ctW6y4
=e/jr
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.