Re: 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

On 01/11/2011 03:06 PM, Jared Johnson wrote:
> my ( $self, $transaction, $recipient) = @_;
> my $sender = $transaction->sender;

Thank you all for your help. The plugin now does it job as it should and
the lists work like I want them to. That's not too pretty plugin by
design, but I really don't care ;)

Some details if someone is interested:

Database table has fields rcpt_domain, sndr_domain and type where type
is either 0 or 1. Now I read lines from SQL which match to both
rcpt_domain and sndr_domain:
SELECT * FROM bwlist WHERE rcpt_domain='foo.com' AND sndr_domain='foo.bar'

Then just loop trough the results, simple if-block to match type-field
and return DECLINED, OK and DENY accordingly.

- -- 
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/

iEYEARECAAYFAk0uX+gACgkQh/RMqfItS5UfBwCeLQtVFiGuNid8Q7Kti3YRXhkM
c2MAn3rKkMUbvwBncQ7MjsYV65pgp981
=lR6U
-----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.