seek cron job to move mail

seek cron job to move mail

Post by Mark Fear » Fri, 23 Apr 1999 04:00:00



 Greetings. We have two facilities, New Hampshire (nh) and India (india).
My problem; I have created a mail list that is comprised of three people
in 'nh' and one person in 'india'. Our connection to India is often down
(another problem). When outside customers send mail to this list that I
have created *and* the line to India is down, the originator of that
e-mail understandably gets the 'unable to send' message. Not wanting the
customer to see this, I created a New Hampshire (nh) account for this
person in India (india) and made his 'nh' e-mail address to be included
in the mail list instead of his 'india' address. This fixes the problem
of customers getting bounced messages. Now I want to automate forwarding
any e-mail that is in his 'nh' account to his 'india' account. I tried
putting a .forward file in his nh account, but if the line to India was
down, the originating sender still received those 'unable to send' message.
How can I make a cron job that will e-mail his nh /var/mail file to his
India account? If I could create something like this, outside e-mails
would safely end in his nh account (and not send back an unable to send)
message and those e-mails would automatically get resent to him in India
without somebody manually forwarding them.

--
--------------------------------------------------
Mark Fearer                        *   C:\DOS

http://www.fearernet.com/mfearer   *   RUN\DOS\RUN

 
 
 

seek cron job to move mail

Post by Ralf Draege » Fri, 23 Apr 1999 04:00:00



>  Greetings. We have two facilities, New Hampshire (nh) and India (india).
> My problem; I have created a mail list that is comprised of three people
> in 'nh' and one person in 'india'. Our connection to India is often down
> (another problem). When outside customers send mail to this list that I
> have created *and* the line to India is down, the originator of that
> e-mail understandably gets the 'unable to send' message. Not wanting the
> customer to see this, I created a New Hampshire (nh) account for this
> person in India (india) and made his 'nh' e-mail address to be included
> in the mail list instead of his 'india' address. This fixes the problem
> of customers getting bounced messages. Now I want to automate forwarding
> any e-mail that is in his 'nh' account to his 'india' account. I tried
> putting a .forward file in his nh account, but if the line to India was
> down, the originating sender still received those 'unable to send' message.
> How can I make a cron job that will e-mail his nh /var/mail file to his
> India account? If I could create something like this, outside e-mails
> would safely end in his nh account (and not send back an unable to send)
> message and those e-mails would automatically get resent to him in India
> without somebody manually forwarding them.

Three possible solutions:
In the .forwardfile you can not only give an emailaddress but also a pipe
to a script. Inside the script you can sleep until the connection is up and
pipe the mail to a rsh mail the_other_account. The disadvantage is, that
replypart may be brocken (depends on the mail command I guess).

Another way is not to forward at all and install nh as a pop3-server for
india so when the connection is up all mails are transfered.

The last and most ugly / unstable one is simply to
cat the_mail_folder_nh | rsh india cat >> the_mail_folder_in_india .
I'm dooing this every night, but I'm sure that at the time the cat is done
NO mail is appended to one of these Folders.

Yes, UUOC here just for explenation ...

HTH, Ralf.
--

- Intraplan Consult Gmbh  Orleansplatz 5a  81667 Muenchen  +49 89 45911-0 -

                                         * <--- Tribble   . <--- Tribble.gz

 
 
 

seek cron job to move mail

Post by J. S. Jense » Fri, 23 Apr 1999 04:00:00



> If I could create something like this, outside e-mails would safely end in
> his nh account (and not send back an unable to send) message and those
> e-mails would automatically get resent to him in India without somebody
> manually forwarding them.

http://www.tuxedo.org/~esr/fetchmail/

Have india fetchmail all appropriate mail at intervals from nh.  Should the
connection go down, no big deal, it will just wait 'till the next scheduled
time.  I run fetchmail through cron, though it also has a daemon mode.

--
J. S. Jensen

http://www.Paramin.COM

 
 
 

1. seek cron job to move mail

 Greetings. We have two facilities, New Hampshire (nh) and India (india).
My problem; I have created a mail list that is comprised of three people
in 'nh' and one person in 'india'. Our connection to India is often down
(another problem). When outside customers send mail to this list that I
have created *and* the line to India is down, the originator of that
e-mail understandably gets the 'unable to send' message. Not wanting the
customer to see this, I created a New Hampshire (nh) account for this
person in India (india) and made his 'nh' e-mail address to be included
in the mail list instead of his 'india' address. This fixes the problem
of customers getting bounced messages. Now I want to automate forwarding
any e-mail that is in his 'nh' account to his 'india' account. I tried
putting a .forward file in his nh account, but if the line to India was
down, the originating sender still received those 'unable to send' message.
How can I make a cron job that will e-mail his nh /var/mail file to his
India account? If I could create something like this, outside e-mails
would safely end in his nh account (and not send back an unable to send)
message and those e-mails would automatically get resent to him in India
without somebody manually forwarding them.

--
--------------------------------------------------
Mark Fearer                        *   C:\DOS

http://www.fearernet.com/mfearer   *   RUN\DOS\RUN

2. Alpha update for 2.5.3

3. mail and cron jobs - help!

4. Only 2 Color Cells for Netscape 3.0?????

5. Receiving mail from cron job

6. Hieroglyphic DOS (grrrr) disks

7. disbaling mail from cron jobs

8. VAIO GR114 and RH 7.2

9. Mail a file from a cron job

10. mail lost when source is pipe within cron job

11. Annoying cron job mail

12. Suppressing mail messages from cron jobs

13. Having CRON Jobs NOT mail results