fetchmail-friends
[Top] [All Lists]

[fetchmail]how best to do this?

2005-08-03 08:18:53
Hi,

I have built a mail server, and it works the way I want ... almost.

The last part is ... you guessed it ... fetchmail.

I am trying to use it to download all user's messages. I am using fastmail.fm.

I currently have fastmail set up to filter each user's messages into separate folders. Fastmail allows you to log in with a login name like this fastmailuser+foldername(_at_)fastmail(_dot_)fm in order to access individual folders.

I plan to do it this way because I heard that it can cause problems to have fastmail fetch all messages from the same mailbox - something to do with messages that are copied to multiple users only getting to one of them. Fastmail seems to be able to filter the messages into different folders reliably under those circumstances, so I figured I would make use of the feature.

However, the only way I've managed to get it working is like this :

foreach folder {
 fetchmail connects
 fetchmail checks SSL
 fetchmail logs in
 fetchmail downloads messages
 fetchmail logs out
 fetchmail disconnects
}

Is there a way of doing it like this :

fetchmail connects
fetchmail checks SSL
foreach folder {
  fetchmail logs in
  fetchmail downloads messages
  fetchmail logs out
}
fetchmail disconnects

... or is there a better way of doing what I want?

Max.

Notes :
1) I'm using this fetchmail script :

set syslog
set postmaster postmaster
set no bouncemail
poll POP3SERVER
envelope "Envelope-to:"
protocol POP3
nodns
localdomains MYDOMAIN
user 'FASTMAILUSER+USER1FOLDER(_at_)fastmail(_dot_)fm' with pass "*****" is * here options ssl sslcertck sslcertpath '.../.certs' smtphost localhost user 'FASTMAILUSER+USER2FOLDER(_at_)fastmail(_dot_)fm' with pass "*****" is * here options ssl sslcertck sslcertpath '.../.certs' smtphost localhost
mda "/usr/sbin/sendmail -t"

2) some maillog output :

fetchmail[9645]: 6.2.5 querying POP3SERVER (protocol POP3) at Wed 03 Aug 2005 08:13:22 PM CST: poll started fetchmail[9645]: Issuer Organization: Thawte Consulting cc fetchmail[9645]: Issuer CommonName: Thawte Server CA fetchmail[9645]: Server CommonName: POP3SERVER fetchmail[9645]: POP3SERVER key fingerprint: bla fetchmail[9645]: POP3< +OK POP3 Ready POP3SERVER bla fetchmail[9645]: POP3> CAPA fetchmail[9645]: POP3< +OK Capability list follows, mate fetchmail[9645]: POP3< EXPIRE NEVER fetchmail[9645]: POP3< LOGIN-DELAY 0 fetchmail[9645]: POP3< TOP fetchmail[9645]: POP3< UIDL fetchmail[9645]: POP3< PIPELINING fetchmail[9645]: POP3< RESP-CODES fetchmail[9645]: POP3< AUTH-RESP-CODE fetchmail[9645]: POP3< USER fetchmail[9645]: POP3< . fetchmail[9645]: POP3> USER FASTMAILUSER+USER1FOLDER(_at_)fastmail(_dot_)fm fetchmail[9645]: POP3< +OK USER FASTMAILUSER+USER1FOLDER(_at_)fastmail(_dot_)fm set, mate fetchmail[9645]: POP3> PASS * fetchmail[9645]: POP3< +OK LOGIN Welcome fetchmail[9645]: POP3> STAT fetchmail[9645]: POP3< +OK 0 0 fetchmail[9645]: No mail for FASTMAILUSER+USER1FOLDER(_at_)fastmail(_dot_)fm at POP3SERVER fetchmail[9645]: POP3> QUIT fetchmail[9645]: POP3< +OK fetchmail[9645]: 6.2.5 querying POP3SERVER (protocol POP3) at Wed 03 Aug 2005 08:13:39 PM CST: poll completed fetchmail[9645]: 6.2.5 querying POP3SERVER (protocol POP3) at Wed 03 Aug 2005 08:13:39 PM CST: poll started fetchmail[9645]: Issuer Organization: Thawte Consulting cc fetchmail[9645]: Issuer CommonName: Thawte Server CA fetchmail[9645]: Server CommonName: POP3SERVER fetchmail[9645]: POP3SERVER key fingerprint: bla fetchmail[9645]: POP3< +OK POP3 Ready POP3SERVER bla fetchmail[9645]: POP3> CAPA fetchmail[9645]: POP3< +OK Capability list follows, mate fetchmail[9645]: POP3< EXPIRE NEVER fetchmail[9645]: POP3< LOGIN-DELAY 0 fetchmail[9645]: POP3< TOP fetchmail[9645]: POP3< UIDL fetchmail[9645]: POP3< PIPELINING fetchmail[9645]: POP3< RESP-CODES fetchmail[9645]: POP3< AUTH-RESP-CODE fetchmail[9645]: POP3< USER fetchmail[9645]: POP3< . fetchmail[9645]: POP3> USER FASTMAILUSER+USER2FOLDER(_at_)fastmail(_dot_)fm fetchmail[9645]: POP3< +OK USER FASTMAILUSER+USER2FOLDER(_at_)fastmail(_dot_)fm set, mate fetchmail[9645]: POP3> PASS * fetchmail[9645]: POP3< +OK LOGIN Welcome fetchmail[9645]: POP3> STAT fetchmail[9645]: POP3< +OK 0 0 fetchmail[9645]: No mail for FASTMAILUSER+USER2FOLDER(_at_)fastmail(_dot_)fm at POP3SERVER fetchmail[9645]: POP3> QUIT fetchmail[9645]: POP3< +OK fetchmail[9645]: 6.2.5 querying POP3SERVER (protocol POP3) at Wed 03 Aug 2005 08:13:56 PM CST: poll completed fetchmail[9645]: normal termination, status 1

_______________________________________________
Fetchmail-friends mailing list
Fetchmail-friends(_at_)lists(_dot_)ccil(_dot_)org
http://lists.ccil.org/cgi-bin/mailman/listinfo/fetchmail-friends

<Prev in Thread] Current Thread [Next in Thread>