LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-03-2003, 02:48 AM   #1
KungFuHamster
Member
 
Registered: Feb 2003
Location: Middle of frickin' nowhere
Distribution: The One True Distro
Posts: 230

Rep: Reputation: 30
Multiple pop3 accounts with Pine?


I've been wracking my brain trying to figure this one out: Is it possible to use Pine with more than one pop3 account? And if not, are there any command line email programs that do?
 
Old 11-03-2003, 07:02 AM   #2
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
I would recommend setting up an IMAP server, and download all your POP3 e-mail with fetchmail.

fetchmail is able to download mail, and forward it (for example, to your postfix/sendmail server). Postfix could drop the message in your ~/Maildir/ with procmail or maildrop. (both have a filtering language to sort the mail, and add spam checks / use spamassassin). An IMAP server, for example courier-imap, is able to retreive all messages from your ~/Maildir/.

And there are a lot of IMAP clients including web based onces (ie. you could have webmail at your own machine)

this is a bit advanced, but worth all the effort if you want something better
 
Old 11-03-2003, 11:22 AM   #3
KungFuHamster
Member
 
Registered: Feb 2003
Location: Middle of frickin' nowhere
Distribution: The One True Distro
Posts: 230

Original Poster
Rep: Reputation: 30
Know of a good place where I can find some documentation on doing this?
 
Old 11-04-2003, 02:41 AM   #4
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
I've got a lot of help from this site: http://www.firstpr.com.au/web-mail/ but I found it very confusing. But if there is anything about this idea you're confused about, please ask it took me quite some time before I understood the entire concept
 
Old 11-04-2003, 05:03 AM   #5
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
Cool

I just thought I could explain a little more. Because that link has way to much details ..this story got a little long, but I think it's useful too

postfix + imap
  • first try to install postfix (and uninstall sendmail). You should be able to send e-mail through postfix to another host.
    Try to use 127.0.0.1 as your SMTP server, and try to send a normal e-mail.
  • Postfix also requires you to use an aliases file. it's created by the program "newaliases". I've configured postfix to send all root@localhost mail to my own user@localhost for example
  • Then you should configure the local delivery: configure postfix to use maildrop as local mail delivery agent. In other words, when you send an e-mail to you@localhost, it will be passed to maildrop. maildrop will use the ~/.mailfilter to filter the file, and store the e-mail in ~/Maildir/...
  • Get courier imap working; instead of reading the e-mail directly from ~/Maildir/, you can connect to your system on the imap port. Most e-mail programs, also outlook express support imap.

receiving mail
There are 2 ways you could receive your e-mail:
  • make the postfix server accessible from the internet, and people could send e-mail to yourusername@yourmachine. You need to be careful with this; If your system is an open-relay, spammers could use your mailserver to send messages. And every service accessible from the internet is a possible way to break into your system.
  • To retreive pop3 mail you could use "fetchmail". fetchmail downloads pop3 mail, and forwards it to postfix automatically.
  • I run fetchmail every hour from a cron-job. If my msn messenger receives a new-mail notification, fetchmail is enabled as well

sending mail
Sending e-mail can be done very easy; you don't need to SMTP of your ISP anymore, you can just use localhost

reading e-mail
you can use any IMAP capable mail client. You could use outlook express from another Windows workstation, or KMail, Mozilla-mail, mutt, or Squirllmail (webmail). It doesn't matter which client you use, the e-mail will look exactly the same! (even the read-status, etc.. )





message filtering examples
Message filtering:
From the ~/.mailfilter file, I sort all messages. Maildrop rules apply to the message text.
  • This part of my ~/.mailfilter passes the message to spamassassin, and detects the changes that spamassassin makes to spam e-mails.
    Code:
    xfilter "/usr/bin/spamassassin -x"
    
    if(   /^X-Spam-Flag: YES/  )
    {
      log "---- *SPAM* detected. "
      to "Maildir/.Spam"
    }
  • To filter virus e-mail, that causes outlook express to invoke attachments automatically if you only view a message!:
    Code:
    if(  $SIZE < 200000  )
    {
    
    
      # Match the <iframe> exploit of outlook express, that causes execution
      # of programs, loaded my the iframe, because on an mangled content type.
      #
      if(  /<iframe src=3D"?cid:/:b  )
      {
        log "---- *VIRUS* outlook <iframe> exploit"
        to "Maildir/.Spam"
      }
    
    
      # Remove attachments with unwanted file extensions
      # It seams another nasty trick is also popular:
      # A lot of spaces between the .ext and .pif extension.
      #
      #  Content-Type: audio/x-midi
      #  <tab>    name=file.ext       .pif
      #
      if(  /[\n\r]Content\-Type: [a-zA-Z\-\/]+;[\n\r]*[:space:]+name=.*\.(bat|pif|scr)"?[\n\r]/:bw  )
      {
        log "---- *VIRUS* unwanted extensions in content-type"
        to "Maildir/.Spam"
      }
    
      #  Content-Disposition: attachment; filename=file.src
      if(  /[\n\r]Content\-Disposition: attachment;[\n\r]*[:space:]+filename=.*\.(bat|pif|scr|exe)"?[\n\r]/:bw  )
      {
        log "---- *VIRUS* unwanted extensions in content-disposition"
        to "Maildir/.Spam"
      }
    }
  • Finally, this part of the code sorts a message to another folder:
    Code:
    # messages from my site to another imap folder:
    if(  /^Received: from mail\.codingdomain\.com/  )
    {
      if(  /(To|Cc|Bcc): .*webmaster@codingdomain\.com/  )
      {
        to "Maildir/.codingdomain.Inbox"
      }
    
      ...
    }
    
    # Default:
    to "Maildir/"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple POP3 accounts with mutt?? febuiles Linux - Software 0 09-27-2004 09:08 PM
Multiple POP3 accounts with mutt febuiles Linux - Software 0 09-21-2004 11:37 PM
multiple pop3 accounts with fetchmail and pine ANU Linux - Software 1 03-15-2004 07:16 PM
Creating multiple POP3 accounts jobokoth Linux - General 1 10-04-2003 09:06 AM
Pine and POP3... ghost-ils Linux - Newbie 1 09-09-2001 02:58 PM


All times are GMT -5. The time now is 06:17 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration