PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > Fetchmail
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

Fetchmail

Réponse
 
LinkBack Outils de la discussion
Vieux 25/05/2008, 22h30   #1
Tero Mäntyvaara
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Fetchmail

Hi

How do I set fetchmail to automatically fetch mails of all user? Every
user have to give command fetchmail -a at the moment to get their mails.


Tero Mäntyvaara


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 25/05/2008, 22h50   #2
Ron Johnson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/25/08 16:17, Tero Mäntyvaara wrote:
> Hi
>
> How do I set fetchmail to automatically fetch mails of all user? Every
> user have to give command fetchmail -a at the moment to get their mails.


We have a cron job for each user that runs every N minutes.
Automatically passes the email to Postfix which runs it thru
SpamAssassin and then to maildrop and the user's Maildir.

Icedove then uses IMAP to see the pre-filtered emails.

- --
Ron Johnson, Jr.
Jefferson LA USA

ESPN makes baseball players better.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD4DBQFIOd5AS9HxQb37XmcRAsWiAJdIuF68AyorslNtdse0m/waR/oWAKCeuJ8B
Do15o1IKtd9k2+llnGE93w==
=mrE0
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 25/05/2008, 23h00   #3
Ansgar Burchardt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

Hi,

Tero Mäntyvaara <termant@gmail.com> writes:
> How do I set fetchmail to automatically fetch mails of all user? Every
> user have to give command fetchmail -a at the moment to get their
> mails.


Instead of setting up a cron job for every user as suggested by Ron, you
could also setup a system-wide fetchmail for all users via
/etc/fetchmailrc. There is already a init script provided by Debian,
but you have to enable it in /etc/default/fetchmail.

Regards,
Ansgar

--
PGP: 1024D/595FAD19 739E 2D09 0969 BEA9 9797 B055 DDB0 2FF7 595F AD19


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 25/05/2008, 23h40   #4
Carl Fink
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

On Mon, May 26, 2008 at 12:17:07AM +0300, Tero M?ntyvaara wrote:

> How do I set fetchmail to automatically fetch mails of all user? Every
> user have to give command fetchmail -a at the moment to get their mails.


Fetchmail was designed for single-user use.
--
Carl Fink nitpicking@nitpicking.com

Read my blog at blog.nitpicking.com. Reviews! Observations!
Stupid mistakes you can correct!


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 26/05/2008, 00h30   #5
John Hasler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

Tero M?ntyvaara wrote:
> How do I set fetchmail to automatically fetch mails of all user?


I created a user named "mailagent". A cron job runs fetchmail as that user
every five minutes. The mailagent user's .forward file runs the mailagent
program which forwards each user's mail. You could use procmail rather
than mailagent, of course.

Carl Fink writes:
> Fetchmail was designed for single-user use.


Read the section in the manual about multidrop.
--
John Hasler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 26/05/2008, 01h10   #6
Douglas A. Tutty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

On Mon, May 26, 2008 at 12:17:07AM +0300, Tero M?ntyvaara wrote:
> How do I set fetchmail to automatically fetch mails of all user? Every
> user have to give command fetchmail -a at the moment to get their mails.


Well, you have to enable the fetchmail system-wide daemon in
/etc/default/fetchmail

Then you have to edit the /etc/fetchmailrc

Mine has:

poll pop.porchlight.ca with protocol pop3
user 'dtutty' there with password 'XXXXX' is 'dtutty' here


For additional external email addresses (assuming each local user has
their own), you just add more user lines.

I'm on dialup and find that fetchmail doesn't try-restart or other magic
correctly, so I altered /etc/ppp/ip-up.d/fetchmail to just
/etc/init.d/fetchmail restart

If you are on the internet long-term, some have reported that fetchmail
forgets to wake up. In that case, you could have a cron job that
restarts fetchmail every hour or so (depending on how long it takes to
go into a coma).

Good luck.

Doug.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 26/05/2008, 01h50   #7
Ron Johnson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/25/08 16:57, Ansgar Burchardt wrote:
> Hi,
>
> Tero Mäntyvaara <termant@gmail.com> writes:
>> How do I set fetchmail to automatically fetch mails of all user? Every
>> user have to give command fetchmail -a at the moment to get their
>> mails.

>
> Instead of setting up a cron job for every user as suggested by Ron, you
> could also setup a system-wide fetchmail for all users via
> /etc/fetchmailrc. There is already a init script provided by Debian,
> but you have to enable it in /etc/default/fetchmail.


