Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
I am not aware of Postfix having a sense of time. It is a set of daemon processes that are orchestrated by the queue manager daemon which handles incoming mail and routes them. Aside from that, Postfix does not generate mail, except for automated daemon messages like failed delivery notice. You would need a separate script to compose the messages.
If this would be possible with Postfix alone, it would be a relatively obscure feature. The Postfix site has extensive documentation and contains pages upon pages of description of features and flags. You might want to see if it provides any hits.
can you give me this separate scipt in order to compose messages ?? because i never did a script plz help me because my periode of my project will finish soon
Saying your project period ends soon gives me the impression that this is a student project, which are discouraged on LQ. While many of us will help with them, you need to what you have been trying and explain what it is that you are having trouble with. The important thing is to learn and understand how things work, not to be given an answer to submit which won't work once you finish school.
The first example is from the command line and you could write a small bash script to call the function. It is really deceptively simple. The second and third example, show how to perform the same function using Perl. The choice of language is really immaterial, as they call call /usr/bin/sendmail. Each of these will show you examples of how to solve the problem. Postfix provides a sendmail function.
As I stated earlier, I don't know of a way to get Postfix to perform the timing function. This is the realm of Cron. Attempting to use Postfix for this function would also be against the Linux philosophies of do one thing and do it well and designing your programs to be read from and provide output to another program. Cron, on the other hand knows timing and that is it's function, which it does well. Cron is designed to call a script on a periodic basis. It is the perfect tool for the job.
salut
je veux savoir comment programmer un script qui permet d'envoyer un message (sous debian (postfix) )dans un temps precis
j'ai deja poser cette question en anglais mais peut etre le problematique n'etait pas poser en clair
en attendant d'une reponse merci d'avance
yes I know but I'm from morocco .English is our second language for that reason we have some problems to explain this project
so i try to understand you but plz give me answer because i need it
If you mean you want to send a msg at(!) a precise time automatically, the tool you would use is 'cron', http://adminschoice.com/crontab-quic...Crontab%20file. This is the default scheduler for automatically running a process at a given time.
You can then write a shell script to be called by cron.
thanks ! But i wonder if it is possible to create script in postfix without using a cron !?
For (16pide) your script is based to a cron or directly in postfix and where exactly we can put it ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.