?
Solved

Linux mail convert to pdf format  and send to pther ID

Posted on 2009-06-27
5
Medium Priority
?
496 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
When you’re making plans to join the modern business race, you should analyze various details that may affect your results. Nowadays, millions of businesses are trying to grow into established and appreciated professional enterprises.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses
Course of the Month8 days, 23 hours left to enroll

764 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