LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-10-2003, 04:44 AM   #1
B3R7
LQ Newbie
 
Registered: Sep 2003
Posts: 2

Rep: Reputation: 0
Lightbulb automatic e-mail printing ;)


hi i'm looking for an way to print my mail automaticly on a linux box.

the problem is that i cant just print the mail from /var/spool/mail/bert because it's "the source"
and what i want is something like :

from: bla@bla.com
to: bla @bla.com

message.......
 
Old 09-10-2003, 06:23 AM   #2
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Re: automatic e-mail printing ;)

Quote:
Originally posted by B3R7
hi i'm looking for an way to print my mail automaticly on a linux box.

the problem is that i cant just print the mail from /var/spool/mail/bert because it's "the source"
and what i want is something like :

from: bla@bla.com
to: bla @bla.com

message.......
Hmmm then forward it to another account (mailbox) which only receive that forwarded mail and then pipe it to lp0 ?

Hope this helps ...
 
Old 09-10-2003, 08:31 AM   #3
B3R7
LQ Newbie
 
Registered: Sep 2003
Posts: 2

Original Poster
Rep: Reputation: 0
how can i do that ?
plz can you explain a bit more
 
Old 09-10-2003, 08:47 AM   #4
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by B3R7
how can i do that ?
plz can you explain a bit more
If you would like to print ALL mails which arrive into the mailbox bert then add a cronjob script which runs every hour or so and then do something like

cat /var/spool/mail/bert | lp0

Which of course requires that your printer is setup properly ...

To try this example, first make a file print_mail

#!/bin/sh
cat /var/spool/mail/bert | lp0

Save it and do: chmod 755 print_mail (this will make it executable for the owner and rw for group and users (outside world)

then ./print_mail (to run it)

This will print all contents in the file: bert
Also keep in mind that when new mail arrives it will be added into mailbox bert, together with all other existing mails ...

If you don't want all other mails which you have already
printed, you should delete the one's you've already printed out.

Hope this helps ...

p.s. Does anybody knows a email agent which does have this future ?
 
  


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
Automatic Mail Print conrad10781 Linux - Software 0 06-01-2005 02:35 PM
Automatic E-mail check siggiae Slackware 2 04-29-2005 10:49 AM
automatic saving mail-attachments dancindoc Linux - Software 0 04-08-2004 07:14 AM
how to make an automatic mail? samsolaris Solaris / OpenSolaris 7 09-01-2003 04:35 PM
Sending an automatic mail using bash + mail Minuteman Linux - Software 4 08-21-2003 12:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:35 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