View Full Version : vBouncer : Change thread subscribtion options for members with bouncing emails
tamarian
02-07-2004, 10:00 PM
Update April 5th: Step 2A for vBulletin 3 Gold added.
What vBouncer does
vBouncer will reduce your server load, bandwidth, and your forum admin in-box, by unsubscribing members who keep bouncing their emails back to your forum admin email, which may bomb your mail box if you have a busy forum with many members who subscribe to many threads, but their emails are either invalid, inbox full, or have ISP problems.
Screen shots
None, this is a command line script, with some changes in functions.php
Who may want to use this?
1. Very busy sites, with thousands of notifications a day.
2. Your admin box gets too many bouncing emails
3. You use Postfix or Sendmail. I'm not sure how this works on other mail servers, please let me know if this works with QMail, or Exism.
Caution
This may drive some of your members mad :) If their email bounces a lot, this script will modify their subscriptions from their favourite threads. They will have to fix their email account, and then modify their subscribtion manually to each thread again... This may not be due to bad emails, just ISP-side problems.
Use at your own risk. I'm sharing this since some indicated interest at vBulletin.com in this thread:
http://www.vbulletin.com/forum/showthread.php?threadid=71496
I'd be glad to help answer questions, but as with most hacks, it is your responsibility....
Installation
1. Create a unique email address on your server, dedicated to catch bouncing emails. Do not use adminemail, or any other existing email that you want to receive through a POP account. This email will be used only to catch bouncing emails.
Recommended name (makes for less editing): subscriber_notify
2. For vB 3.0.3 (older versions below, steps 2a or 2b)
I have yet to upgrade to 3.0.3, so this is contributed by ScottA:
I got this running on 3.0.3. IIRC, what you need to do is open mail.php and look for this:
function Mail($toemail, $subject, $message, $headers, $fromemail, $minusf = false)
{
if ($minusf)
{
$this->success = @mail($toemail, $subject, $message, trim($headers), "-f $fromemail");
}
else
{
$this->success = @mail($toemail, $subject, $message, trim($headers));
}
}
And change it to this:
function Mail($toemail, $subject, $message, $headers, $fromemail, $minusf = false)
{
if ($minusf)
{
$this->success = @mail($toemail, $subject, $message, trim($headers), "-f subscriber_notify@yourdomain.com");
}
else
{
$this->success = @mail($toemail, $subject, $message, trim($headers), "-f subscriber_notify@yourdomain.com");
}
}
Note: You need to replace "subscriber_notify@yourdomain.com" with the email created in step 1.
2a. For vB3 gold
Edit functions.php
Find:
if ($vboptions['needfromemail'])
{
@mail($toemail, $subject, $message, trim($header), "-f $vboptions[webmasteremail]");
}
else
{
@mail($toemail, $subject, $message, trim($header));
}
Replace with (replace subscriber_notify@example.com with the email from step 1:
@mail($toemail, $subject, $message, trim($header), "-fsubscriber_notify@example.com");
2b. For older, vB3 beta versions
Edit functions.php
Find:
// send those mails
if ($vboptions['needfromemail'])
{
@mail($email['toemail'], $email['subject'], $email['message'], trim($email['header']), "-f $vboptions[webmasteremail]");
}
else
{
@mail($email['toemail'], $email['subject'], $email['message'], trim($email['header']));
}
Replace with (replace subscriber_notify@example.com with the email from step 1:
// vBouncer hack
// Replace subscriber_notify email@example.com with the email from step 1
mail($email['toemail'], $email['subject'], $email['message'], trim($email['header']), "-fsubscriber_notify@example.com");
// end hack
3. Copy vBouncer.pl.txt to a directory on your server above apache level. vBouncer.pl.txt is attached below.
Rename it to vBouncer.pl by typing:
mv vBounver.pl.txt vBouncer.pl
Make it executable by typing:
chmod +x vBouncer.pl
4. Edit the configuation section of vBouncer.pl
#! /usr/bin/perl -w
#
# USAGE: ./vBouncer.pl -bounce : to unsubscribe threads from members with bouncing email
# ./vBouncer.pl : with no parameters to see (test) who will be unsubscribed
#
# Config:
my $bouncelimit = 10; # how many bounced emails are allowed, before taking actions
my $downgrade = 0; # What subscription level you will assign to bouncing members?
# 0 = No email, member will check subscribed thread through usercp
# 1 = Instant email, bad choice!
# 2 = Daily
# 3 = Weekly
my $clearmailfile = 1; # delete the mail file for bounced email when done (only deletes when -bounce option is used)
my $bouncefile = "/var/spool/mail/subscriber_notify";
# the path/to/bouncing emails file. "subscriber_notify is the email name, you need
# to change it to the email name you chose for bouncing emails.
my $db="database"; # mysql database name
my $db_host="localhost"; # mysql host
my $db_username="username"; # mysql username
my $db_password="password"; # mysql password
# end of config
5. Once a day or once a week (depending on the size of the spool size), you can run the scropt manually, or through a cron job. When done, you have to clear the email file, otherwise it will keep unsubscribing members whos emails no longer bounce.
To run the script in test mode, type:
./vBounver.pl
To run the script in bouncer mode, type:
./vBounver.pl -bouncer
To clear the mail box, use:
cat /dev/null > subscriber_notify
(or set the option in the script to do it)
Changes
Feel free to modify and post changes here or as new hacks, no credir or permission required. I may eventually add some features when I have the time.
Notes
1. The script assumes that Perl is installed @ /usr/bin/perl
If you have Perl installed elsewhere, you just need to update the first line of the script with the cirrect path:
#! /usr/bin/perl -w
2. You need to login to your server with a username that has write access to the mail spool, like a root/admin level user.
3. When run in test mode, ignore the warning "Use of uninitialized value in string eq at ./vBouncer.pl line 49" It just means you did not pass a parameter.
Sadie Frost
02-08-2004, 01:10 AM
Installed, but when I run it in test mode I get the message "Use of uninitialized value in string eq at ./vBouncer.pl line 49" - is that just because its in test mode?
:)
tamarian
02-08-2004, 01:22 AM
Installed, but when I run it in test mode I get the message "Use of uninitialized value in string eq at ./vBouncer.pl line 49" - is that just because its in test mode?
:)
Yes, it will give this warning when no parameters are supplied. It's just a warning, and can be ignored, or pass a dummy parameter like -test.
Sadie Frost
02-08-2004, 01:33 AM
The script assumes that Perl is installed @ /usr/bin/perl
If you have Perl installed elsewhere, you just need to update the first line of the script with the cirrect path:
#! /usr/bin/perl -w
Also, you need to login to your server with a username that has write access to the mail spool, like a root/admin level user.
Sorry not quick enough deleting that post :) I had vbouncer.pl chmoded to execute but not write - I chmoded it 777 and now I get no error message - it just says 'running in bouncer mode'. Should it say more than that before coming back to the prompt? Sorry for being such a pain!
tamarian
02-08-2004, 01:37 AM
Sorry not quick enough deleting that post :) I had vbouncer.pl chmoded to execute but not write - I chmoded it 777 and now I get no error message - it just says 'running in bouncer mode'. Should it say more than that before coming back to the prompt? Sorry for being such a pain!
LOL, I deleted my reply too, and made it into a note in the first post.
It will only list more info only if it found members with bounced emails greater than the limit set in the configuration section.
If you have just created the account for "subscriber_notify", you might need to wait until it receives enough bounces from the outgoing emails. You may need to reduce the limit to 1 for testing.
Sadie Frost
02-08-2004, 01:39 AM
LOL, I deleted my reply, and made it into a note in the first post.
It will only list more info only if it found members with bounced emails greater than the limit set in the configuration section.
Great - thanks so much for all your help! :) (And for a much needed hack!)
tamarian
02-08-2004, 01:42 AM
You're welcome, glad you found it useful.
eXtremeTim
02-12-2004, 01:12 AM
Now if only we could get this script in php for thoose of us who dont use perl.
Erwin
02-12-2004, 10:14 AM
This is an awesome idea. I may look into this.
This will be invaluable to me, especially when I run a forum which doesn't require email verification. :)
Dark_Wizard
02-13-2004, 04:26 PM
Now if only we could get this script in php for thoose of us who dont use perl.
Easy convert....
tamarian
02-13-2004, 04:34 PM
Easy convert....
It is easy, but may present some security risks. If you find a secure way to do this, please share it with us.
heynurse
02-19-2004, 09:59 AM
I love the idea of this hack, I am just worried about ticking off people who would loose threir subsriptions. I'm not sure this is even possible, but...
Instead of unsubscribing all the subscribed threads, would their be a way to temporarily move them into a usergroup called something like: Bad email address
and have that usergroup recieve no e-mail? (besides account related e-mail, like lost password etc..) But keep the subcription info intact with no e-mail notification?
And then have an option for them to update their e-mail address, once it is updated, have the script move their susbcription status back to previous usergroup?
I hope that makes sense?
Again, maybe this is not possible, but I think this would be a great addition if it was possible :)
Thanks
eXtremeTim
02-19-2004, 08:43 PM
I know it would be an easy convert. Especialy since I can script in Perl as well. I just dont really have the time right now to do it. Im working on several projects at once right now.
tamarian
02-21-2004, 11:41 PM
I love the idea of this hack, I am just worried about ticking off people who would loose threir subsriptions.
No one loses their subscription. This will change it from instant email, to no email. i.e. they can access subscribed threads from the user cp, and they can change it to instant or weekly, etc..
heynurse
02-22-2004, 04:39 AM
Tamarian,
OK, thanks for the clarification.
PranK
03-11-2004, 07:43 AM
This is awesome and I plan to use it (with around 500 bounces tp me a day), however, i am kinda dumb...
Do I need to run the file on a regular basis? Can I set a cronjob for it? I am terrible at backing up the db, let alone running this...
Also, if i have several domains on my server, does that pose a problem? i notice there is no domain on the end of the email address user in the script?
Sorry for the q's, thanks for any help.
Christian
Erwin
03-12-2004, 10:30 PM
I just realized I can't use this because my mail server is remote - the server does send the emails out, but return bounces go to another mail server.
tamarian
03-12-2004, 11:25 PM
This is awesome and I plan to use it (with around 500 bounces tp me a day), however, i am kinda dumb...
Do I need to run the file on a regular basis? Can I set a cronjob for it? I am terrible at backing up the db, let alone running this...
Also, if i have several domains on my server, does that pose a problem? i notice there is no domain on the end of the email address user in the script?
Sorry for the q's, thanks for any help.
Christian
Yes, you can run this as a cron job, there should be no problem with that.
re: multiple domain: It should not be a problem, but if you have multiple vb forums, the script will only handle one of them, but it's possible to rename it and set it up for each forum.
tamarian
03-12-2004, 11:31 PM
I just realized I can't use this because my mail server is remote - the server does send the emails out, but return bounces go to another mail server.
If you want to, you could automate the transfer of the mail file to the MySQL server. As it's just a flat file, the script should be able to parse through it. and update the database
Erwin
03-12-2004, 11:33 PM
If you want to, you could automate the transfer of the mail file to the MySQL server. As it's just a flat file, the script should be able to parse through it. and update the database
How would I do that? I'm clueless when it comes to email management on my server. :) That's the reason why I host my domains on another server and manage email there.
Erwin
03-12-2004, 11:33 PM
I do need this hack, as I don't verify email, and lots of emails do bounce back.
tamarian
03-14-2004, 01:18 AM
How would I do that? I'm clueless when it comes to email management on my server. :) That's the reason why I host my domains on another server and manage email there.
Here's how I would do it:
Follow step 1 on the mail server.
Follow steps 2, 3, 4 and 5 on the vBulletin server (where the database resides)
Then wirte a small shell script to scp or ftp the bounce mail file from the mail server to the database server. In the vBouncer script, enter the location of the file in the $bouncefile line. When the script is run on the database server, it should pick up the bouncing members from the file.
If you need any help with any of the steps, feel free to PM me.
PranK
03-14-2004, 01:12 PM
Yes, you can run this as a cron job, there should be no problem with that.
re: multiple domain: It should not be a problem, but if you have multiple vb forums, the script will only handle one of them, but it's possible to rename it and set it up for each forum.
ok great, thank you!!
i'll install it when i install VB3 Gold.
d3nnis
03-22-2004, 04:05 AM
if this script can be modify in a way to trace user's registration using invalid email account and immediately deletes away this new registration, that will be even better!
PranK
03-23-2004, 11:51 AM
Any update for VB3 Gold? The code is different (by the looks) and I get bombarded with email! :)
Thanks!
Christian
sabret00the
03-24-2004, 02:42 PM
wow didn't know this was ported to vb3, is their a php version out?
influence
03-25-2004, 06:48 PM
is there any alternative to this? I remember someone made a hack where you can have 2 email address. one for the board in general and the other is for error and so on or bounced emails.
kontrabass
04-02-2004, 12:04 AM
Hmm... Does this need to be updated for VB3 gold? The code in /includes/functions.php doesn't seem to match the instructions...
:)
tamarian
04-05-2004, 09:47 PM
Updated for vB3 gold, use step 2A. The old step 2 for beta is now step 2B
Big Daddy Chemo
04-08-2004, 03:46 PM
What app are you using to modify functions.php? I use Dreamweaver, Notepad, and wordpad but get parse errors on upload.
Chemo
kontrabass
04-08-2004, 09:39 PM
Hmm...:
error:
Can't locate DBI.pm in @INC
I guess I need some soft of perl DBI module or something? Just guessing... ?
Thanks-
tamarian
04-08-2004, 10:15 PM
What app are you using to modify functions.php? I use Dreamweaver, Notepad, and wordpad but get parse errors on upload.
Chemo
I mostly use Quanta and Kate (Linux apps) on the desktop, or vi on the server.
I think many windows users use TextPad, or PHPEdit. Basically any programming editor, and make sure you upload as ASCII, not binary when using FTP.
tamarian
04-08-2004, 10:16 PM
Hmm...:
error:
Can't locate DBI.pm in @INC
I guess I need some soft of perl DBI module or something? Just guessing... ?
Thanks-
Correct :)
kontrabass
04-09-2004, 03:22 PM
Many many thanks for this fantastic hack. No more 500MB bounced email boxes! :D Took me awhile to get the perl DBD module installed correctly (with the correct --cflags and -lib options to point to my mysql source install), but it's working like a charm now.
Big Daddy Chemo
04-12-2004, 06:38 PM
Anyone figure out how to port this for Exim?
influence
04-13-2004, 06:17 PM
if ($vboptions['needfromemail'])
{
@mail($toemail, $subject, $message, trim($header), "-f $vboptions[webmasteremail]");
}
else
{
@mail($toemail, $subject, $message, trim($header));
}
} <-- remove
You need to take that extra code i have in bold out or else this script will give out some sort of functions error
tamarian
04-13-2004, 06:35 PM
if ($vboptions['needfromemail'])
{
@mail($toemail, $subject, $message, trim($header), "-f $vboptions[webmasteremail]");
}
else
{
@mail($toemail, $subject, $message, trim($header));
}
} <-- remove
You need to take that extra code i have in bold out or else this script will give out some sort of functions error
Thanks for catching this :)
First post updated.
Pseudomizer
04-22-2004, 02:32 PM
Hi,
i would like to use this script but only for one reason: I got round about 10 registrations per day and 5 of them use invalid email addresses. :disappointed:
What i would need is a cron job which runs once a day one specific script which checks this bouncing emailaddress and afterwards deletes all invalid accounts from the usergroup "Awaing Email confirmation". :nervous:
Environment:
SuSe Linux 8.2, Perl 5.8.0, latest MySQL and latest Apach 1.x version and latest Qmail version mit POP3-before-SMTP installed.
Any help would be appreciated.
Cheers,
tamarian
04-22-2004, 03:21 PM
Hi,
i would like to use this script but only for one reason: I got round about 10 registrations per day and 5 of them use invalid email addresses. :disappointed:
What i would need is a cron job which runs once a day one specific script which checks this bouncing emailaddress and afterwards deletes all invalid accounts from the usergroup "Awaing Email confirmation". :nervous:
Environment:
SuSe Linux 8.2, Perl 5.8.0, latest MySQL and latest Apach 1.x version and latest Qmail version mit POP3-before-SMTP installed.
Any help would be appreciated.
Cheers,
Should be easy to modify this script to do what you want.
The search can be restricted to only the usergroup awaiting email activation:
Change this qury:
"SELECT userid, username from user where email='$theemail'"
To:
"SELECT userid, username from user where email='$theemail' AND usergroupid=3"
And the unsubscribe query can be replaced with a user deletion query:
Change:
UPDATE subscribethread set emailupdate='$downgrade' where userid='$varname1'"
To:
DELETE from user where userid='$varname1'
This is a rough idea of how it can be done....
Pseudomizer
04-22-2004, 04:39 PM
Ok. Looks not too heavy. But how should i configure your script in terms of the email account ? I have created now an account with your given name and i have defined that all bouncing emails should go there. In your script i have to give the path to his maildirectory. Which is the right one ?
With vpopmail and qmail i have the following structure:
/home/vpopmail/domains/domainname/subscriber_notify/Maildir
In this directory i have 3 subdirectories:
- cur
- new
- tmp
Which directory should i put into your script please ?
Cheers,
tamarian
04-22-2004, 04:50 PM
Which directory should i put into your script please ?
I have not used any of those mail software, so I'm not sure. Hopefully someone reading this who uses vpopmail/qmail can answer this.
I use postfix, and the bounced emails go to /var/spool/mail/boxname
Pseudomizer
04-22-2004, 04:58 PM
I have found the following in a forum:
__________________________________________________ _____________________
Set up a .qmail file for bounces (e.g. .qmail-bounces) and put a pipe to a program inside it, like this:
| /usr/bin/process_bounce.pl
Now when bounces@yourhostname.com receives an email, the script /usr/bin/process_bounce.pl will receive a copy of this email on standard input, so you can extract the relevant parts of it (e.g. the "To" field)
__________________________________________________ ____________________
If i would do this then your script would get the data via standard input and the use of your filedefinition would not be necessary any more. But i guess that your script does not accept any input from standard in yet ?
Cheers,
tamarian
04-22-2004, 05:11 PM
I'm not sure how this would work, due to my lack of knowledge with qmail.
Does qmail use spool files? Check what's there in your /var/spool/mail.
If not, does qmail allow .forward files? If so, have the .forward create a spool file
example of .forward contents
~/home/myuser/mail/bounces
With this, you create your own spool file, and use it in the script. (warning: make sure you regularly clean this file, as bounce spools can get very large, very quickly with many forum users)
These are just off the top of my head, as I don't know how qmail works, I'm a postfix user.
influence
04-22-2004, 07:27 PM
let me be the first to say that this hack dont work.
Hopefully someone can work on an alternative that will work. Not to be rude or anythign but this script dont do nothing. It dont even stop bounce mail. I still get them daily.. the same amount
Pseudomizer
04-23-2004, 10:50 AM
Any comment on this last post from the hack developer ?
Cheers,
tamarian
04-23-2004, 11:01 AM
Any comment on this last post from the hack developer ?
Cheers,
Not really, as there were no specifics, just a statement that it does not work. It's working here for me, and for those who said so in this thread. :)
Pseudomizer
04-23-2004, 11:08 AM
Ok. One more unhappy person because it is not working for him.
Regardless of his problem i can tell you that it did not work for me either but this is due to qmail. I have no idea to set it up to work with qmail and due to this i have to cancel this.
I tried to set up a .qmail file in the mailbox dir of the subriber_notify account to run a specific script but this did never start any script after receiving an email. This is clearly a qmail problem and not related to your hack. If i find out someday how i can run a script on an email receive i will try again to pass the info to your script. Until then i have to wait.
Cheers,
Pseudomizer
04-23-2004, 12:15 PM
Hi,
now i received help from qmail gurus. Now i set up qmail to run a specific script every time an email is received. The problem i have now is the following:
Let's assume a member of our community sends out an email. So for every email one user sends out our database will be queried if an user with this emailadress exists and if this user is in usergroupid 3.
Can you image how many queries this will produce just by sending out an email ?
This is too heavy.
Cheers,
tamarian
04-23-2004, 02:02 PM
Hi,
now i received help from qmail gurus. Now i set up qmail to run a specific script every time an email is received. The problem i have now is the following:
Let's assume a member of our community sends out an email. So for every email one user sends out our database will be queried if an user with this emailadress exists and if this user is in usergroupid 3.
Can you image how many queries this will produce just by sending out an email ?
This is too heavy.
Cheers,
Well, how does your qmail script (which you run on every email) being heavy relate to this hack?
Their are ways to accomplish what you want, the best of which is using the vB cron scripts, to accomplish this pruning of unconfirmed registrations.
But in any case, none of this functionality relates to the vBouncer and what it was designed for (thread unsubscription of members who bounce emails).
So my recommendation is to start a new thread in the hack request forum.
djroketboy
05-31-2004, 05:16 PM
How does this actually work, does it parse each email? because most bounce/failure notices are sent from antother mail server...
tamarian
05-31-2004, 07:43 PM
How does this actually work, does it parse each email? because most bounce/failure notices are sent from antother mail server...
If you use more than one server, check the discussion starting with post #18 :)
djroketboy
05-31-2004, 10:25 PM
If you use more than one server, check the discussion starting with post #18 :)
no, don't use more than one server, we use Exim... any solution ?
tamarian
05-31-2004, 10:32 PM
no, don't use more than one server, we use Exim... any solution ?
Well, I've never used Exim or Qmail, so I hope someone else can help with that. As stated in the first post, I only know sendmail and Postfix.
But you said in the previous post that your email bounces to another server, if so, check the posts from #18.
djroketboy
05-31-2004, 10:36 PM
bleh ignore that.. i was tired.. i misread how it worked... i was thinking it checked the "inbox" but i reads the actual mail spool.... i was thinking that it parses the already bounced emails and not the pre-sent emails....
hence the "mail from other servers" ie. if you bounce a message it comes back from postmaster@aol.com or whatnot....
but i understand how it works now. now just to get it working for exim, and shared servers.
Battle_Ring
07-19-2004, 08:28 PM
i cant figure out how to do this could you please help me set it up
Dennis Olson
08-20-2004, 12:08 PM
Is there syntax for this hack on vB3.0.3?
Theater
08-29-2004, 09:55 PM
Is there syntax for this hack on vB3.0.3?
* Theater seconds that.
kontrabass
09-08-2004, 01:34 PM
3rd! Please, an update? This hack is invaluable to me! :)
ScottA
09-08-2004, 03:07 PM
3rd! Please, an update? This hack is invaluable to me! :)
I got this running on 3.0.3. IIRC, what you need to do is open mail.php and look for this:
function Mail($toemail, $subject, $message, $headers, $fromemail, $minusf = false)
{
if ($minusf)
{
$this->success = @mail($toemail, $subject, $message, trim($headers), "-f $fromemail");
}
else
{
$this->success = @mail($toemail, $subject, $message, trim($headers));
}
}
And change it to this:
function Mail($toemail, $subject, $message, $headers, $fromemail, $minusf = false)
{
if ($minusf)
{
$this->success = @mail($toemail, $subject, $message, trim($headers), "-f subscriber_notify@yourdomain.com");
}
else
{
$this->success = @mail($toemail, $subject, $message, trim($headers), "-f subscriber_notify@yourdomain.com");
}
}
tamarian
09-08-2004, 03:22 PM
Thanks ScottA. I haven't upgraded to 3.0.3 yet, so I've put your instructions into the first post.
rinkrat
10-12-2004, 05:05 PM
What does this mean:
[root@www cgi-bin]# ./vbouncer.pl
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at (eval 1) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: ExampleP, Pg, Proxy.
at ./vbouncer.pl line 80
JamesFrost
01-01-2005, 11:55 AM
Incredible idea for a script - I've been starting to do this manually for the last few weeks to try and cut down on the 100's of messages I've been getting. I was starting to think about automating this, but had no idea where to start.
can someone just clarify what this means: (I presume I can just shove it in any directory that's not in the Apache tree??)
Copy vBouncer.pl.txt to a directory on your server above apache level.
I'll probably move users into a 'moved on' usergroup automatically as well, as I don't want people posting on my board with an invalid address. I've already got this usergroup setup, together with an automatic warning at the top indicating they have been posting with an invalid e-mail address, and asking them to correct it. Members don't seem to mind, and are generally apologetic about this. It looks like automating this will be fairly simple looking at your script.
tamarian
01-01-2005, 02:00 PM
What does this mean:
[root@www cgi-bin]# ./vbouncer.pl
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at (eval 1) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: ExampleP, Pg, Proxy.
at ./vbouncer.pl line 80
This means you're Perl is missing some required libraries, like DBD::MySQL. You might want to install them using CPAN.
tamarian
01-01-2005, 02:03 PM
Copy vBouncer.pl.txt to a directory on your server above apache level.
can someone just clarify what this means: (I presume I can just shove it in any directory that's not in the Apache tree??)
Correct. It's best to not have it accessable through a browser.
JamesFrost
01-02-2005, 11:08 AM
Correct. It's best to not have it accessable through a browser.
Script works brilliantly. Have added the following sql updates which might be useful to others :
Find :
my $qry3 = db_execute("UPDATE subscribethread set emailupdate='$downgrade' where userid='$varname1'");
After, add :
my $qry4 = db_execute("UPDATE subscribeforum set emailupdate='$downgrade' where userid='$varname1'");
my $qry5 = db_execute("UPDATE user set usergroupid=19 where userid='$varname1' and usergroupid=2");
qry4 cleans up any subscribed forums (instead of just subscribed threads)
qry5 moves any user who's e-mails bounce that is currently in usergroup 2 into usergroup 19.
Now I'm off to play around with Perl, and perhaps try to do some automatic e-mail processing routines (such as e-mail messages triggering forum posts! ) - What fun. :D
This sounds cool, and is just what I have been thinking about, well almost. Problem is, I have a paying user group, and I don't want them downgraded to another group. Also will users be upgraded to their previous user group after they fix their email addy?
JamesFrost
02-25-2005, 07:17 AM
This sounds cool, and is just what I have been thinking about, well almost. Problem is, I have a paying user group, and I don't want them downgraded to another group. Also will users be upgraded to their previous user group after they fix their email addy?
qry5 above will do the downgrade on a per group basis, so wont downgrade your paying group if you dont want it to.
You cant really tell when someone fixes their e-mail, as no messages will be bounced - this would need to be done manually.
T3MEDIA
03-13-2005, 08:42 PM
to scarry to install.
Lionel
03-29-2005, 05:54 PM
Can this be made instead to change "receive emails" from other members and admin? I am getting a load of email back from PM undelivered or other things.
tamarian
06-21-2005, 07:10 PM
There's a new PHP version of vBouncer with Admin panel access for vB 3.5, check it out:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=83486
kmike
06-22-2005, 07:29 AM
Are these code changes of the mail functions really needed? Can't we simply set webmaster's email to subscriber-notify@domain.com in vB's options?
tamarian
06-22-2005, 11:31 AM
Are these code changes of the mail functions really needed? Can't we simply set webmaster's email to subscriber-notify@domain.com in vB's options?
No The email address must reside on the server and not be POP'ed or downloaded by email clients, like the webmaster email. Otherwise it won't work, since you have not "trapped" the bounce notices. Otherwise you webmaster account will be flooded by bounced emails, and vBouncer won't find them.
kmike
06-23-2005, 04:52 AM
Well, we're not using vB contact form, and it is the only place where webmaster's email is being used apart from sending various notifications to members. So for us it's safe to change webmaster email and leave the code alone.
tamarian
06-25-2005, 09:01 PM
Well, we're not using vB contact form, and it is the only place where webmaster's email is being used apart from sending various notifications to members. So for us it's safe to change webmaster email and leave the code alone.
It's still a bad idea, IMHO. If you have ever used the webmaster email before, chances are it gets a lot of spam. Getting a lot of spam into the bouncer spool means a lot of queries, since it will try to search for users matching those emails.
kmike
06-26-2005, 03:29 AM
Every address set as webmaster's will get a lot of viruses and spam sooner or later.
BTW, I'm writing the script implementing the same idea from scratch, it will parse bounces properly using Mail::DeliveryStatus::BounceParser module. The current script is just too trigger happy on various autoresponders.
tamarian
06-26-2005, 03:54 AM
Every address set as webmaster's will get a lot of viruses and spam sooner or later.
BTW, I'm writing the script implementing the same idea from scratch, it will parse bounces properly using Mail::DeliveryStatus::BounceParser module. The current script is just too trigger happy on various autoresponders.
Not the new PHP version :)
kmike
06-26-2005, 11:25 AM
New version doesn't get along with vB 3.0.7 which is current stable version 99.9% of sites are using.
Also, IMHO it simply isn't sophisticated enough (yet). It doesn't handle bounces from the zillion of broken MTA's like qmail or MS Exchange which tend to spit DSN's in a plain text, completely omitting Final-Recipient and other handy headers. So new version has some room for improvement, too ;)
tamarian
06-26-2005, 11:42 AM
New version doesn't get along with vB 3.0.7 which is current stable version 99.9% of sites are using.
Also, IMHO it simply isn't sophisticated enough (yet). It doesn't handle bounces from the zillion of broken MTA's like qmail or MS Exchange which tend to spit DSN's in a plain text, completely omitting Final-Recipient and other handy headers. So new version has some room for improvement, too ;)
I've posted a request for help from those with Windows, QMail and Exim, as indicated in the vB3.5. https://vborg.vbsupport.ru/showthread.php?t=83407
QMail does send Final-Recipent headers, according to the samples I got. If you know otherwise, why not share the information? As stated, I know Postfix and Sendmail, and to support other systems, I'll need some cooperation from those who know those other systems.
A 3.0.7 version should be out tonight.
tamarian
06-26-2005, 04:06 PM
As promised, a new version in PHP is now available for vB 3.0.7
https://vborg.vbsupport.ru/showthread.php?s=&threadid=91119
kmike
06-27-2005, 04:50 AM
My point is, there're too many MTAs sending out non-RFC compliant DSN's out there. For some insight, look at the Mail::DeliveryStatus::BounceParser perl module source. I guess eventually you'll write something similar using PHP ;)
Here's qmail bounce I was speaking of:
From MAILER-DAEMON Wed Jun 22 08:27:25 2005
Return-Path: <MAILER-DAEMON>
Received: from mxavas2.aruba.it (mx3.aruba.it [62.149.128.132] (may be forged))
by xxxxxxxxxxxx with SMTP id j5MDR182012646
for xxxxxxxxxxxxxxx; Wed, 22 Jun 2005 08:27:07 -0500
Message-Id: xxxxxxxxxxxx
Received: (qmail 2289 invoked for bounce); 22 Jun 2005 13:26:56 -0000
Date: 22 Jun 2005 13:26:56 -0000
From: MAILER-DAEMON@mxavas2.aruba.it
To: xxxxxxxxxx
Subject: failure notice
Hi. This is the qmail-send program at mxavas2.aruba.it.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
<lmasali@demo.eu.blackberry.net>:
193.109.81.50 does not like recipient.
Remote host said: 550 5.2.1 <lmasali@demo.eu.blackberry.net>... Mailbox disabled
for this recipient
Giving up on 193.109.81.50.
--- Below this line is a copy of the message.
Return-Path: xxxxxxxxxxx
.....................
Here's one from MS exchange:
From MAILER-DAEMON Wed Jun 22 13:23:23 2005
Return-Path: <MAILER-DAEMON>
Received: ...........
Received: from huey.opc.bbhc ([10.2.18.30])
by txuspipas004.unitedsurgical.com (SMSSMTP 4.1.4.30) with SMTP id M20050622131
85703364
for xxxxxxxxxx; Wed, 22 Jun 2005 13:18:58 -0500
Received: by huey.unitedsurgical.com with Internet Mail Service (5.5.2653.19)
id <M04CR85P>; Wed, 22 Jun 2005 13:19:15 -0500
Message-ID: <514220978E9FD211B11000805F0D0A79217BF258@huey.unit edsurgical.com>
From: System Administrator <postmaster@ortholink.net>
To: xxxxxxxxxx
Subject: Undeliverable: Reply to post 'Mountain Models Sportana Biplane'
Date: Wed, 22 Jun 2005 13:19:14 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
X-MS-Embedded-Report:
Content-Type: Text/Plain
Your message
To: stahlmangc@ortholink.net
Subject: Reply to post 'Mountain Models Sportana Biplane'
Sent: Wed, 22 Jun 2005 13:12:17 -0500
did not reach the following recipient(s):
stahlmangc@ortholink.net on Wed, 22 Jun 2005 13:19:10 -0500
The recipient name is not recognized
The MTS-ID of the original message is: c=us;a=
;p=ortholink;l=HUEY0506221819M04CR853
MSEXCH:IMS:Ortholink:Information Technologies:HUEY 0 (000C05A6) Unknown
Recipient
Also, some MTAs send X-Failed-Recipients header instead of standard one.
tamarian
06-27-2005, 11:40 AM
Good luck with re-writing the script.
My request for help still stands, if anyone here has a decent sized sample for their server's bounced emails, please send them my way. If I can't scan/test them, I won't be able to support them. Currently can identify Postfix, Sendmail, QMail and Exim based on samples files I received. Windows still a mystery.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.