That's not very granular. With one job per user, each person can
decide if and how frequently to check email.

- --
Ron Johnson, Jr.
Jefferson LA USA

ESPN makes baseball players better.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIOgbAS9HxQb37XmcRAjXEAJ44PvD6Cbhh4WGdiy06aW qBWlBzQwCeIQEu
iHAvUDGVAoYBYHRRBuA29vA=
=0ppr
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 26/05/2008, 09h00   #8
Patricia Fraser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Tero,


> How do I set fetchmail to automatically fetch mails of all user?
> Every user have to give command fetchmail -a at the moment to get
> their mails.


Unless you want to use a system-wide fetchmail, you can put a line in
each user's .fetchmailrc:

set daemon nnn

where "nnn" is the number of seconds between polls - I have mine set at
900. They can then use "fetchmail -q" to shut the daemon down.

Cheers,

- --
Trish Fraser, GWQTF RP4GD
Mon May 26 08:12:37 BST 2008
GNU/Linux 1997-2007 #283226 counter.li.org
perseus up 0 hour(s), 29 min, 52 sec
kernel 2.6.18.8.tex5
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iQEVAwUBSDpjblTnxl6Z2dG4AQLcKggAmVzcZJSTkJfjzOkJS5 wdt3GHkYYQfj56
BLkhXbn3tJ6U5l8LmrKKPjelN5AqwF0YzMZOKozKntZBfuseW5 mvs+u7ZsHNk0gq
23Hc3F9PSpdncNm1e5ks3Wo0UanDH2uoZ31anL4QR4H0QUTr8C JHnirSYpjanQbA
lceq4PB0SInC7SgvuJ8QIK3ncsNvIYn6ar2dqUBpQT6gnG5l3p R/0k1j6kIfbByF
S+ch0AScMN63N4AN0lxVEZaj6ZkfFpRd/d0nU872DVUL5iYQYJnn/Br41jvnyzui
njzFMHheoQV56Q/ljcxBhoWvSdBOSk+FDOxy+u4mRyvNfDzeyOxQ9w==
=oouH
-----END PGP SIGNATURE-----
  Réponse avec citation
Vieux 27/05/2008, 11h50   #9
Tero Mäntyvaara
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

Hi!

I have modified also the files /etc/default/fetchmail and
/etc/fetchmailrc but I don't know which parameter affects to which
function. Anyway the file .fetchmailrc and user daemon are the solutions
that I was looking for. I had put that "set daemon nnn" in
..fetchmailrc, but it didn't work. :-(

What should I put in files /etc/default/fetchmail and /etc/fetchmailrc then?


Tero Mäntyvaara

Patricia Fraser wrote:
> Hi Tero,
>
>> How do I set fetchmail to automatically fetch mails of all user?
>> Every user have to give command fetchmail -a at the moment to get
>> their mails.

>
> Unless you want to use a system-wide fetchmail, you can put a line in
> each user's .fetchmailrc:
>
> set daemon nnn
>
> where "nnn" is the number of seconds between polls - I have mine set at
> 900. They can then use "fetchmail -q" to shut the daemon down.
>
> Cheers,
>



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 27/05/2008, 12h30   #10
Jamie Griffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

In my /etc/default/fetchmail file i have simply changed the variable
to "SET_DAEMON=yes"

This gives a default value of 600 seconds i believe. Should you be happy
with this you would not not need to set a daemon value.

However, if you wish to set daemon to a different value, in the
/etc/fetchmailr you can add 'set daemon 300' or to however frequently you need it to poll the server.

I use exactly this method and it works perfectly.

HTH, jamie
On Tue, May 27, 2008 at 01:42:45PM +0300, Tero Mäntyvaara wrote:
> Hi!
>
> I have modified also the files /etc/default/fetchmail and
> /etc/fetchmailrc but I don't know which parameter affects to which
> function. Anyway the file .fetchmailrc and user daemon are the solutions
> that I was looking for. I had put that "set daemon nnn" in
> .fetchmailrc, but it didn't work. :-(
>
> What should I put in files /etc/default/fetchmail and /etc/fetchmailrc then?
>
>
> Tero Mäntyvaara
>
> Patricia Fraser wrote:
>> Hi Tero,
>>
>>> How do I set fetchmail to automatically fetch mails of all user?
>>> Every user have to give command fetchmail -a at the moment to get
>>> their mails.

