Fedora Linux Support Community & Resources Center
  #1  
Old 10th January 2007, 04:03 AM
Perfect Storm Offline
Registered User
 
Join Date: Jul 2005
Location: Halifax
Posts: 16
Plain Text from Sendmail

I have my sendmail server running nicely on my FC5 box and all is well...

Except that I have a push email system set up for my phone which only has limited data. I can get the messages to push to the phone, but if they're formatted, all the formating comes with them making them pretty big in some cases. If they're too big, my phone will just get a message telling me this.

The way I have it configured is that my personal user (lets call it 'me') has an alias in /etc/aliases to send it to 'mobile'

Is it possible to have anything sent to 'mobile' be formatted to plain text only while still maintiaining the formatting for 'me'?
Reply With Quote
  #2  
Old 10th January 2007, 04:58 AM
brunson Offline
Registered User
 
Join Date: Jun 2005
Location: Westminster, Colorado
Posts: 2,305
Hmmm... can't help you strictly from sendmail, I could tell you how to do it with postfix.

An alternative that would work with either, but is a little less clean, would be to have the messages go first to a mailbox that doesn't go to your phone, then set that account to use procmail to process the message to strip out the non-text parts, then pass it on to your phone push account.
__________________
Registered Linux User #4837
411th in line to get sued by Micro$oft
Quote:
Basically, to learn Unix you learn to understand and apply a small set of key ideas and achieve expertise by expanding both the set of ideas and your ability to apply them - Paul Murphy
Reply With Quote
  #3  
Old 10th January 2007, 06:42 PM
brandor's Avatar
brandor Offline
Registered User
 
Join Date: May 2005
Posts: 534
Quote:
strip out the non-text parts, then pass it on to your phone push account.
I'm not sure that would work. Most of the time, the formatting is in text too. It's just hidden by whatever app you're using to view the file.
Reply With Quote
  #4  
Old 10th January 2007, 06:46 PM
brunson Offline
Registered User
 
Join Date: Jun 2005
Location: Westminster, Colorado
Posts: 2,305
Well, since you don't actually explain what the "formatting" I jumped to the conclusion that it was HTML. There are plenty of libraries that can handle that. Using python's htmllib I think I could write something that strips all HTML leaving only the text in about 5 lines of code.
__________________
Registered Linux User #4837
411th in line to get sued by Micro$oft
Quote:
Basically, to learn Unix you learn to understand and apply a small set of key ideas and achieve expertise by expanding both the set of ideas and your ability to apply them - Paul Murphy
Reply With Quote
  #5  
Old 10th January 2007, 06:48 PM
brandor's Avatar
brandor Offline
Registered User
 
Join Date: May 2005
Posts: 534
Not my thread.

I was just pointing out that your original post made it sound like formatting was something other than text.
Reply With Quote
  #6  
Old 11th January 2007, 01:12 AM
Perfect Storm Offline
Registered User
 
Join Date: Jul 2005
Location: Halifax
Posts: 16
The formatting is html that I'm refering to.

Quote:
Originally Posted by brunson
Hmmm... can't help you strictly from sendmail, I could tell you how to do it with postfix.

An alternative that would work with either, but is a little less clean, would be to have the messages go first to a mailbox that doesn't go to your phone, then set that account to use procmail to process the message to strip out the non-text parts, then pass it on to your phone push account.
How would I go about setting this up?


My first idea was to use php-imap to connect, strip the html, and mail it along. The problem I've been running into is the following error when connecting to the inbox:
PHP Warning: imap_open(): Couldn't open stream {localhost:110/pop3}INBOX in email.php on line 3
I've tried it using the pop connection and the imap connection, both with the same result.
Reply With Quote
  #7  
Old 13th January 2007, 04:59 PM
Perfect Storm Offline
Registered User
 
Join Date: Jul 2005
Location: Halifax
Posts: 16
...Anyone?
Reply With Quote
Reply

Tags
plain, sendmail, text

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
firefox download becomes plain text pcandpc Using Fedora 2 14th May 2008 06:13 AM
Perl code displaying as plain text Broady Using Fedora 2 6th May 2007 12:46 AM
Convert a plain Text into HTML format Nkunzis Programming & Packaging 5 14th December 2006 11:00 AM


Current GMT-time: 16:11 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat