Jump to content

(SL) Email actions


Slimer

Recommended Posts

Posted

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.

 

pic_8.jpgpic_14.thumb.jpg.b7eb6112701250855458630b57788dbb.jpgpic_9.jpg

pic_10.jpgpic_7.jpg

 

Posted
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?

Posted
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?

Posted
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.

Posted

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.)

Posted
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.

Posted
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?

Posted
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.

Posted

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>

Posted
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).

Posted
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.

Posted
16 hours ago, AlexWebsites said:

but this one does it automatically by the bounce back?

No, you must insert bad emails in config manually.

Posted
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?

Posted
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.

Posted
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.

 

Posted
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?

Posted

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?

Posted
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.

Posted
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?

Posted
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.

  • 2 weeks later...
Posted

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.

Posted
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.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...