Slimer Posted February 6, 2017 Posted February 6, 2017 Many users has bad email: account deleted, user suspended, no space in mailbox etc. Your mails to this users back to you with errors. This is advanced version of (SL) Force users to change email Features: Make users unapproved until they did not change their email address To users with bad emails did not send any emails Approving emails by users Move users to selected group Log all actions All you need for work is bad emails list. How to get users list with bad emails? 1. Manually: see your mailer-daemon letters 2. You can use special services 2. Auto: in mail error.log i am doing like this: #BAD EMAILS cat mail.log|grep "user is terminated\|No such user\|account is disabled\|The email account that you tried to reach does not exist" >mail.log.badmails cat mail.log.badmails|cut -d " " -f1,2|uniq -c >mail.log.badmails.stats sed -E "s/[[:space:]]+/ /g" mail.log.badmails|cut -d " " -f7|sort|uniq -c|sort -n -r|sed 's/to=<//g'|sed 's/>,//g'|sed 's/ //g' >mail.log.badmails.to.stats sed -E "s/[[:space:]]+/ /g" mail.log.badmails|cut -d " " -f7|sort|uniq -c|sort -n -r|sed 's/.*to=<//g'|sed 's/>,//g' >mail.log.badmails.list You get file mail.log.badmails.list where all your bad mails listed. Just copy-paste into config. Thats all.
NoGi Posted February 9, 2017 Posted February 9, 2017 How does this work if you use a 3rd party like SparkPost to do all the emails? My local logs wouldn't have any errors?
AlexWebsites Posted February 11, 2017 Posted February 11, 2017 Can you change some of the language you are using?
Slimer Posted February 14, 2017 Author Posted February 14, 2017 On 09.02.2017 at 0:46 AM, NoGi said: How does this work if you use a 3rd party like SparkPost to do all the emails? My local logs wouldn't have any errors? No matter which system you are using. This is just stop mailing to users with bad emails. On 12.02.2017 at 1:21 AM, AlexWebsites said: Can you change some of the language you are using? What you want to change?
NoGi Posted February 14, 2017 Posted February 14, 2017 1 minute ago, Slimer said: No matter which system you are using. This is just stop mailing to users with bad emails. Sorry, this is the part I am having trouble understanding. How does it get the bad email list if emails are sent via 3rd party gateway like SparkPost?
Slimer Posted February 14, 2017 Author Posted February 14, 2017 3 hours ago, NoGi said: How does it get the bad email list if emails are sent via 3rd party gateway like SparkPost This is question to sparkpost support. May be they have some kind of export their logs? I don't know and did not use this service.
Dave Baker Posted February 14, 2017 Posted February 14, 2017 Slimer, when you say "To users with bad emails did not send any emails" do you mean that the plugin is stopping the Invision Forums software from generating any emails to the users whose email addresses were copy-pasted into config? For example, a user with a bad email address might be "following" a particular forum and specified that he wants a single email each day with all new content in that forum from that day. Does your plugin stop that email from going out? (This would be a good thing.)
Slimer Posted February 15, 2017 Author Posted February 15, 2017 11 hours ago, Dave Baker said: Does your plugin stop that email from going out? Yes, it stops all outgoing emails for that users. But in this plugin you do not need to have this addresses in config (like in Force users to change email). Once you run it - users marks as unapproved and all emails to this users stops sending.
AlexWebsites Posted February 15, 2017 Posted February 15, 2017 5 hours ago, Slimer said: Yes, it stops all outgoing emails for that users. But in this plugin you do not need to have this addresses in config (like in Force users to change email). Once you run it - users marks as unapproved and all emails to this users stops sending. How does it automatically mark them? I'm using Amazon SES SMTP currently. I understand about the force users plugin and having to enter a list, but this one does it automatically by the bounce back?
AlexWebsites Posted February 15, 2017 Posted February 15, 2017 On 2/14/2017 at 6:16 AM, Slimer said: What you want to change? This phrase for instance: For working with our site you must use only working email address! I would want to change it to something like: To continue your membership, please supply a valid email address.
Dave Baker Posted February 15, 2017 Posted February 15, 2017 AlexWebsites, to change that phrase you want to use the Admin Control Panel to change and resave a particular template. Here are the contents of the default template for version 1.0.0 of the plugin ( Admin CP -> Customization -> Themes -> </> -> templates -> core -> global -> plugins -> notValidated3 ): <section class='ipsType_center ipsPad'> <br><br> <i class='ipsType_huge fa fa-envelope'></i> <h1 class='ipsType_veryLarge'>Change your email!</h1> <p class='ipsType_large'> Your e-mail <b>{{$mail = \IPS\Member::loggedIn()->email;}}{$mail}</b> not working! </p> <p class='ipsType_large'> For working with our site you must use only working email address! </p> <hr class='ipsHr'> <p class='ipsType_normal'> <a href='{url="app=core&module=system&controller=register&do=changeEmail" seoTemplate="register"}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title='{lang="reg_change_email"}' data-ipsDialog-modal='true' class='ipsButton ipsButton_light ipsButton_verySmall'>{lang="reg_change_email"}</a> <a href='{url="app=core&module=system&controller=login&do=logout" csrf="true" seoTemplate="logout"}' class='ipsButton ipsButton_light ipsButton_verySmall'>{lang="sign_out"}</a> </p> </section> So you'd want to change "For working with our site you must use only working email address!" to be anything else you'd prefer, and then click the Save button. I decided to soften some of the other language, too. Here is my version of the template: <section class='ipsPad'> <br> <br> <i class='ipsType_huge fa fa-envelope'></i> <h1 class='ipsType_veryLarge'>Please Change Your Email Address</h1> <p class='ipsType_large'> Email to this address is undeliverable: <br><b>{{$mail = \IPS\Member::loggedIn()->email;}}{$mail}</b> </p> <p class='ipsType_large'> A working email address is required before you can sign in as a registered member. Please click on the button below to change to a working email address. </p> <p class='ipsType_normal'> (We never disclose your email address or send marketing materials. Your email address is needed in case we need to contact you, or in case you choose to "follow" a particular topic or forum.) </p> <hr class='ipsHr'> <p class='ipsType_normal'> <a href='{url="app=core&module=system&controller=register&do=changeEmail" seoTemplate="register"}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title='{lang="reg_change_email"}' data-ipsDialog-modal='true' class='ipsButton ipsButton_light ipsButton_verySmall'>{lang="reg_change_email"}</a> <a href='{url="app=core&module=system&controller=login&do=logout" csrf="true" seoTemplate="logout"}' class='ipsButton ipsButton_light ipsButton_verySmall'>{lang="sign_out"}</a> </p> </section>
Dave Baker Posted February 15, 2017 Posted February 15, 2017 7 hours ago, Slimer said: Yes, it stops all outgoing emails for that users. Wonderful! Thanks! This is the perfect way to stop notification emails that otherwise would continue to go out to the non-working email addresses. The notification emails (when someone posts a reply into a topic that the registered user is following, for example) can cause penalties against my site when Cisco or other anti-spam monitoring services detect that my site is sending emails to non-working email addresses at their corporate customers (usually because the registered user is no longer employed by their corporate customer).
Slimer Posted February 16, 2017 Author Posted February 16, 2017 16 hours ago, AlexWebsites said: I would want to change it to something like: To continue your membership, please supply a valid email address. Easyest way - is change template. See @Dave Baker answer.
Slimer Posted February 16, 2017 Author Posted February 16, 2017 16 hours ago, AlexWebsites said: but this one does it automatically by the bounce back? No, you must insert bad emails in config manually.
AlexWebsites Posted February 17, 2017 Posted February 17, 2017 20 hours ago, Slimer said: No, you must insert bad emails in config manually. So this difference between both your apps is that the enhanced one puts them in a user group or puts them into the unverified user group as if they first registered? Does it move them back after they verify their new email? I am using a newsletter app from Headstand, is anyone using this with that and will it prevent outgoing emails with that app also or just default bulk and internal IPS mail?
Slimer Posted February 17, 2017 Author Posted February 17, 2017 3 hours ago, AlexWebsites said: So this difference between both your apps is that the enhanced one puts them in a user group or puts them into the unverified user group as if they first registered? No, as if they change email. And this one do it for all addresses in config then you press "Start". First one do it when member logging in. 3 hours ago, AlexWebsites said: Does it move them back after they verify their new email? I'm working on this feature. 3 hours ago, AlexWebsites said: I am using a newsletter app from Headstand, is anyone using this with that and will it prevent outgoing emails with that app also or just default bulk and internal IPS mail? If this app using build in IPS mail send, then it will prevent all outgoing emails.
AlexWebsites Posted February 19, 2017 Posted February 19, 2017 On 2/17/2017 at 1:36 AM, Slimer said: No, as if they change email. And this one do it for all addresses in config then you press "Start". First one do it when member logging in. I'm working on this feature. If this app using build in IPS mail send, then it will prevent all outgoing emails. OK thanks. The developer of the newsletter app is using built in IPS mail functions.
AlexWebsites Posted February 19, 2017 Posted February 19, 2017 On 2/17/2017 at 1:36 AM, Slimer said: No, as if they change email. And this one do it for all addresses in config then you press "Start". First one do it when member logging in. So the first one will allow emails to send until they login? If they never login it will keep sending to bad emails?
Slimer Posted February 19, 2017 Author Posted February 19, 2017 4 hours ago, AlexWebsites said: So the first one will allow emails to send until they login? If they never login it will keep sending to bad emails? In (SL) Force users to change email emails not sending to addresses listed in config.
Adam_S Posted February 20, 2017 Posted February 20, 2017 I'm sorry, how do i enable this to work automatically. I've installed it, but its not reading the error.log and picking up on bad email addresses and marking them to be confirmed. It says add it to config, but what config and where?
Slimer Posted February 20, 2017 Author Posted February 20, 2017 2 hours ago, Adam_S said: It says add it to config, but what config and where? Admin CP - Plugins - (SL) Email actions - Config button You must insert in config bad emails manually (see screenshots). You can grab it from your mail.log with my script from description.
AlexWebsites Posted February 22, 2017 Posted February 22, 2017 On 2/20/2017 at 1:49 AM, Slimer said: Admin CP - Plugins - (SL) Email actions - Config button You must insert in config bad emails manually (see screenshots). You can grab it from your mail.log with my script from description. How are you running that script, from command line or php, sh file?
Slimer Posted February 22, 2017 Author Posted February 22, 2017 1 minute ago, AlexWebsites said: How are you running that script, from command line or php, sh file? it is bash script. you must run it on your system.
AlexWebsites Posted March 8, 2017 Posted March 8, 2017 Looks like that code is for an entire server. If you are on a hosted solution, you may not be able to run that. I run a server with multiple accounts, so the output would be for the entire server's emails.
Slimer Posted March 9, 2017 Author Posted March 9, 2017 18 hours ago, AlexWebsites said: Looks like that code is for an entire server. If you are on a hosted solution, you may not be able to run that. I run a server with multiple accounts, so the output would be for the entire server's emails. You can apply this to your site's mail.log If you have entire server log - this is not problem too. Actions completed for your users emails only.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.