Solved

Linux mail convert to pdf format  and send to pther ID

Posted on 2009-06-27
5
467 Views
Last Modified: 2013-12-06
Hi All,

I need to convert a user mails to a pdf format and send it to other mail id.

PLease advise how can I do it.   I have the idea that will work only if text format mails.

But I need if any pictures sending in that mail that need to convert to pdf format.

Please help, this is an urgent.

Thanks in advance.

0
Comment
Question by:remeshk
  • 3
  • 2
5 Comments
 
LVL 33

Expert Comment

by:Dave Howe
ID: 24727162
If they were text only, there would be no need to convert to a pdf, and not seeing the benefits of doing so if it is an image. in theory, you could use fpdf in php, but that would not get you inline images using html bodies (as trying to render and pdf that would be a nightmare)

I would see if you can programically "print" the email (using an email client) to a ps magicprinter, then have that do ps2pdf and forward it on.

however, I would normally just "pull" the email as a raw, stick it in an attachment ending .eml (of type mime822) and forward it like that.
0
 
LVL 6

Author Comment

by:remeshk
ID: 24759823
Thanks for your iformation.

I found a solution for converting PDF is cups-pdf.

I have installed Cups-pdf in my machine and set as default printer and it is working.

I am trying to covert to PDF in /etc/aliases file. But it is not working...

I given entry in aliases file is

ram:   |/usr/bin/lpd

Please asdvise how can I run a script once a mail comes.
0
 
LVL 33

Expert Comment

by:Dave Howe
ID: 24761000
no, you can't do it in aliases - you can do it (for a given user) in a .forward file though.

examples here:

http://www.xs4all.nl/~sjoel/the-networking-cd-bookshelf/sendmail/ch25_07.htm

(for sendmail, but other mtas tend to honour the convention. what mta are you using?)
0
 
LVL 6

Author Comment

by:remeshk
ID: 24769749
thanks Dave,  for your information,  I am using Qmail.

may I know why this is not supporting to a user ?

for working this do I need to change anything in the configuration file ???

Please advise.
0
 
LVL 33

Accepted Solution

by:
Dave Howe earned 250 total points
ID: 24771003
I can take a look - don't currently have qmail, but if if follows the convention, you could set up a new user "pdf-print" and then use aliases to redirect to that. then, in the home directory (presumably /home/pdf-print) create a .forward file with the command you want to run against the email.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now