Solved

Linux mail convert to pdf format  and send to pther ID

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

What is Usenet? There are many different opinions on exactly what Usenet is an isn't. Many opinions are incorrect simply out of ignorance. The Wikipedia listing about Usenet does a good job of explaining it, so instead of repeating it all here I wi…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

930 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

9 Experts available now in Live!

Get 1:1 Help Now