LinuxQuestions.org
Register a domain and help support LQ
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-22-2003, 07:54 PM   #1
kudos
Member
 
Registered: Oct 2002
Location: UK
Distribution: Fedora 4
Posts: 90

Rep: Reputation: 15
fetchmail


Hi

i am trying to get fetchmail to recive my pop3 mail from my pop3 account, then filter it into the right users mail boxs.

i have fetchmail set up as folows
poll mail.eclipse.co.uk
proto pop3
user "robert@harpham.eclipse.co.uk"
pass "******"
is *
keep
fetchall
no ssl


its picking up mail fine, but is sending it all to one users not the right users.
here is my output
Quote:
fetchmail: 6.2.4 querying mail.eclipse.co.uk (protocol POP3) at Sun Nov 23 00:53:34 2003: poll started
fetchmail: POP3< +OK POP3 Ready serpens.eclipse.net.uk
fetchmail: POP3> CAPA
fetchmail: POP3< -ERR Command must be one of USER, PASS or QUIT
fetchmail: Command must be one of USER, PASS or QUIT
fetchmail: Repoll immediately on robert@harpham.eclipse.co.uk@mail.eclipse.co.uk
fetchmail: POP3< +OK POP3 Ready pyxis.eclipse.net.uk
fetchmail: POP3> USER robert@harpham.eclipse.co.uk
fetchmail: POP3< +OK USER robert@harpham.eclipse.co.uk set
fetchmail: POP3> PASS *
fetchmail: POP3< +OK You are so in
fetchmail: POP3> STAT
fetchmail: POP3< +OK 2 3558
2 messages for robert@harpham.eclipse.co.uk at mail.eclipse.co.uk (3558 octets).
fetchmail: POP3> LIST
fetchmail: POP3< +OK POP3 clients that break here, they violate STD53.
fetchmail: POP3< 1 1760
fetchmail: POP3< 2 1798
fetchmail: POP3< .
fetchmail: POP3> RETR 1
fetchmail: POP3< +OK 1760 octets follow.
reading message robert@harpham.eclipse.co.uk@mail.eclipse.co.uk:1 of 2 (1760 octets)
fetchmail: SMTP< 220 server.network ESMTP Sendmail 8.12.10/8.12.10; Sun, 23 Nov 2003 00:53:38 GMT
fetchmail: SMTP> EHLO localhost
fetchmail: SMTP< 250-server.network Hello localhost [127.0.0.1], pleased to meet you
fetchmail: SMTP< 250-ENHANCEDSTATUSCODES
fetchmail: SMTP< 250-PIPELINING
fetchmail: SMTP< 250-8BITMIME
fetchmail: SMTP< 250-SIZE
fetchmail: SMTP< 250-DSN
fetchmail: SMTP< 250-ETRN
fetchmail: SMTP< 250-DELIVERBY
fetchmail: SMTP< 250 HELP
fetchmail: SMTP> MAIL FROM:<robert@fenlanarena.co.uk> BODY=7BIT SIZE=1760
fetchmail: SMTP< 250 2.1.0 <robert@fenlanarena.co.uk>... Sender ok
fetchmail: SMTP> RCPT TO:<robert@localhost>
fetchmail: SMTP< 250 2.1.5 <robert@localhost>... Recipient ok
fetchmail: SMTP> DATA
fetchmail: SMTP< 354 Enter mail, end with "." on a line by itself
#**fetchmail: SMTP>. (EOM)
fetchmail: SMTP< 250 2.0.0 hAN0rcid002661 Message accepted for delivery
not flushed
fetchmail: POP3> RETR 2
fetchmail: POP3< +OK 1798 octets follow.
reading message robert@harpham.eclipse.co.uk@mail.eclipse.co.uk:2 of 2 (1798 octets)
fetchmail: SMTP> MAIL FROM:<robert@fenlanarena.co.uk> BODY=7BIT SIZE=1798
fetchmail: SMTP< 250 2.1.0 <robert@fenlanarena.co.uk>... Sender ok
fetchmail: SMTP> RCPT TO:<robert@localhost>
fetchmail: SMTP< 250 2.1.5 <robert@localhost>... Recipient ok
fetchmail: SMTP> DATA
fetchmail: SMTP< 354 Enter mail, end with "." on a line by itself
#**fetchmail: SMTP>. (EOM)
fetchmail: SMTP< 250 2.0.0 hAN0rcie002661 Message accepted for delivery
not flushed
fetchmail: POP3> QUIT
fetchmail: POP3< +OK Bye-bye.
fetchmail: 6.2.4 querying mail.eclipse.co.uk (protocol POP3) at Sun Nov 23 00:53:38 2003: poll completed
fetchmail: SMTP> QUIT
fetchmail: SMTP< 221 2.0.0 server.network closing connection
fetchmail: normal termination, status 0
seems to me somethink is rewriting the to address, as i can send mail from my user to anyone elce and back again with out any problems at all.

shorly i have missed somethink simple out..

many thanks
kudos
 
Old 11-22-2003, 08:35 PM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
I think you may be wanting to use procmail to sort and deliver rather than fetchmail.

