• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Mailinglist recipients from SQL database

dennis_81

Basic Pleskian
Hello,

I am looking for a way to get the eMail recipients of a mailinglist from a SQL database. I know this possibility e.g. from IceWarp. There I could read out with a SELECT query from a MySQL database, to whom a mailinglist forwards the messages.
Can I implement something like this with Plesk?

Thanks for your answers
 
If I'm not mistaken list of subscribers is not stored in the Plesk database. But you can get this list with the appropriate CLI utility:
Code:
# plesk bin maillist -i maillist -domain distracted-nightingale.128-19-131-120.plesk
Mailing list members:
d@d.fe
g@g.fe
p@p.fe
SUCCESS: operation with mailing list 'maillist' complete.
 
Hello,

thank you, but maybe I didn't explain it correctly:
I do not want to use the Plesk database but an external database. We have a MySQL DB for personnel management. In this database are also the employees with departments and mail addresses. I would like to automatically add all employees who are in department A to the distribution list a@domain.com.
 
You could do this aslo using the Plesk CLI. To add an email address to an mailinglist to can use:
Bash:
plesk bin maillist --update MailinglistName -members add:JDoe@example.com -domain example.com

You'll have to write a script to export the email addresses from your database and add those email addresses to the mailinglist using the code example above. More information on the Plesk CLI can be found here: maillist: Mailing Lists
 
Thank You @Rasp
How can I make entries here? Is that only possible via the Plesk CLI? Do I have to schedule it via cronjob? Or can I for example also edit this via PHP on a website?
 
@dennis_81
unfortunately there's no ability to do that via API, so adding the script with CLI commands to the cron looks good.
 
Back
Top