zro@redtv Posted March 8, 2005 Posted March 8, 2005 the wonderful life saver of a patch: patch-20050124-mail-spam.pl does a great job of stoping spammer hijacking, but it also kills the Functionmality of NOTIFICATIONS.... to work around this i want to allow only one address to be notified, but im not sure how to ?alter the patch? (or really what should be done)... patch: >#!/usr/bin/perl local $^W = 0; *MT::Util::is_valid_email = sub { my($addr) = @_; return 0 if $addr =~ /[\n\r]/; if($addr =~ /\s*([^\" \t\n\r]+@[^ <>\t\n\r]+\.[^ <>\t\n\r][^ <>\t\n\r]+)\s*/) { return $1; } else { return 0; } }; use MT::Mail; my $original_send = \&MT::Mail::send; my $my_send = sub { my $class = shift; my($hdrs, $body) = @_; foreach my $h (keys %$hdrs) { $hdrs->{$h} =~ y/\n\r/ /; } $original_send->($class, $hdrs, $body); }; *MT::Mail::send = $my_send if $original_send ne $my_send; 1; now, when notification is sent only the BLOG OWNER is notified.... i would just change the BLOG owner (to one which had the mail address iwant to notify).... but im not sure how. and, really Id rather just allow for specified addys. Is this at all possible / permissable? thanks so much! Quote
TCH-Bruce Posted March 8, 2005 Posted March 8, 2005 Go into your MT and edit your Author profile. Change the email address to where you want to receive notifications. Quote
zro@redtv Posted March 8, 2005 Author Posted March 8, 2005 Go into your MT and edit your Author profile. Change the email address to where you want to receive notifications. <{POST_SNAPBACK}> the problem is that if i change my primary user accounts mail address in MT, any author links that goto my mail will end up going to my list serv... If i am to fix it this way i first need to change the "OWNER" to a seperate one other than my primary acct. how do i do this? No where do i see a "is owner of this blog:" or anything... i assume it is whoever creadted it, but is there a way to swittch it? I am comfortable using phpMyadmin and would gladly change it in the sql db, but i cant seem to find the bit there either. Where is this stored? (thanks for speedy response !!) Quote
TCH-Bruce Posted March 8, 2005 Posted March 8, 2005 Sorry if that won't do it for you. I'm out of options. Quote
zro@redtv Posted March 8, 2005 Author Posted March 8, 2005 Go into your MT and edit your Author profile. Change the email address to where you want to receive notifications. <{POST_SNAPBACK}> the problem is that if i change my primary user accounts mail address in MT, any author links that goto my mail will end up going to my list serv... If i am to fix it this way i first need to change the "OWNER" to a seperate one other than my primary acct. how do i do this? No where do i see a "is owner of this blog:" or anything... i assume it is whoever creadted it, but is there a way to swittch it? I am comfortable using phpMyadmin and would gladly change it in the sql db, but i cant seem to find the bit there either. Where is this stored? (thanks for speedy response !!) <{POST_SNAPBACK}> well thats cool thanks, anyway! im just so confused! Where is the OWNER of a blog denoted! ...and why can't i notify for other authors posts even if i am the owner?? hmm.... ill keep @ it. Quote
TCH-Bruce Posted March 8, 2005 Posted March 8, 2005 As far as I know the original author is the owner of the blog. Before switching to WordPress we had 4 blogs under a single MT installation. Each blog had an author. The email address for the author is where the notifications went. That was the email address I suggested changing in when you edit the profile for the blog. Quote
zro@redtv Posted March 8, 2005 Author Posted March 8, 2005 right right. I follow you. my situation is as follows. I have a user acct. it is the origional one. and the one i created the blog w/. there for the "OWNER". If i change the email address associated w/ it. all instances of my <MTAuthorEmailLink> will change as well. I want my user account (the current owner) to be associated w/ my personal email, and I want notifications sent to a MailMan List-serv (the adress of which i would put as the NEW "owner"'s email address and then not post w/ that user.) hope this clarifies things. (also: I believe that the problem lies in the PATCH... but, my perl is a little rusty... does anyone know of documented outline of the patch? a "Patch Explaind"...if you will? I follow it a little, but not enough to identify the problem. if ther was some inline commented documentation, im sure it help.... i get it rules out line breaks as valid mail, but what else is goin on here.... puts headers inline? doesnt seem like these 2 things should stop notify... unless its because notify passes the list with \n line breaks, in which case shouldn't i be able to modify the perl to allow a certain address on a new line.? ) Quote
TweezerMan Posted March 8, 2005 Posted March 8, 2005 I'm not sure I am 100% clear on what you're trying to do, but there's some misunderstandings here I may be able to clear up. There is no such thing in MT as a "blog owner". Blogs are not owned by anyone. Authors in the MT system are granted permission to do various things with blogs, but no author is ever designated as "owner" of any blog (regardless whether that author created the blog or not). The entry notification that you see mailed out is the one that is mailed to the entry's author. When the entry notification e-mail is sent out, MT looks up the author for that entry, grabs the e-mail address stored for that author, and sticks that in both the "To:" and "From:" fields of the notification e-mail. If you want a notification to be sent elsewhere, I believe you need to subscribe the e-mail address to receive notifications. The process for doing so is documented in the Notifications section of the MT manual. You'll need to set up at least a temporary page with the subscription form to subscribe the e-mail address. After subscribing the e-mail address, you can delete the page if you don't want to keep it around. Once the e-mail address is subscribed, then after posting a new entry, you'll be able to send the notification by using the "Send a Notification" section at the bottom of the "Edit Entry" page. From what you've described, the patch is functioning exactly as it was designed to - to prevent someone from injecting addtional e-mail addresses into an e-mail being sent from the MT system. Hope this helps... Quote
zro@redtv Posted March 8, 2005 Author Posted March 8, 2005 AWESOME! ...well....kinnda. the OWNER confusion is cleared up. ...but that kinnda sucks. see i was confusing the functionality of the "notify entry author" action w/ this mythical "notify blog owner" concept. i have been adding users to the notify list thru the notify panel in mt.cgi ill try the form method, but i dont see how thatd be the problem..... i think the prob is the patch. ill post back after ive tried the form method. I'm not sure I am 100% clear on what you're trying to do, -im trying to move the notify functionality to mailman list-serv rather than leave the responsibilty w/ mt. I want to pass MT notification to a mailing list powered by mailman. Quote
zro@redtv Posted March 8, 2005 Author Posted March 8, 2005 tried using the form. adds addy to list alright... but still, only entry author recieves mail Quote
TweezerMan Posted March 8, 2005 Posted March 8, 2005 i have been adding users to the notify list thru the notify panel in mt.cgiill try the form method, but i dont see how thatd be the problem..... i think the prob is the patch. I just looked at the Notifications page in mt.cgi - it appears to do the same thing as the form I mentioned. I'm not real familiar with the Notification functions in MT as I don't use them at all and have never used them. -im trying to move the notify functionality to mailman list-serv rather than leave the responsibilty w/ mt. I want to pass MT notification to a mailing list powered by mailman. The way MT is set up, I believe that you'd have to send a notification e-mail to the list-serv. The MT code always sends a copy of the notification e-mail to the entry author, so the author can see what is being mailed out. Quote
TCH-Tim Posted March 8, 2005 Posted March 8, 2005 You've mentioned several times in here that you think the patch is the problem. Is it safe to assume then that you have already tried rolling back the patch to see if the notifications work again? Hate to bark up the wrong tree. Quote
zro@redtv Posted March 8, 2005 Author Posted March 8, 2005 right right. thats what im trying to do. have mt NOTIFY list@server.com instead of a bunch of users, and then have the list send the notifies out. the problem is that with the patch installed ONLY the author can b notified. NO OTHER NOTIFICATIONS can be sent out save the author... see here: http://www.movabletype.org/support/index.p...te=notification Quote
zro@redtv Posted March 8, 2005 Author Posted March 8, 2005 o yea. I did that 4ever ago, sorry... prolly shoulda mentiond that. it works without the patch installed. i also tried a few mods on the patch, but again.... my perl is a bit rusty Quote
TweezerMan Posted March 8, 2005 Posted March 8, 2005 As noted in this post from a thread you've posted in today, it is apparently a known bug in MT 3.15 and the plugin patch provided by Six Apart. It is supposed to be fixed in the next release of MT (v3.16), but the release date is currently unknown. Quote
zro@redtv Posted March 8, 2005 Author Posted March 8, 2005 (edited) OP! sorry.... must have skimmed over shellys post there... didnt realize that was the word of 6apart... figurd it was just another frusterated user. i still think theres gotta b a work around, so ill keep tryin... thanks fr the help! ...also thats not the ver. im using.... There is a bug in the notifications in version 3.15; this is expected to be resolved in the next release. i've just got the legacy patch (code above) Edited March 8, 2005 by zro@redtv Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.