LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-25-2011, 09:15 AM   #1
mimi kaka
LQ Newbie
 
Registered: May 2011
Posts: 11

Rep: Reputation: Disabled
timer of postfix


hi i have a project in server postfix i want to create a script that make sever to send an email in time precis
help meee plzzzz !!
 
Old 05-25-2011, 11:18 AM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Perform a search with your favorite engine on these terms, separately: "postfix sendmail compatibility" and "crontab"
 
Old 05-25-2011, 05:15 PM   #3
mimi kaka
LQ Newbie
 
Registered: May 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
witout using cronjob
i want to ask if i can this script in the postfix ???
 
Old 05-26-2011, 05:20 AM   #4
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
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.
 
Old 05-26-2011, 12:41 PM   #5
mimi kaka
LQ Newbie
 
Registered: May 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
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
 
Old 05-27-2011, 05:41 AM   #6
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
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.

Here are some links to scripts and tutorials about how to send mail:
http://www.justlinux.com/forum/archi...p/t-49995.html
http://www.cyberciti.biz/faq/sending...l-mail-script/
http://www.perlfect.com/articles/sendmail.shtml

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.
 
Old 05-29-2011, 04:49 PM   #7
mimi kaka
LQ Newbie
 
Registered: May 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
Question planifier l'envoi d'un message

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
 
Old 05-29-2011, 04:57 PM   #8
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Asking the same question in another language is not likely to help you on LQ, as this is an English-language forum.
 
Old 05-29-2011, 05:31 PM   #9
mimi kaka
LQ Newbie
 
Registered: May 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
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
 
Old 05-29-2011, 05:35 PM   #10
mimi kaka
LQ Newbie
 
Registered: May 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
my question in english:
I want to know how to program a script that sends a message (debian (postfix)) in a precise time
 
Old 05-29-2011, 11:25 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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.

HTH
 
Old 05-30-2011, 03:32 AM   #12
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
I created this very simple script:
Code:
#!/bin/bash
(echo -e "Subject: Done";echo;cat -) |msmtp -t my-emai-address@gmail.com
I can then use it by piping the output of a command into it:
Code:
ls|my-send-email-script.bash
 
Old 05-30-2011, 06:05 AM   #13
mimi kaka
LQ Newbie
 
Registered: May 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
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 ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix: postfix: fatal: chdir(/usr/libexec/postfix) Micro420 Ubuntu 2 07-13-2008 12:21 PM
How can I get LAPIC timer to run instead of the PIT timer? sixerjman Linux - Kernel 1 10-16-2007 09:59 PM
Multimedia timer (SMP friendly timer) bigqueso Linux - Kernel 0 03-15-2007 03:49 PM
First timer Cyberian Linux From Scratch 3 04-19-2005 12:27 PM
QT Timer kusio Linux - Software 1 04-15-2003 05:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration