First off, my setup:
I use qmail, and I have no diea how to make this work on another setup, so bear that in mind.
I run a virtual domain on my qmail, but every single mail addy is owned by me (and i use tons of them) so i have a catchall alias for it that forwards to my real useraccount.
/opt/qmail/alias/.qmail-<my_domain>-default
that look like this:
&<real_accoutname>@<hostname>
then i have a special alias:
/opt/qmail/alias/.qmail-<my_domain>-<real_accoutname>-default
that looks like this:
|forward "$EXT2"@<hostname>
This way i can use the account-sub_address feature of qmail even tho I have the catch all.
What I did:
in ~/.tmda/config i added:
BOUNCE_ENV_SENDER = "<real_accoutname>-tmda_bounce@<my_domain>"
then in my homedir i created .qmail-tmda_bounce and entered the following:
|preline /path/to/tmda-delete-bounced-pending.pl >> /path/to/.tmda/logs-delete-bounced-pending
and voila! :)
oh and ofcause i coded the little perlscript tmda-delete-bounced-pending.pl that does the work, it looks like this:
#!/usr/bin/perl -w $PENDING_DIR="/path/to/.tmda/pending";
sub delete_pending {
my ($file,$success);
$file = shift;
if(-e $file) {
if(unlink $file) {print "success: deleted $file\n";}
else {print "failure: couldn't delete $file\n";}
}
else {print "failure: didn't find $file\n";}
}while(<STDIN>) {
chomp;
next unless /^Message-ID: \<([0-9\.]+)TMDA/;
delete_pending($PENDING_DIR."/".$1."msg");
exit;
}
print "failure: didn't find Message-ID header\n";
I hope anyone out there will find this usefull, it works like a charm :)
_____________________________________________ tmda-users mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-users