# Common e-mail tools
sendmail - postfix - sends mail to local users (and internet when configured correctly)
fetchmail - gets mail from internet accounts (non-Hotmail type)
procmail - sorts and delivers into separate mailboxes
mutt - mail client that sucks less than all the others
Email the Linux Way
Suresh Ramasubramanian's email guide
The Linux Mail User HOWTO
The Linux Electronic Mail Administrator HOWTO
SquirrelMail web mail
Why use Hotmail when there is LinuxMail?
Gotmail, a utility to download mail from Hotmail type accounts
 
Old 11-23-2003, 05:05 AM   #3
kudos
Member
 
Registered: Oct 2002
Location: UK
Distribution: Fedora 4
Posts: 90

Original Poster
Rep: Reputation: 15
hi thx
i have procmail installed and i wrote a config file folwing this site
http://ii.best.vwh.net/internet/robots/procmail/qs/

my procmail config file is this
Quote:
### Begin Variables section ###

# next setting is needed if rc.spamassassin, rc.virussnag or other advanced
# recipes are called from procmailrc, but it should not be needed for the
# simple sorting recipes in this step by step action.

## SHELL=/bin/sh

# Directory for storing procmail configuration and log files
# you can name this enviroment variable anythink you like
# for example PROCMAILDIR
PMDIR=$HOME/Procmail

# LOGFILE should be specified ASAP so everythink below it is logged
LOGFILE=$PMDIR/pmlog

# to insert a blank line between each msg in the log uncomment next
# two lines
##LOG="
## "

#set to yes when debugging
## VERBOSE=yes

# replace $HOME/ to point to ur mainbox dir
MAILDIR=/var/spool/mail/robert

### Eng of variables section ###

### begin of processing section ###

#INCLUDERC=$PMDIR/rc.testing
INCLUDE=$PMDIR/rc.subscriptions

# Messages that fall through all your procmail
# recipes are delivered to tou defaul inbox
and i am still getting the same output from fetchmail and all mail is still going to the same user. as nuthink is being sorted. do i need to tell fetchmail to paas the mail onto procmail?

many thanks
kudos
 
Old 11-23-2003, 05:21 AM   #4
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
You need a filter for each mailbox you wish to sort mail to.

See Some Procmail Filters. some examples for your .procmailrc file are in the section labeled "Sorting email into separate folders"
 
Old 11-23-2003, 12:37 PM   #5
kudos
Member
 
Registered: Oct 2002
Location: UK
Distribution: Fedora 4
Posts: 90

Original Poster
Rep: Reputation: 15
ok ive made some changes to my config files

fetchmail is this
Quote:
poll mail.eclipse.co.uk
proto pop3
no dns
envelope "Delivered-To:"
user "robert@harpham.eclipse.co.uk"
pass "******"
is *
keep
fetchall
no ssl
procmail
Quote:
PMDIR=$HOME/Procmail
LOGFILE=$PMDIR/pmlog
MAILDIR=/var/spool/mail/
INCLUDERC=$PMDIR/rules.rc
rules for procmail
Quote:
put mail for robert into mail box robert
:0
* ^To_*robert@harpham.eclipse.co.uk
robert

put mail for root into mail box root
:0
* ^To_*root@harpham.eclipse.co.uk
root
log from procmail
Quote:
From robert@fenlanarena.co.uk Sun Nov 23 17:35:05 2003
Subject: test
Folder: /var/spool/mail/robert 2161
From robert@fenlanarena.co.uk Sun Nov 23 17:35:05 2003
Subject: test
Folder: /var/spool/mail/robert 2140
output of running fetchmail -v -v
Quote:
robert@server:~$ fetchmail -v -v
fetchmail: 6.2.4 querying mail.eclipse.co.uk (protocol POP3) at Sun Nov 23 17:23:07 2003: poll started
fetchmail: POP3< +OK POP3 Ready serpens.eclipse.net.uk
fetchmail: POP3> CAPA
fetchmail: POP3< -ERR Command must be one of USER, PASS or QUIT
fetchmail: Command must be one of USER, PASS or QUIT
fetchmail: Repoll immediately on robert@harpham.eclipse.co.uk@mail.eclipse.co.uk
fetchmail: POP3< +OK POP3 Ready pyxis.eclipse.net.uk
fetchmail: POP3> USER robert@harpham.eclipse.co.uk
fetchmail: POP3< +OK USER robert@harpham.eclipse.co.uk set
fetchmail: POP3> PASS *
fetchmail: POP3< +OK You are so in
fetchmail: selecting or re-polling default folder
fetchmail: POP3> STAT
fetchmail: POP3< +OK 2 3517
2 messages for robert@harpham.eclipse.co.uk at mail.eclipse.co.uk (3517 octets).
fetchmail: POP3> LIST
fetchmail: POP3< +OK POP3 clients that break here, they violate STD53.
fetchmail: POP3< 1 1768
fetchmail: POP3< 2 1749
fetchmail: POP3< .
fetchmail: POP3> RETR 1
fetchmail: POP3< +OK 1768 octets follow.
reading message robert@harpham.eclipse.co.uk@mail.eclipse.co.uk:1 of 2 (1768 octets)
About to rewrite Return-Path: <robert@fenlanarena.co.uk>
Rewritten version is Return-Path: <robert@fenlanarena.co.uk>

