Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Dear all,
I need to implement a mail server that allows me to establish advanced rules for filtering and forwards them.
I do not know which mail server could be the best, I told you that I need to do with the emails to guide me in the election.
1) I need to catch all the emails during a time interval, filter their content (they are alarms from different sensors) and make a single summary email.
2) Accumulate the alarms of the different sensors in a csv or a log file.
I have searched the internet and certain mail servers do not allow to establish rules about the content of the message, others do, but through scripts in phyton or bash.
I thank you very much for your help.
Dear all,
I need to implement a mail server that allows me to establish advanced rules for filtering and forwards them.
I do not know which mail server could be the best, I told you that I need to do with the emails to guide me in the election.
1) I need to catch all the emails during a time interval, filter their content (they are alarms from different sensors) and make a single summary email.
2) Accumulate the alarms of the different sensors in a csv or a log file.
I have searched the internet and certain mail servers do not allow to establish rules about the content of the message, others do, but through scripts in phyton or bash.
I thank you very much for your help.
Not sure what you're asking here, honestly. If you've found a mail server that does what you want, why is it a problem if it uses scripts?? There is *NEVER* going to be a 100%, perfect-fit system that meets custom needs, with ZERO modifications. Since any of the choices for Linux are free, your best course of action would be to load them both, and see which fits your needs best, and is easiest for you to get going.
Use of scripts gives you a LOT of flexibility later, since things can be added/removed/changed on the fly.
Dear all,
I need to implement a mail server that allows me to establish advanced rules for filtering and forwards them.
I do not know which mail server could be the best, I told you that I need to do with the emails to guide me in the election.
1) I need to catch all the emails during a time interval, filter their content (they are alarms from different sensors) and make a single summary email.
2) Accumulate the alarms of the different sensors in a csv or a log file.
I have searched the internet and certain mail servers do not allow to establish rules about the content of the message, others do, but through scripts in phyton or bash.
I thank you very much for your help.
First off: I would argue that you don't need to run a mail server for this. You might as well scrape the emails of any random mail account using a python script.
Second: I would encourage you to reconsider the concept of using email for this in the first place. Is this really the only way that you can collect the sensor information? If there was any way to read sensor values via http, telnet or ssh for example that would certainly make your life an order of magnitude easier!
If you insist on running your own mail server: The postfix-dovecot combo is a battle tested and extremely customizable mail server setup. You can use sieve to filter / sort your mail and you can configure postfix to pipe incoming mail through custom scripts.
It has a learning curve though and you should not run it on a publicly accessible machine until you really know what you are doing.
It's not a mail server, but this sounds like a job for procmail. It can search headers or bodies of email and act accordingly. The meat is already written, OP would just need to develop appropriate recipes.
First of all, many thanks to TB0ne, joe 2000 and scasey for their quick responses. It seems incredible to me that you have answered in a matter of hours. Thank you.
Clarification: the sensors are mounted on a board with Wi-Fi chip and are able to connect to the internet from almost any point and without much user intervention. They give a tremendous flexibility and the simplest option is the sending of mails. If you tried to collect the data from each sensor through other procedures, you would have to open certain ports in the wifi points where they connect and most of the time it would not be possible.
TB0ne: Yes, everything that is done to filter the information will not work 100% and should be adjusted. The problem is that I do not have a lot of knowledge to make scripts and that's why I thought about collecting the emails through a reader / server of post office and doing the filtering by personalizing its operation.
joe 2000: in the answer to TB0ne you can read why the use of emails to collect information. I'll look for information about postfix-dovecot and I'll study it like crazy.
scasey: idem joe 2000, I will find information about procmail and study!
Thank you very much, you are great.
Clarification: the sensors are mounted on a board with Wi-Fi chip and are able to connect to the internet from almost any point and without much user intervention. They give a tremendous flexibility and the simplest option is the sending of mails. If you tried to collect the data from each sensor through other procedures, you would have to open certain ports in the wifi points where they connect and most of the time it would not be possible.
Ok, I understand the initial thought, but I still disagree with email being the easiest way.
If you can send email, you can certainly make an http request with curl?
If you can put a webserver somewhere and spin up a tiny web frontend that accepted these curl requests you could pipe the sensor values directly into a database. Flask is a neat python framework that allows you to build such an api with very little code.
It may sound more difficult at first, but I promise you: Going the email route will be more difficult than it sounds...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.