{"id":523,"date":"2009-07-16T16:37:17","date_gmt":"2009-07-16T09:37:17","guid":{"rendered":"http:\/\/adityo.blog.binusian.org\/?p=523"},"modified":"2009-07-16T16:50:12","modified_gmt":"2009-07-16T09:50:12","slug":"script-to-add-many-user-email-address-on-qmail-vpopmail","status":"publish","type":"post","link":"https:\/\/adityo.blog.binusian.org\/?p=523","title":{"rendered":"Script to add many user email address on qmail vpopmail"},"content":{"rendered":"<p>If you have <a href=\"http:\/\/sylvestre.ledru.info\/howto\/howto_qmail_vpopmail.php\" target=\"_blank\">qmail vpopmail mail system<\/a> and you want to add a new user and the amount of the new user is huge here is some script to add them. I assume you have the new email address list on mailinglist.txt( at the end of the list makesure you don&#8217;t have any space because it will create a blank email address on your qmail system)<\/p>\n<p><code><br \/>\n&lt; ?php<br \/>\n$handle = fopen(\"mailinglist.txt\", \"r\");<br \/>\n$counter=0;<br \/>\nwhile (!feof($handle)) {<br \/>\n$userinfo = fscanf($handle, \"%[a-zA-Z0-9._ ],%[a-zA-Z0-9. ],%[a-zA-Z0-9. ]\" );<br \/>\nif ($userinfo) {<br \/>\nlist ($email, $name, $password) = $userinfo;<br \/>\n$counter++;<br \/>\n$email=trim(strtolower($email));<br \/>\n$name=trim($name);<br \/>\n$password=trim($password);<br \/>\necho \"username : $email@test.org password : $password  name : $name \\n\";<br \/>\nexec(\"\/home\/vpopmail\/bin\/vadduser $email@test.org $password -c '$name'\");<br \/>\nexec(\"\/usr\/local\/bin\/ezmlm\/ezmlm-sub \/home\/vpopmail\/domains\/test.org\/mailinglistname\/ $email@test.org\"); #to add user to your mailinglist<br \/>\n}<br \/>\n$userinfo=NULL;<br \/>\n}<br \/>\nfclose($handle);<br \/>\necho \"Adding $counter users\";<br \/>\n?&gt;<br \/>\n<\/code><br \/>\nsave it as qmail.php and run it on your shell<br \/>\n<code># php qmail.php<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have qmail vpopmail mail system and you want to add a new user and the amount of the new user is huge here is some script to add them. I assume you have the new email address list on mailinglist.txt( at the end of the list makesure you don&#8217;t have any space because [&hellip;]<\/p>\n","protected":false},"author":386,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-523","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/posts\/523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/users\/386"}],"replies":[{"embeddable":true,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=523"}],"version-history":[{"count":3,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/posts\/523\/revisions"}],"predecessor-version":[{"id":525,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/posts\/523\/revisions\/525"}],"wp:attachment":[{"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}