New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Can Fetchmail be configured to leave a copy on mail server?

Got problems with Bubba? Then this forum is for you.
Locked
GaryL
Posts: 87
Joined: 04 Sep 2007, 17:40
Location: Northern Ireland

Can Fetchmail be configured to leave a copy on mail server?

Post by GaryL »

Hi,

I have a couple of pop3 email retrievals set up in bubba, but I would like bubba to leave a copy of the email on the remote email server.

Can I configure Fetchmail to do this? And if so, how.



Many Thanks.
Gary


.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Post by Ubi »

yes

which you would know if you coulf be bothered to look into the manual pages of fetchmail:

-k | --keep
(Keyword: keep) Keep retrieved messages on the remote mailserver. Normally, messages are deleted from the folder on the mailserver after they have been retrieved. Specifying the keep option causes retrieved messages to remain in your folder on the mailserver. This option does not work with ETRN or ODMR.
ian
Posts: 128
Joined: 30 Jul 2007, 09:07

Post by ian »

What is it with the agressive attitude?

The guy asked a fair question, which simply needed an answer. If everybody read all of the manuals all of the time, we would hardly need a forum... And anyway, where is this manual to be found?

Sometimes it's easier to ask a question to those who know more than you do than to spend hours trying to find the answer elsewhere; that's the whole point of a forum. If people can't answer reasonable questions without being unpleasant, this will simply put off others from asking apparently sensible questions which *they* don't know the answer to, for fear of being abused/embarrassed by fellow forum users.
paolol61
Posts: 99
Joined: 20 Nov 2007, 04:18

Post by paolol61 »

The manual is here
http://fetchmail.berlios.de/fetchmail-man.html#19

Please don't fight :)
8)
ian
Posts: 128
Joined: 30 Jul 2007, 09:07

Post by ian »

OK, I've taken a look at the manual, and to me it's still not clear how to do what GaryL asked, for the following reasons:

1. how does one actually configure fetchmail to use the options -k | --keep?

2. I have no idea what ETRN or ODMR actually means, and this does not appear to be explained in the manual; understanding what these modes are and knowing whether or not fetchmail on the bubba runs in one of these modes seems to be pretty important when determining if the -k option will actually have the desired effect.

Therefore, the second part of GaryL's question still stands; how do you configure fetchmail on the bubba to do what he wants, because, as a relative noobie, I certainly can't see how to do it...?
paolol61
Posts: 99
Joined: 20 Nov 2007, 04:18

Post by paolol61 »

Hi Ian,
I'm new to Unix too so I can just tell very little :
1) you must connect to the server ( BUBBA ) with PuTTY ( MSwindows), login as the enable user ( see setting in bubba) and at the prompt do a "su" enter the root password so the prompt change to
servername:#
at this do a
cd /etc
then call the editor, i use vi http://unixhelp.ed.ac.uk/vi/ref.html
vi fetchmailrc
and edit the file, I guess you have to put the -k as the end of each line describing the connection ( after user,password ).
But I'm not sure about this.
:?
UBI be nice as you always hare :) help :)
Thanks,
Paolol
8)
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Post by Ubi »

ian wrote: Sometimes it's easier to ask a question to those who know more than you do than to spend hours trying to find the answer elsewhere; that's the whole point of a forum. If people can't answer reasonable questions without being unpleasant, this will simply put off others from asking apparently sensible questions which *they* don't know the answer to, for fear of being abused/embarrassed by fellow forum users.
I really and truely disagree on that. If people flood forums with question they could have known the answer to by simply spending 5 seconds on google but instead ask someone else to do this for them it takes away room for questions that are difficult and actually do need outside help. I've seen many forums be reduced to a noob festival because the only people bothered to stick around and answer messages are the ones that do not go over the level of "man fetchmail". So at least try to show you actually spent time solving the problem before asking someone else to do it for you. It is really impolite and reduced the long-term quality of the forum
ian
Posts: 128
Joined: 30 Jul 2007, 09:07

Post by ian »