About to rewrite From: "Robert Harpham" <robert@fenlanarena.co.uk>
Rewritten version is From: "Robert Harpham" <robert@fenlanarena.co.uk>

About to rewrite To: <robert@harpham.eclipse.co.uk>
Rewritten version is To: <robert@harpham.eclipse.co.uk>

fetchmail: no local matches, forwarding to robert
fetchmail: SMTP< 220 server.network ESMTP Sendmail 8.12.10/8.12.10; Sun, 23 Nov 2003 17:23:15 GMT
fetchmail: SMTP> EHLO localhost
fetchmail: SMTP< 250-server.network Hello localhost [127.0.0.1], pleased to meet you
fetchmail: SMTP< 250-ENHANCEDSTATUSCODES
fetchmail: SMTP< 250-PIPELINING
fetchmail: SMTP< 250-8BITMIME
fetchmail: SMTP< 250-SIZE
fetchmail: SMTP< 250-DSN
fetchmail: SMTP< 250-ETRN
fetchmail: SMTP< 250-DELIVERBY
fetchmail: SMTP< 250 HELP
fetchmail: forwarding to localhost
fetchmail: SMTP> MAIL FROM:<robert@fenlanarena.co.uk> BODY=7BIT SIZE=1768
fetchmail: SMTP< 250 2.1.0 <robert@fenlanarena.co.uk>... Sender ok
fetchmail: SMTP> RCPT TO:<robert@localhost>
fetchmail: SMTP< 250 2.1.5 <robert@localhost>... Recipient ok
fetchmail: SMTP> DATA
fetchmail: SMTP< 354 Enter mail, end with "." on a line by itself
#**fetchmail: SMTP>. (EOM)
fetchmail: SMTP< 250 2.0.0 hANHNFFI000658 Message accepted for delivery
not flushed
fetchmail: POP3> RETR 2
fetchmail: POP3< +OK 1749 octets follow.
reading message robert@harpham.eclipse.co.uk@mail.eclipse.co.uk:2 of 2 (1749 octets)
About to rewrite Return-Path: <robert@fenlanarena.co.uk>
Rewritten version is Return-Path: <robert@fenlanarena.co.uk>


About to rewrite From: "Robert Harpham" <robert@fenlanarena.co.uk>
Rewritten version is From: "Robert Harpham" <robert@fenlanarena.co.uk>

About to rewrite To: <root@harpham.eclipse.co.uk>
Rewritten version is To: <root@harpham.eclipse.co.uk>

fetchmail: no local matches, forwarding to robert
fetchmail: forwarding to localhost
fetchmail: SMTP> MAIL FROM:<robert@fenlanarena.co.uk> BODY=7BIT SIZE=1749
fetchmail: SMTP< 250 2.1.0 <robert@fenlanarena.co.uk>... Sender ok
fetchmail: SMTP> RCPT TO:<robert@localhost>
fetchmail: SMTP< 250 2.1.5 <robert@localhost>... Recipient ok
fetchmail: SMTP> DATA
fetchmail: SMTP< 354 Enter mail, end with "." on a line by itself
#**fetchmail: SMTP>. (EOM)
fetchmail: SMTP< 250 2.0.0 hANHNFFJ000658 Message accepted for delivery
not flushed
fetchmail: POP3> QUIT
fetchmail: POP3< +OK Bye-bye.
fetchmail: 6.2.4 querying mail.eclipse.co.uk (protocol POP3) at Sun Nov 23 17:23:16 2003: poll completed
fetchmail: not swapping UID lists, no UIDs seen this query
fetchmail: SMTP> QUIT
fetchmail: SMTP< 221 2.0.0 server.network closing connection
fetchmail: Deleting fetchids file.
fetchmail: normal termination, status 0
fetchmail: Deleting fetchids file.
robert@server:~$
seems to me my sendmail is not seeing my users for the mail. i can send mail localy to root@harpham.eclipse.co.uk and back again and it all works localy fine its just reciving mail from pop3 and droping it into mail boxs is casuing the error. i have no DNS server setup

could any one shed some light on this for me?

many thanks
kudos


*************** EDIT ***********

i fixed this problem now thanks
i had to add localdomain harpham.eclipse.co.uk localhost
to my fetchmail config to force it to see my domain as local and works a treat now.

kudos

Last edited by kudos; 11-23-2003 at 06:04 PM.
 
  


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
Please Help Me with Fetchmail... JawzofDETH Fedora 2 04-22-2005 06:03 AM
Fetchmail qub333 Linux - Software 4 10-27-2004 11:09 PM
fetchmail Red Squirrel Linux - Software 0 04-15-2004 01:36 PM
Using Fetchmail! RKris Linux - Software 2 08-25-2002 05:14 AM
fetchmail wonderpun Linux - General 1 08-21-2002 10:17 AM


All times are GMT -5. The time now is 08:41 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration