<<< Date Index >>>     <<< Thread Index >>>

Re: Way to set the sending of an email at a specific time?



Am 2005-07-11 09:35:40, schrieb Marcus Franke:
> Am Montag, den 11.07.2005, 13:07 +0530 schrieb Kumar Appaiah:
> > On Sun, Jul 10, 2005 at 11:02:50PM -0700, Arias Hung wrote:
> > > Is there a srcript to do this or perhaps a builtin mail header or hook?
> > 
> > How about cron?
> > 
> 
> Yeah, but you still need to filter the messages being spooled to
> the MTA at the specified time.
> 
> But, out of the box, there is no solution for this, except using
> Exchange/Outlook, which can do this for you :)

If you write a new message, add a header like:

    X-TDSendMail: YYYY-MM-DD HH-MM

and the after writing the message postpone it.

Now you need a (BaSH) script which is executed each minute from
cron and whatching the ~/Maildir/.POSTPONE/new/ directory...

The script grep for the above mailheader and if the time is reached
it sends the message via

    cat <message> |/usr/sbin/sendmail -t

Additionaly you can move the message to the folder ~/Maildir/.SENT/cur/
while renaming the file with

    mv ~/Maildir/.POSTPONE/new/<msg> ~/Maildir/.SENT/cur/<msg>:2,S

> Marcus

Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature