Muchos usuarios disponen de un panel de control Plesk. Que, aunque no es libre, hoy vamos a hablar de él. Dicho panel de control, proporciona una forma sencilla de gestionar dominios, páginas web y servicios asociados, como el correo, desde su interfaz web. Lo que puede que no sea tan conocido es que dispone de una serie de herramientas en línea de comandos que nos pueden hacer la vida mucho más fácil.
Para utilizar estos consejos, es necesario tener acceso SSH a nuestro servidor.
Tabla de contenidos
Crear una dirección de e-mail
Para crear una dirección de correo con su buzón y todo, podemos utilizar la siguiente orden:
Podemos crear una dirección de correo para cualquier dominio que tengamos administrado en nuestro servidor. Y también podemos especificar algunos parámetros en su creación como:
- -mailbox true: Para activar el buzón de correo.
- -passwd [password]: Para especificar la contraseña.
- -mbox_quota 5G: Para especificar el espacio del buzón de correo (5GB en el ejemplo).
- -description «Descripción»: Para especificar una descripción que veremos en el panel Plesk.
- -manage-virusfilter true: Para activar el filtro antivirus.
- -manage-spamfilter true: Para activar el filtro antispam.
- -antivirus inout: Para configurar antivirus tanto de entrada como de salida.
- -outgoing-messages-mbox-limit 100: Para configurar el número de mensajes que pueden enviarse cada hora.
Hay alguna opción más dependiendo de la versión de Plesk, como especificar grupos de correo, alias, etc. Podemos obtener el listado completo de opciones con el argumento –help. Por lo que finalmente podemos tener algo como esto:
Puede parecer algo complicado, aunque lo realmente bueno viene dentro de algunas líneas.
Modificar o Eliminar correos
Desde aquí también podemos modificar direcciones de correo, con las mismas opciones que antes, pero con el argumento -u. Por ejemplo, para cambiar una contraseña podemos:
Y si finalmente queremos eliminar el correo,
Crear múltiples direcciones de correo
Si queremos crear múltiples direcciones de correo, y esto es lo bueno, no tenemos que andar con la interfaz web, dirección a dirección. Basta con crear un bucle en Bash y llamar a la orden anterior múltiples veces.
Esto puede pasar cuando necesitemos migrar direcciones de correo de un servidor a otro, puede que unas pocas direcciones sean fáciles de crear en la interfaz web, pero cuando hablamos de decenas, o cientos, nos compensa más invertir un poco de tiempo en un pequeño script y ejecutarlo, y las tendremos todas generadas.
Podemos hacerlo de forma muy sencilla, desde la propia línea de comandos:
1 2 3 | for direccion in info persona1 persona2 persona3; do plesk bin mail -c $direccion@midominio.com -mbox_quota 5G -passwd 'ClaveFacil' done |
Con esto crearemos los e-mails info@midominio.com , persona1@midominio.com , persona2@midominio.com y persona3@midominio.com con la misma cuota de buzón de correo y la misma contraseña.
Aunque si queremos, podemos ir un paso más allá, creando un fichero de texto (direcciones.list) donde guardamos todos los nombres de usuario, uno por línea, pueden ser cientos o miles (ya será la capacidad de nuestro servidor el límite).
Tras eso creamos el siguiente script:
1 2 3 4 5 6 7 8 | #!/bin/bash while IFS= read -r line do password=$(pwgen -1 -y 12) email="$line@midominio.com" plesk bin mail -c "$email" -mbox_quota 5G -passwd "$password" -mailbox true -antivirus inout echo "$email:$password" >> passwords done < direcciones.list |
De esta manera podremos configurar un montón de direcciones de correo con las mismas características. Incluso de dominios diferentes si introducimos el dominio en el archivo direcciones.list y lo eliminamos de la variable $email. Las contraseñas, como vemos, las genero con la herramienta pwgen, aunque también podemos dejarlas fijas o utilizar cualquier otro método de generación de contraseñas.
Por otro lado, si ahora queremos modificar la cuota de espacio en disco de múltiples correos a la vez podremos:
1 2 3 4 5 6 | #!/bin/bash while IFS= read -r line do email="$line@midominio.com" plesk bin mail -u "$email" -mbox_quota 2G done < direcciones.list |
Incluso utilizar el modificador -r para eliminar varias direcciones de correo a la vez.
Por cierto, es buena idea, una vez que tengamos los correos generados en el sistema, guardar en lugar seguro el fichero de contraseñas, al menos hasta que hayamos asignado las contraseñas a cada uno de los usuarios y en ese momento eliminarlo permanentemente.
Foto principal: Carol Jeng

¿Necesitas un sysadmin?
Si te ha gustado el post y encuentras interesante lo que cuento en materia de sistemas. O si necesitas gestionar un servidor (o muchos), automatizar procesos o mejorar la calidad de los procesos actuales. No dudes en ponerte en contacto conmigo.
I appreciate your efforts in this sharing, can you let me talk directly with you?
Same here! Really great! sandblasting
An interesting article like yours. Its appearance is enough for me. In my opinion, if all website owners and bloggers can create exciting content like you, then the internet may be more helpful than ever before메이저사이트
Really great blog! Keep it up! skip hire in wirral
Your article is truly captivating. Its mere presence is a delight. In my view, if website owners and bloggers across the internet could consistently produce engaging content like yours, the web would become an even more invaluable resource than ever before
weight loss coach Brisbane
Provide unbiased reviews of online brokers, trading platforms, and financial tools. invest2euro.com
Your blog is refreshing after reading. I will be very happy to see your words, and I hope that more and more people can also feel this joy when they see them. Your writing style is great, I really like you.메이저놀이터
I can see that you are an expert in your field! I am about to launch a website and your information spanish dictionary will be very helpful to me.. Thank you for all your help and wish you success in your business.
Love this blog! Really great! liverpool marquee hire
Pretty nice post. I just stumbled upon your weblog and wanted to say that I have really enjoyed browsing your blog posts. After all I’ll be subscribing to your feed and I hope you write again soon!
My website: OKBet download
However, it also has a number of command line tools that can be used to automate tasks or perform more complex operations.
–architecte marrakech
Située a Marrakech, cette Consulting industriel Maroc
Provide public numbers Numeros virtuels
Welcome to Marrakech Art Tours, Tours Marrakech
ManagePro Application de gestion Maroc
GymPro est une de Application de gestion de salle de sport
I saw some great things here. Worth collecting for follow-up visits. I am surprised how much effort you have put into creating such a rich content website. Your work is truly appreciated 24/7 worldwide. 토토사이트
It’s very informative and you are obviously very knowledgeable in this area. Delhi Call Girl You have opened my eyes to varying views on this topic with interesting and solid content.
Do you know your post is very good? Very distinctive. I really admire you. I really should study like you. Thank you. I’m glad to brush up on your post.먹튀신고
ยูฟ่าเบท168 แทงบอลได้ทุกที่ ทันทีที่ต้องการ สล็อตเว็บตรงอันดับ1 ที่ให้คุณสนุกได้ทุกรูปแบบ
Excellent post! The description of cartoon characters and real writers is presented in surprising ways. Children can easily enjoy it.먹튀검증
If you are in town and wish to go on an adventurous ride and get your fantasies to become reality, you have come to the right place, just look through our pictures of our Delhi Escort and give us a call. Our escort will be at your doorstep ready to make your dreams come true and will give you the time of your life.
There’s something timeless about John Dutton’s Season 4 jacket, and the quilted texture elevates its overall appeal. It’s the kind of piece that effortlessly combines style and substance, just like the character himself. A jacket that tells a story
These Delhi Escorts Agency are incredibly fiery and can perform with you for quite a while. The nearby fun-searchers used to recruit them consistently because of their astounding administrations.
Great website, I like it. Well done. Nice website. Love it. This is really good,This is exciting content! I was attracted by your speech and precise viewpoints.토토사이트추천
Thank you for this great read. Concrete Contractors Wagga really thankful to you for giving us blog commenting sites. It has been useful.
Our Delhi Escorts Service have become an essential part of evening services in the resources city. Our qualified ladies are readily available for reserving 24/7 in the city. Whether you need a warm friend in lavish hotels or houses, our turned on women companions in Delhi will reach you within a short time. That is the commitment of our sensuous friends. Furthermore, you can expect unequaled romantic and also sensual solutions from our ladies.
Simply outstanding work from you in this regard. I have never anticipated that you would provide anything less than this, and you have in no way let me down in this regard. I have no doubt that you will maintain the high standard of your work.
Reading by means of your enjoyable dispatch, desire further me to do so sometimes. pool installation sarasota
Great article. Generator Residential Generator Residential
People who love luxuries are able to relish lovemaking with these exotic babes. Pleasure seekers who have played with these exotic love-makers before said, Russian escorts release a unique fragrance from their body which ignites their sparks. Russians hold the exceptional qualities and features which can’t be found in any other category of escorts in Delhi. If you need to play sensuously before intercourse to be seduced so appointing Russian escorts in Delhi would an ideal choice. These exotic beauties know to satisfy one’s hunger in more than twenty various styles.
This article is great as well as inspiring. Keep sharing more related articles. Great work! Thank you.
You have written a very good viewpoint here Great thing I think you have put forward some truly interesting viewpoints. Keep working hard.토토사이트 Thank you very much for sharing with us and for discovering a new factor in your respective posts.
Excellent post. acer swift x sfx14-41g-r1s6 creator laptop review I really liked each part and also bookmarked you for new information on your site.
Wow what a Great Information about World Day its exceptionally pleasant educational post. a debt of gratitude is in order for the post. Antigua
thanks for the information http://www.aquablastmn.com/soft-washing
You should also check on their websites for reviews and feedback given by their current or former clients. This helps to understand the quality of their service from a customer’s perspective. Ratings and reviews can shed light on any issues or complaints about an agency. But do keep in mind, that if an escort agency’s website doesn’t include a section for reviews, it might be a bit risky to fully trust them.
There are many types of escorts, and they come from all walks of life. Some are students who need extra money for tuition, while others are single mothers who need to support their children. Foreigner escort girls support their families by coming to Goa due to a lack of employment in their country. There are also such types of women who do it because they enjoy it. Whatever their reason, one thing is for sure: they all want money.
It’s always a pleasure to come across an intriguing topic of yours like this. credit repair san antonio
It’s always a pleasure to come across an intriguing topic of yours like this. screen enclosures fort lauderdale
Thank you for this great read. I am really thankful to you for giving me glock 44 for sale blog commenting sites. It has been useful.
We never concoct low class escort administrations as we put stock in offering premium administrations to our clients. Ghaziabad Call Girls We ensure that all our attractive hunks get to satisfy their dreams and wants with full energy and positive thinking. The most amazing aspect of having our escort administrations is their moderateness. We have the best and modest escort administrations in for our clients so they can include everything inside their spending plan. Thusly, reach out to us to enlist your escort friend now.