>>
>> Unless you want to use a system-wide fetchmail, you can put a line in
>> each user's .fetchmailrc:
>>
>> set daemon nnn
>>
>> where "nnn" is the number of seconds between polls - I have mine set at
>> 900. They can then use "fetchmail -q" to shut the daemon down.
>>
>> Cheers,
>>

>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a
> subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>


--
Jamie.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 27/05/2008, 14h10   #11
Tero Mäntyvaara
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

So if I put "SET_DAEMON=yes" to /etc/default/fetchmail and other needed
parameters to .fetchmailrc then daemon should start for every user that
has .fetchmailrc file?


Tero Mäntyvaara

Jamie Griffin wrote:
> In my /etc/default/fetchmail file i have simply changed the variable
> to "SET_DAEMON=yes"
>
> This gives a default value of 600 seconds i believe. Should you be happy
> with this you would not not need to set a daemon value.
>
> However, if you wish to set daemon to a different value, in the
> /etc/fetchmailr you can add 'set daemon 300' or to however frequently you need it to poll the server.
>
> I use exactly this method and it works perfectly.
>
> HTH, jamie
> On Tue, May 27, 2008 at 01:42:45PM +0300, Tero Mäntyvaara wrote:
>> Hi!
>>
>> I have modified also the files /etc/default/fetchmail and
>> /etc/fetchmailrc but I don't know which parameter affects to which
>> function. Anyway the file .fetchmailrc and user daemon are the solutions
>> that I was looking for. I had put that "set daemon nnn" in
>> .fetchmailrc, but it didn't work. :-(
>>
>> What should I put in files /etc/default/fetchmail and /etc/fetchmailrc then?
>>
>>
>> Tero Mäntyvaara
>>
>> Patricia Fraser wrote:
>>> Hi Tero,
>>>
>>>> How do I set fetchmail to automatically fetch mails of all user?
>>>> Every user have to give command fetchmail -a at the moment to get
>>>> their mails.
>>> Unless you want to use a system-wide fetchmail, you can put a line in
>>> each user's .fetchmailrc:
>>>
>>> set daemon nnn
>>>
>>> where "nnn" is the number of seconds between polls - I have mine set at
>>> 900. They can then use "fetchmail -q" to shut the daemon down.
>>>
>>> Cheers,
>>>

>>
>> --
>> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a
>> subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>>

>



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 27/05/2008, 15h50   #12
Christopher Judd
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

On Tuesday 27 May 2008, Tero Mäntyvaara wrote:
> Hi!
>
> I have modified also the files /etc/default/fetchmail and
> /etc/fetchmailrc but I don't know which parameter affects to which
> function. Anyway the file .fetchmailrc and user daemon are the
> solutions that I was looking for. I had put that "set daemon nnn" in
> .fetchmailrc, but it didn't work. :-(
>
> What should I put in files /etc/default/fetchmail and
> /etc/fetchmailrc then?
>
>
> Tero Mäntyvaara
>
> Patricia Fraser wrote:
> > Hi Tero,
> >
> >> How do I set fetchmail to automatically fetch mails of all user?
> >> Every user have to give command fetchmail -a at the moment to get
> >> their mails.

> >
> > Unless you want to use a system-wide fetchmail, you can put a line
> > in each user's .fetchmailrc:
> >
> > set daemon nnn
> >
> > where "nnn" is the number of seconds between polls - I have mine
> > set at 900. They can then use "fetchmail -q" to shut the daemon
> > down.
> >
> > Cheers,


What happens if you run (as root) /etc/init.d/fetchmail start (or
restart)?

-Chris

------------------------------------------------------------------------
| Christopher Judd, Ph. D. judd@wadsworth.org |
------------------------------------------------------------------------


IMPORTANT NOTICE: This e-mail and any attachments may contain
confidential or sensitive information which is, or may be, legally
privileged or otherwise protected by law from further disclosure. It
is intended only for the addressee. If you received this in error or
from someone who was not authorized to send it to you, please do not
distribute, copy or use it or any attachments. Please notify the
sender immediately by reply e-mail and delete this from your
system. Thank you for your cooperation.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 27/05/2008, 16h30   #13
Jamie Griffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

