[BlueOnyx:24140] Re: *bump* mail directly to all users of a domain

Michael Stauber mstauber at blueonyx.it
Wed Jul 29 21:02:01 -05 2020


Hi Meaulnes,

> is there a possibility for an admin to send an e-mail directly, or
> internally, to all users mboxes? Quasi inject the message into the mbox
> without using the Internet?
Yes. Use the GUI and on one of the Vsites on this box create the user
"mailall".

Once he is created, go to that user "mailall" and in the "Basic
Settings" tab tick the checkbox "Email Forwarding" "Enable".

Under "Email Addresses" enter your own email address.

Then login to the box via SSH as user "admin" and "su -" to become "root".

Then run this command:

/usr/sausalito/sbin/get_quotas.pl |awk '{print $1}'|grep -v ^mailall$ >>
~mailall/.forward

That will append a list of all GUI created user names (excluding system
users) and will append them to the .forward file of user "mailall".

When you now send an email to user "mailall" on that box, then *all*
users that exist on the BlueOnyx will receive a copy of that email as well.

HOWEVER: You really *SHOULD* delete the ~mailall/.forward file after you
are done. Just disabling "Email Forwarding" will not remove the extra
users from the .forward file.

You *have* to do this, because any SPAM that makes it through and gets
to this account *will* be passed on to all users as well. Which is
something you definitely don't want.

Likewise: Be careful how you craft the email you sent. The "reply to"
address in that email should *not* be "mailall@<whatever>", because then
recipients replying to that email will have their replies send to all
other users as well.

That's why this should really only be used once and then immediately be
disabled by removing the ~mailall/.forward file.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list