From: Johan V. <fet...@bo...> - 2007-08-15 10:45:39
|
Hello all, At the beginning of this month I changed the username of one of my users but I forgot to change the corresponding username in the fetchmailrc config (so the username in the fetchmailrc config didn't exist anymore). For the last month fetchmail has been fetching my mails but didn't found a user on the local system (errormsg see title). What did fetchmail do with these mails (they are not on the server)? Are they stored somewhere or did I loose all the mails? Thanks in advance, Johan Vandeweerd |
From: Rob M. <rob...@gm...> - 2007-08-15 12:41:20
|
On 8/15/07, Johan Vandeweerd <fet...@bo...> wrote: > Hello all, > > At the beginning of this month I changed the username of one of my users > but I forgot to change the corresponding username in the fetchmailrc > config (so the username in the fetchmailrc config didn't exist anymore). > For the last month fetchmail has been fetching my mails but didn't found > a user on the local system (errormsg see title). > What did fetchmail do with these mails (they are not on the server)? Are > they stored somewhere or did I loose all the mails? It depends on a lot of things you haven't told us, not least of which is the configuration of fetchmail and whatever SMTP server you are running. I would expect that, by default, your SMTP server returned a "no such user" type error and fetchmail generated bounce message (as detailed in the FAQ), deleting the message from the remote POP/IMAP server. If you consult your mail log it should tell you. -- Please keep list traffic on the list. Rob MacGregor Whoever fights monsters should see to it that in the process he doesn't become a monster. Friedrich Nietzsche |
From: Johan V. <fet...@bo...> - 2007-08-15 13:06:13
|
Rob MacGregor wrote: > On 8/15/07, Johan Vandeweerd <fet...@bo...> wrote: > >> Hello all, >> >> At the beginning of this month I changed the username of one of my users >> but I forgot to change the corresponding username in the fetchmailrc >> config (so the username in the fetchmailrc config didn't exist anymore). >> For the last month fetchmail has been fetching my mails but didn't found >> a user on the local system (errormsg see title). >> What did fetchmail do with these mails (they are not on the server)? Are >> they stored somewhere or did I loose all the mails? >> > > It depends on a lot of things you haven't told us, not least of which > is the configuration of fetchmail and whatever SMTP server you are > running. > > I would expect that, by default, your SMTP server returned a "no such > user" type error and fetchmail generated bounce message (as detailed > in the FAQ), deleting the message from the remote POP/IMAP server. If > you consult your mail log it should tell you. > > I use postfix and courier. My fetchmailrc looks like this: set no bouncemail set daemon 600 defaults: antispam -1 batchlimit 100 poll pluto.sygmanet.be with protocol pop3 user "myemail" there with password "mypassword" is myusername here In the logs I find things like this: Aug 12 06:12:01 cyclops fetchmail[3067]: awakened at Sun 12 Aug 2007 06:12:01 AM CEST Aug 12 06:12:01 cyclops fetchmail[3067]: Server certificate verification error: self signed certificate Aug 12 06:12:01 cyclops fetchmail[3067]: Server certificate verification error: certificate has expired Aug 12 06:12:01 cyclops fetchmail[3067]: 1 message for myemailaddress at remoteserver (20949 octets). Aug 12 06:12:01 cyclops postfix/smtpd[19248]: connect from localhost[127.0.0.1] Aug 12 06:12:01 cyclops postfix/smtpd[19248]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <oldusername@localhost>: Recipient address rejected: User unknown in local recipient table; from=<fre...@uc...> to=<oldusername@localhost> proto=ESMTP helo=<localserver> Aug 12 06:12:01 cyclops fetchmail[3067]: reading message remoteusername@remoteserver:1 of 1 (20949 octets) (log message incomplete) Aug 12 06:12:01 cyclops fetchmail[3067]: SMTP error: 550 5.1.1 <oldusername@localhost>: Recipient address rejected: User unknown in local recipient table Aug 12 06:12:01 cyclops postfix/smtpd[19251]: connect from localhost[127.0.0.1] Aug 12 06:12:01 cyclops postfix/smtpd[19251]: EBAE7214DF2: client=localhost[127.0.0.1] Aug 12 06:12:01 cyclops fetchmail[3067]: mail from MAILER-DAEMON@localserver bounced to fetchmail Aug 12 06:12:02 cyclops postfix/cleanup[19252]: EBAE7214DF2: message-id=<20070812041201.EBAE7214DF2@localserver> Aug 12 06:12:02 cyclops postfix/smtpd[19251]: disconnect from localhost[127.0.0.1] Aug 12 06:12:02 cyclops postfix/qmgr[2967]: EBAE7214DF2: from=<>, size=2340, nrcpt=1 (queue active) Aug 12 06:12:02 cyclops postfix/smtpd[19248]: 0B354214DF4: client=localhost[127.0.0.1] Aug 12 06:12:02 cyclops postfix/cleanup[19252]: 0B354214DF4: message-id=<be1a01c7dca5$f0d405d0$0fff6d29@fredcoxaaxue> Aug 12 06:12:02 cyclops postfix/local[19253]: EBAE7214DF2: to=<fetchmail@localserver>, orig_to=<fetchmail>, relay=local, delay=0.13, delays=0.1/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to maildir) Aug 12 06:12:02 cyclops postfix/qmgr[2967]: EBAE7214DF2: removed Aug 12 06:12:02 cyclops postfix/qmgr[2967]: 0B354214DF4: from=<fre...@uc...>, size=21319, nrcpt=1 (queue active) Aug 12 06:12:02 cyclops fetchmail[3067]: flushed Aug 12 06:12:02 cyclops postfix/local[19253]: 0B354214DF4: to=<fetchmail@localhost>, relay=local, delay=0.17, delays=0.17/0/0/0, dsn=2.0.0, status=sent (delivered to maildir) Aug 12 06:12:02 cyclops postfix/qmgr[2967]: 0B354214DF4: removed Where are those bouncemessage sent to? Or how could I have noticed this earlier? The old mails are lost, I presume? Thanks Johan Vandeweerd |
From: Rob M. <rob...@gm...> - 2007-08-15 14:38:54
|
On 8/15/07, Johan Vandeweerd <fet...@bo...> wrote: > > My fetchmailrc looks like this: > > set no bouncemail So, if you're running as root bounced mail will be directed to postmaster, otherwise the user running fetchmail (as detailed in the man page). > set daemon 600 > defaults: > antispam -1 The default antispam list is empty - I'm not sure what you're thinking to achieve with this. > In the logs I find things like this: > <---SNIP---> > Aug 12 06:12:01 cyclops postfix/smtpd[19251]: connect from > localhost[127.0.0.1] > Aug 12 06:12:01 cyclops postfix/smtpd[19251]: EBAE7214DF2: > client=localhost[127.0.0.1] Fetchmail starts the process of sending the bounce message > Aug 12 06:12:01 cyclops fetchmail[3067]: mail from > MAILER-DAEMON@localserver bounced to fetchmail > Aug 12 06:12:02 cyclops postfix/cleanup[19252]: EBAE7214DF2: > message-id=<20070812041201.EBAE7214DF2@localserver> > Aug 12 06:12:02 cyclops postfix/smtpd[19251]: disconnect from > localhost[127.0.0.1] > Aug 12 06:12:02 cyclops postfix/qmgr[2967]: EBAE7214DF2: from=<>, > size=2340, nrcpt=1 (queue active) > Aug 12 06:12:02 cyclops postfix/smtpd[19248]: 0B354214DF4: > client=localhost[127.0.0.1] > Aug 12 06:12:02 cyclops postfix/cleanup[19252]: 0B354214DF4: > message-id=<be1a01c7dca5$f0d405d0$0fff6d29@fredcoxaaxue> > Aug 12 06:12:02 cyclops postfix/local[19253]: EBAE7214DF2: > to=<fetchmail@localserver>, orig_to=<fetchmail>, relay=local, > delay=0.13, delays=0.1/0.01/0/0.02, dsn=2.0.0, status=sent > (delivered to maildir) Bounce message delivered to the account "fetchmail" > Where are those bouncemessage sent to? Or how could I have noticed this > earlier? They're delivered to the "fetchmail" user (the one running fetchmail). You could have noticed this earlier by monitoring that account's email :) Easiest approach is probably to alias that to the postmaster address, which you should also be monitoring. > The old mails are lost, I presume? Depends on what was in the bounce - I haven't seen a fetchmail bounce so I can't say. If fetchmail is only providing the minimal "Your message titled X could not be delivered" then you're out of luck. -- Please keep list traffic on the list. Rob MacGregor Whoever fights monsters should see to it that in the process he doesn't become a monster. Friedrich Nietzsche |
From: Johan V. <fet...@bo...> - 2007-08-15 14:51:26
|
> The default antispam list is empty - I'm not sure what you're thinking > to achieve with this. > I let my local mailclient handle the spam (move to spamfolder) so I have more control over my spam. > So, if you're running as root bounced mail will be directed to > postmaster, otherwise the user running fetchmail (as detailed in the > man page). > Fetchmail is run systemwide as root. In /etc/aliases everything is aliased to root and the final statement is an alias from root to the old username that doesn't exist anymore. Normally I recieve all message on my mailbox, but I forgot to change the alias :-S Greetings Johan Vandeweerd |
From: Rob M. <rob...@gm...> - 2007-08-15 15:17:25
|
On 8/15/07, Johan Vandeweerd <fet...@bo...> wrote: > > > The default antispam list is empty - I'm not sure what you're thinking > > to achieve with this. > > > I let my local mailclient handle the spam (move to spamfolder) so I have > more control over my spam. Yes, but you're replacing the empty list with a list containing the value "-1". I'm not sure what fetchmail will do with this internally ("fetchmail --configdump" will tell you), but it may just bite you later. > Fetchmail is run systemwide as root. Which is a bad idea and if you were running a vaguely recent version it would be warning you about this. However your logs suggest that it's being run as the user fetchmail - either that or the fetchmailrc file you provided isn't the one you're using. > In /etc/aliases everything is > aliased to root and the final statement is an alias from root to the old > username that doesn't exist anymore. Ah, the old game of shooting yourself in the foot with a rocket launcher :) I'm afraid there's nothing fetchmail can do to protect you from this. -- Please keep list traffic on the list. Rob MacGregor Whoever fights monsters should see to it that in the process he doesn't become a monster. Friedrich Nietzsche |
From: Johan V. <fet...@bo...> - 2007-08-15 15:27:25
|
> Which is a bad idea and if you were running a vaguely recent version > it would be warning you about this. However your logs suggest that > it's being run as the user fetchmail - either that or the fetchmailrc > file you provided isn't the one you're using. > You're right. It runs as a daemon at startup but as user fetchmail. > Ah, the old game of shooting yourself in the foot with a rocket > launcher :) I'm afraid there's nothing fetchmail can do to protect > you from this. How have you configured it or how would you do it? Thanks for all the advice and help btw ;-) Greetings Johan Vandeweerd |
From: Rob M. <rob...@gm...> - 2007-08-15 16:15:58
|
On 8/15/07, Johan Vandeweerd <fet...@bo...> wrote: > > You're right. It runs as a daemon at startup but as user fetchmail. :) > How have you configured it or how would you do it? Well, I have a separate admin mailbox that all mail for a number of admin related addresses goes to (postmaster, hostmaster, abuse and the others mentioned by an RFC I don't remember the number of). I've also got a catchall mailbox for last resort delivery - it almost never receives mail, but it has come in handy a few times. Lastly, I use Hobbit (hobbitmon.sf.net) to monitor all my systems, including logfile monitoring. It's the work of a few moments to set it to produce an alert when fetchmail generates an error message. Just make sure it sends emails to an off-network mailbox as well as to a local one, so that if you break your local mailbox you still get notified (and visit the web page so you can eyeball the status in case you completely break your email). > Thanks for all the advice and help btw ;-) I'm happy to help those who're willing to work towards a solution and provide the information asked for :) -- Please keep list traffic on the list. Rob MacGregor Whoever fights monsters should see to it that in the process he doesn't become a monster. Friedrich Nietzsche |
From: Johan V. <fet...@bo...> - 2007-08-15 16:21:27
|
> Well, I have a separate admin mailbox that all mail for a number of > admin related addresses goes to (postmaster, hostmaster, abuse and the > others mentioned by an RFC I don't remember the number of). I've also > got a catchall mailbox for last resort delivery - it almost never > receives mail, but it has come in handy a few times. > > Lastly, I use Hobbit (hobbitmon.sf.net) to monitor all my systems, > including logfile monitoring. It's the work of a few moments to set > it to produce an alert when fetchmail generates an error message. > Just make sure it sends emails to an off-network mailbox as well as to > a local one, so that if you break your local mailbox you still get > notified (and visit the web page so you can eyeball the status in case > you completely break your email) Thanks for the advice. I'll check into it. Greets Johan Vandeweerd |