Solved

Linux mail convert to pdf format  and send to pther ID

Posted on 2009-06-27
5
476 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

803 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