On Tue, May 27, 2008 at 03:59:55PM +0300, Tero Mäntyvaara wrote:
> So if I put "SET_DAEMON=yes" to /etc/default/fetchmail and other needed
> parameters to .fetchmailrc then daemon should start for every user that
> has .fetchmailrc file?
>
>
> Tero Mäntyvaara
>
> Jamie Griffin wrote:
>> In my /etc/default/fetchmail file i have simply changed the variable
>> to "SET_DAEMON=yes"
>>
>> This gives a default value of 600 seconds i believe. Should you be happy
>> with this you would not not need to set a daemon value.
>>
>> However, if you wish to set daemon to a different value, in the
>> /etc/fetchmailr you can add 'set daemon 300' or to however frequently
>> you need it to poll the server.
>>
>> I use exactly this method and it works perfectly.
>>
>> HTH, jamie
>> On Tue, May 27, 2008 at 01:42:45PM +0300, Tero Mäntyvaara wrote:
>>> Hi!
>>>
>>> I have modified also the files /etc/default/fetchmail and
>>> /etc/fetchmailrc but I don't know which parameter affects to which
>>> function. Anyway the file .fetchmailrc and user daemon are the
>>> solutions that I was looking for. I had put that "set daemon nnn"
>>> in .fetchmailrc, but it didn't work. :-(
>>>
>>> What should I put in files /etc/default/fetchmail and /etc/fetchmailrc then?
>>>
>>>
>>> Tero Mäntyvaara
>>>
>>> Patricia Fraser wrote:
>>>> Hi Tero,
>>>>
>>>>> How do I set fetchmail to automatically fetch mails of all user?
>>>>> Every user have to give command fetchmail -a at the moment to get
>>>>> their mails.
>>>> Unless you want to use a system-wide fetchmail, you can put a line in
>>>> each user's .fetchmailrc:
>>>>
>>>> set daemon nnn
>>>>
>>>> where "nnn" is the number of seconds between polls - I have mine set at
>>>> 900. They can then use "fetchmail -q" to shut the daemon down.
>>>>
>>>> Cheers,
>>>>

As this program is running as root and the configuration file is
system-wide the daemon will run at the specified number of seconds for all
users/accounts written within /etc/fetchmailrc.

If you're not using an LDA, such as procmail, your MTA should then
handle delivery to /var/spool/mail/$USER.

I currently only use this set up for myself as the single user on my
machine.

As Chris suggested, run /etc/init.d/fetchmail start to initiate the
daemon. It will then stop and start automatically on shutdown/boot
respectively. Check the maillogs to troubleshoot; they will confirm
what's happening.

Jamie

--
Jamie.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 27/05/2008, 16h30   #14
Tero Mäntyvaara
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail



Christopher Judd wrote:
> On Tuesday 27 May 2008, Tero Mäntyvaara wrote:
>> Hi!
>>
>> I have modified also the files /etc/default/fetchmail and
>> /etc/fetchmailrc but I don't know which parameter affects to which
>> function. Anyway the file .fetchmailrc and user daemon are the
>> solutions that I was looking for. I had put that "set daemon nnn" in
>> .fetchmailrc, but it didn't work. :-(
>>
>> What should I put in files /etc/default/fetchmail and
>> /etc/fetchmailrc then?
>>
>>
>> Tero Mäntyvaara
>>
>> Patricia Fraser wrote:
>>> Hi Tero,
>>>
>>>> How do I set fetchmail to automatically fetch mails of all user?
>>>> Every user have to give command fetchmail -a at the moment to get
>>>> their mails.
>>> Unless you want to use a system-wide fetchmail, you can put a line
>>> in each user's .fetchmailrc:
>>>
>>> set daemon nnn
>>>
>>> where "nnn" is the number of seconds between polls - I have mine
>>> set at 900. They can then use "fetchmail -q" to shut the daemon
>>> down.
>>>
>>> Cheers,

>
> What happens if you run (as root) /etc/init.d/fetchmail start (or
> restart)?


It goes like this:

# /etc/init.d/fetchmail restart
Restarting mail retriever agent: fetchmailfetchmail: no mailservers have
been specified.
failed!


Tero Mäntyvaara

>
> -Chris
>
> ------------------------------------------------------------------------
> | Christopher Judd, Ph. D. judd@wadsworth.org |
> ------------------------------------------------------------------------
>
>
> IMPORTANT NOTICE: This e-mail and any attachments may contain
> confidential or sensitive information which is, or may be, legally
> privileged or otherwise protected by law from further disclosure. It
> is intended only for the addressee. If you received this in error or
> from someone who was not authorized to send it to you, please do not
> distribute, copy or use it or any attachments. Please notify the
> sender immediately by reply e-mail and delete this from your
> system. Thank you for your cooperation.
>
>
>



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 27/05/2008, 16h30   #15
Jamie Griffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

On Tue, May 27, 2008 at 06:21:25PM +0300, Tero Mäntyvaara wrote:
>
> # /etc/init.d/fetchmail restart
> Restarting mail retriever agent: fetchmailfetchmail: no mailservers have
> been specified.
> failed!


Did you run it as root? and have you entered all the required info in
/etc/fetchmailrc?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 14/06/2008, 10h20   #16
Tero Mäntyvaara
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail



Jamie Griffin wrote:
> On Tue, May 27, 2008 at 06:21:25PM +0300, Tero Mäntyvaara wrote:
>> # /etc/init.d/fetchmail restart
>> Restarting mail retriever agent: fetchmailfetchmail: no mailservers have
>> been specified.
>> failed!

>
> Did you run it as root? and have you entered all the required info in
> /etc/fetchmailrc?
>
>

Sorry, that took so long. :-( Had been busy.

* Yes I run '/etc/init.d/fetchmail restart' as root and fetchmail daemon
has been set to run by SysV-init scripts.
* My /etc/fetchmailrc is empty
* /home/[USER_ACCOUNT]/.fetchmailrc has:
set postmaster [USER_ACCOUNT]
set bouncemail
set daemon 300

plus all e-mail account information.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 14/06/2008, 12h40   #17
Jamie Griffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

>>> # /etc/init.d/fetchmail restart
>>> Restarting mail retriever agent: fetchmailfetchmail: no mailservers
>>> have been specified.
>>> failed!

>>
>> Did you run it as root? and have you entered all the required info in
>> /etc/fetchmailrc?
>>
>>

> Sorry, that took so long. :-( Had been busy.
>
> * Yes I run '/etc/init.d/fetchmail restart' as root and fetchmail daemon
> has been set to run by SysV-init scripts.
> * My /etc/fetchmailrc is empty
> * /home/[USER_ACCOUNT]/.fetchmailrc has:
> set postmaster [USER_ACCOUNT]
> set bouncemail
> set daemon 300
>

You should have the server information in /etc/fetchmailrc not
~/.fetchmailrc if you want to run the program as root.

Jamie


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 14/06/2008, 13h00   #18
Tero Mäntyvaara
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail



Jamie Griffin wrote:
>>>> # /etc/init.d/fetchmail restart
>>>> Restarting mail retriever agent: fetchmailfetchmail: no mailservers
>>>> have been specified.
>>>> failed!
>>> Did you run it as root? and have you entered all the required info in
>>> /etc/fetchmailrc?
>>>
>>>

>> Sorry, that took so long. :-( Had been busy.
>>
>> * Yes I run '/etc/init.d/fetchmail restart' as root and fetchmail daemon
>> has been set to run by SysV-init scripts.
>> * My /etc/fetchmailrc is empty
>> * /home/[USER_ACCOUNT]/.fetchmailrc has:
>> set postmaster [USER_ACCOUNT]
>> set bouncemail
>> set daemon 300
>>

> You should have the server information in /etc/fetchmailrc not
> ~/.fetchmailrc if you want to run the program as root.
>
> Jamie
>
>


Isn't it possible to run fetchmail as root and then one process fetches
the mail of all users with of ~/.fetchmail?

If no, is there any script that executes daemon automatically for every
user that has .fetchmailrc?


Tero Mäntyvaara


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 14/06/2008, 13h20   #19
Jamie Griffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

On Sat, Jun 14, 2008 at 02:52:07PM +0300, Tero Mäntyvaara wrote:
> Isn't it possible to run fetchmail as root and then one process fetches
> the mail of all users with of ~/.fetchmail?
>
> If no, is there any script that executes daemon automatically for every
> user that has .fetchmailrc?


using individual user ~/.fetchmailrc files is probably a safer and
preferred way to use fetchmail. Running it as root obviously brings
risks which could potentially compromise the root account.

Have you tried just changing the setting 'enable daemon=yes' in the file
/etc/default/fetchmail and rebooting which should trigger the daemon
anyway?

Otherwise you could run a cron job to trigger the daemon and specify
'set daemon 300' for example in your ~/.fetchmailrc file.

Jamie


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 14/06/2008, 14h00   #20
John Hasler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

Jamie writes:
> using individual user ~/.fetchmailrc files is probably a safer and
> preferred way to use fetchmail.


Those are not the only choices. I run Fetchmail as an unprivileged user
named "mailagent" which then passes the mail to Mailagent (could just as
well be Procmail) for local sorting and delivery.
--
John Hasler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 14/06/2008, 16h30   #21
Andrew Sackville-West
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

On Sat, Jun 14, 2008 at 07:35:59AM -0500, John Hasler wrote:
> Jamie writes:
> > using individual user ~/.fetchmailrc files is probably a safer and
> > preferred way to use fetchmail.

>
> Those are not the only choices. I run Fetchmail as an unprivileged user
> named "mailagent" which then passes the mail to Mailagent (could just as
> well be Procmail) for local sorting and delivery.


It appears that the fetchmail init script does something like this
already. At least on my mail server, it is running as user "103". I'm
not sure why this user doesn't have a name, but regardless, it's not a
root process.

A

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIU+JeaIeIEqwil4YRAphcAJ93TZwFXYCtRf0WGvu9MY GnYpO1TQCglPM4
B3CjP8QqkfvsLA079my9Ris=
=yiUT
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 14/06/2008, 17h50   #22
John Hasler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

I wrote:
> Those are not the only choices. I run Fetchmail as an unprivileged user
> named "mailagent" which then passes the mail to Mailagent (could just as
> well be Procmail) for local sorting and delivery.


Andrew Sackville-West writes:
> It appears that the fetchmail init script does something like this
> already. At least on my mail server, it is running as user "103".


Yes, it appears that my method (which I developed before Fetchmail had a
daemon mode (initial version, before Fetchmail existed)) is obsolete.

> I'm not sure why this user doesn't have a name, but regardless, it's not
> a root process.


103 should be the user "fetchmail".
--
John Hasler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 14/06/2008, 18h40   #23
Andrew Sackville-West
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

On Sat, Jun 14, 2008 at 11:25:00AM -0500, John Hasler wrote:
> I wrote:
> > Those are not the only choices. I run Fetchmail as an unprivileged user
> > named "mailagent" which then passes the mail to Mailagent (could just as
> > well be Procmail) for local sorting and delivery.

>
> Andrew Sackville-West writes:
> > It appears that the fetchmail init script does something like this
> > already. At least on my mail server, it is running as user "103".

>
> Yes, it appears that my method (which I developed before Fetchmail had a
> daemon mode (initial version, before Fetchmail existed)) is obsolete.
>
> > I'm not sure why this user doesn't have a name, but regardless, it's not
> > a root process.

>
> 103 should be the user "fetchmail".


yeah. I need to find out why `ps aux` shows fetchmail run by user
'103' and exim run by user '101' instead of by their names...

A

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIVADLaIeIEqwil4YRAsksAJkB5P5vXHbN3RKtvKorLA GcM5avOQCeKXuv
yyJ7veXoqCeTKySFZJhVr8A=
=SwaW
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 14/06/2008, 19h30   #24
Eduardo M KALINOWSKI
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

Andrew Sackville-West wrote:
> yeah. I need to find out why `ps aux` shows fetchmail run by user
> '103' and exim run by user '101' instead of by their names...
>


I believe it has to do with the length of the name. (Even tough
fetchmail does not seem very long.)

Taken from
http://wiki.debian.org/PkgExim4UserF...b5707a0b2cea6d

--
Conscience doth make cowards of us all.
-- Shakespeare

Eduardo M KALINOWSKI
eduardo@kalinowski.com.br
http://move.to/hpkb


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 14/06/2008, 23h00   #25
James Richardson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Fetchmail

Andrew Sackville-West wrote:
> [snip]
> yeah. I need to find out why `ps aux` shows fetchmail run by user
> '103' and exim run by user '101' instead of by their names...
>
> A


Their names are longer than 8 characters.

--
James Richardson
James Richardson Technology Consulting
http://www.jamesr.biz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIVD6FklHVouX74MURAtU6AKCMvAuOkx7emQmBemJo2j pd+Km22ACeNPX/
Vdoiy3ITRv3baKeJQ0HGH9k=
=1iNx
-----END PGP SIGNATURE-----

  Réponse avec citation
Réponse


Outils de la discussion