Ubi,
you are still wrong, which if you had bothered to read my second posting, you might have understood. The fetchmail manual does not tell you how to invoke the -k option, as it is not obvious (to us noobs at least) how to actually configure fetchmail; you did not actually answers GaryL's question (how do you do this?), whereas Paolol did.

So, I stand by what I said before. GaryL's 2nd question (And if so, how.) was a perfectly valid question to ask this forum, whether you think so or not.


Ian.
eeeuser1
Posts: 37
Joined: 03 Dec 2007, 05:06

Post by eeeuser1 »

Ubi wrote:
ian wrote: Sometimes it's easier to ask a question to those who know more than you do than to spend hours
by simply spending 5 seconds on google but instead ask someone else to do this
A big difference between 5 seconds and hours boyo, he said hours not 5 seconds. You can't pick n choose bits to make his question suit your reply.
paolol61
Posts: 99
Joined: 20 Nov 2007, 04:18

Post by paolol61 »

here is a sample of keep
----
poll smtp.ccmr.cornell.edu
uidl
proto kpop
auth kerberos
user afsusername
keep
---

More at
http://cf.ccmr.cornell.edu/docs/instruc ... hmail.html
8)
GaryL
Posts: 87
Joined: 04 Sep 2007, 17:40
Location: Northern Ireland

Post by GaryL »

When you add a mail retrieval through web-admin you get the following in the fetchmailrc file:

Code: Select all

poll mail.myisp.co.uk with proto POP3
        user 'garyl@myisp.co.uk' there with password 'mypwd' is 'garyl' here
I tried:

Code: Select all

poll mail.myisp.co.uk with proto POP3
        user 'garyl@myisp.co.uk' there with password 'mypwd' is 'garyl' here
        uidl keep
But it didn't appear to work.

I also tried the following, but this was a no go as well, plus it doesn't show in web-admin then either:

Code: Select all

poll mail.myisp.co.uk
     uidl 
     proto POP3 
     user garyl@myisp.co.uk
     password mypwd
     keep 

How do I trigger to run the fetchmail service manually instead of waiting x amount of minutes for it to run automatically. It would help with testing if it works.
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

Post by 6feet5 »

Hi Gary,

Try adding the "uidl keep" after the 'here' command. Something like

Code: Select all

poll pop.gmail.com with proto POP3
        user 'gmailuser' there with password 'secret' is 'bubbauser' here ssl uidl keep
I'm no fetchmail expert so I can't tell if that additional CR will make a difference, but the above has worked for me (though I never used the uidl). Also, while experimenting with the settings, you can disable fetchmail with

Code: Select all

/etc/init.d/fetchmail stop
Now you're free to edit the rules and you can test them with:

Code: Select all

fetchmail --version -f /etc/fetchmailrc
(this will list all acounts with its rules). You need to be root to run this. No connection will be
established, this is only for testing.

Once you're ready to test them against the mail server, issue a

Code: Select all

fetchmail -f /etc/fetchmailrc -d0
That will connect to mailserver without starting the daemon.
When your ready to start the daemon, issue:

Code: Select all

/etc/init.d/fetchmail start
Good luck
/Johan
paolol61
Posts: 99
Joined: 20 Nov 2007, 04:18

Post by paolol61 »

Hi, just to make sure I understand correctly I did test last night.
Today I checked if all was Ok and it works :)
So this is the change a I did :
user 'gmailuser' there with password 'secret' is 'bubbauser' here
at this I added the keep
user 'gmailuser' there with password 'secret' is 'bubbauser' here keep
no uidl in the line and no ssl on my case.
Hope this help :)
8)
Eek
Posts: 372
Joined: 23 Dec 2007, 03:03
Location: the Netherlands

Post by Eek »

just a tip
if you upgrade your postfix to a version greater than 2.2.10,
you can also send mail using gmail.
I upgraded to the etch version 2.3.8-2, but you could also use the available sarge-backports.

cheers
Eek
GaryL
Posts: 87
Joined: 04 Sep 2007, 17:40
Location: Northern Ireland

Post by GaryL »

Thanks Guys.

The problem seems to be it doesn't like when i use uidl.

It works fine when I use keep on its own.
Locked