(SL) Force users to change email > Invisionize.eu - IP.Board (IPB) News
Kanał Rss Kanał Rss
Kanał Atom Kanał Atom

(SL) Force users to change email

wersja drukowalna wersja Microsoft Word wersja HTML

Many users has bad email: account deleted, user suspended, no space in mailbox etc. Your mails to this users back to you with errors.

With this hook user MUST be to change his email and confirm it. Letters to selected users did not sent and you have no errors.

 

How to get users list with bad emails?

1. Manually: see your mailer-daemon letters

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.

wto, 24 styczeń 2017