QmailtoasterMain Page | About | Help | FAQ | Special pages | Log in

Printable version | Disclaimers | Privacy policy

How to set up a mail list so that you can email ALL of your domains at one time

From Qmailtoaster

Have you ever wanted to email all the user accounts on all domains on your server at the SAME time (server downtime notifications, etc)? Now you can and the best part is that it is very simple to do!

The first thing you need to do is to create a mailinglist on your default domain (does not have to be the default domain, however usually this is your domain anyway). I would suggest making the name of the list something obtuse (not easy to guess so as to prevent spam) and also set it so that only moderators can post (another spam stopping trick).

Once you have set up your mailing list, copy the script below into a file called "list-create.sh". Put this file into your /etc/cron.daily directory

# vi /etc/cron.daily/list-create.sh
# script name: list-create.sh
# function: delete member and re-subscribe existing email accounts on all domain
# in your server into a mailing list for public announcement
# 06/15/2010 - Scott Hughes <scott@renshawauto.net>
# Initial creation of script to create an import text file of all
# users on system and then import it into an already created
# ezmlm mailing list.
# 04/16/2011 - Scott Hughes <scott@renshawauto.net>
# Added the complete removal of list subscribers before list
# generation to take care of deleted accounts. Thanks to Pak Ogah
# for the idea.
# 04/19/2011 - PakOgah <PakOgah@pala.bo-tak.info>
# Use variables for mailing list name
# Name of your mailinglist
# Do not edit codes below:
echo "All user mailing list generation..."
# Separate domain and listname
# Deleting current subscribers from mailing list
rm -f /home/vpopmail/domains/$domainname/$listname/subscribers/*
# Generate mailing list import file
#/home/vpopmail/bin/vpopbull -n -V > ~/alluserslist.txt
# Import List into ezmlm mailing list
~vpopmail/bin/vpopbull -n -V | ezmlm-sub ~vpopmail/domains/$domainname/$listname
exit 0

Then change the permissions so that it is executable:

#chmod +x /etc/cron.daily/list-create.sh

That's all you have to do. When the script runs it will first delete all the current subscribers and then re-create them from the domains and users on your server.


Retrieved from "http://wiki.qmailtoaster.com/index.php/How_to_set_up_a_mail_list_so_that_you_can_email_ALL_of_your_domains_at_one_time"

This page has been accessed 5,436 times. This page was last modified on 19 April 2011, at 04:42. Content is available under GNU Free Documentation License 1.2.


Main page
Community portal
Current events
Recent changes
Random page
View source
Editing help
This page
Discuss this page
New section
Printable version
Page history
What links here
Related changes
My pages
Log in / create account
Special pages
New pages
File list