From: Ivan I. <nos...@ml...> - 2007-02-21 13:14:39
|
My ISP forwards all mail for my domain at one account. I than use fetchmail to download all mail to my box, MailScanner to scan for spam and viruses (for winblows users) and sendmail distribute it to users on local network. Hire is my .fetchmailrc: # Configuration created Mon Dec 1 12:45:17 2003 by fetchmailconf set logfile "/var/log/fetchMailByIva" set postmaster "iva" # set nobouncemail set no spambounce set properties "" poll pop3.ourisp.net with proto POP3: localdomains ourdomain.org user 'ouruseratisp' there with password 'pass' is * here It's a low traffic on dial-up connection. Fedora Core 1 (about to be replaced with Debian etch). Now to the problem. Recently we started to receive a lot of (large) mail that is for the users that do not exist (do not have accounts) on local mail server. Since this takes a lot of dial-up time, I was wondering if there is a possibility for fetchmail to delete such mail. Hire is a log of (small) unwanted mail: ----------------------------------------------------------------------- fetchmail: SMTP< 250 2.0.0 l1J7MJS8002870 Message accepted for delivery fetchmail: flushed fetchmail: POP3> DELE 1 fetchmail: POP3< +OK fetchmail: POP3> TOP 2 99999999 fetchmail: POP3< +OK fetchmail: reading message something.somethingelse.org:2 of 2 (1428 \ octets) fetchmail: SMTP> MAIL FROM:<som...@so...> BODY=7BIT SIZE=1428 fetchmail: SMTP< 250 2.1.0 <som...@so...>... Sender ok fetchmail: SMTP> RCPT TO:<Non...@ou...> fetchmail: SMTP< 550 5.1.1 <Non...@ou...>... User \ unknown fetchmail: SMTP error: 550 5.1.1 <Non...@ou...>...\ User unknown fetchmail: SMTP listener doesn't like recipient address \ `Non...@ou...' fetchmail: SMTP< 220 something.somethingelse.org ESMTP Sendmail \ 8.12.10/8.12.10; Mon, 19 Feb 2007 08:22:48 +0100 fetchmail: SMTP> HELO localhost fetchmail: SMTP< 250 something.somethingelse.org Hello \ something.somethingelse.org [127.0.0.1], pleased to meet you fetchmail: SMTP> MAIL \ FROM:<FET...@so...> fetchmail: SMTP< 250 2.1.0 \ <FET...@so...>... Sender ok fetchmail: SMTP> RCPT TO:<som...@so...> fetchmail: SMTP< 250 2.1.5 <som...@so...>... Recipient ok fetchmail: SMTP> DATA fetchmail: SMTP< 354 Enter mail, end with "." on a line by itself fetchmail: SMTP: (bounce-message body) fetchmail: SMTP>. (EOM) fetchmail: SMTP< 250 2.0.0 l1J7MmS8002892 Message accepted for delivery fetchmail: SMTP> QUIT fetchmail: SMTP< 221 2.0.0 something.somethingelse.org closing \ connection fetchmail: SMTP> RCPT TO:<iva@localhost> fetchmail: SMTP< 250 2.1.5 <iva@localhost>... Recipient ok fetchmail: no address matches; forwarding to iva. fetchmail: SMTP> DATA fetchmail: SMTP< 354 Enter mail, end with "." on a line by itself #*fetchmail: SMTP>. (EOM) fetchmail: SMTP< 250 2.0.0 l1J7MJS9002870 Message accepted for delivery fetchmail: flushed fetchmail: POP3> DELE 2 fetchmail: POP3< +OK fetchmail: POP3> QUIT fetchmail: POP3< +OK fetchmail: 6.2.0 querying pop3.infosky.net (protocol POP3) at Mon 19 Feb 2007 08:22:49 AM CET: poll completed fetchmail: SMTP> QUIT fetchmail: SMTP< 221 2.0.0 something.somethingelse.org closing connection fetchmail: normal termination, status 0 ----------------------------------------------------------------------- As you can see mail was delivered to iva@localhost (me) as it is set in ~/.fetchmailrc. I can set postmaster to empty string, but mail still gets downloaded (which is what I am trying to avoid), it only gets discarded. -- ___ ____ /__/ / \ ** Registrovani korisnik Linuksa #291606 ** / / \/ /\ \ ** Registered Linux user #291606 ** /__/\____/--\__\ ** http://counter.li.org/ ** |
From: Rob M. <rob...@gm...> - 2007-02-21 14:14:42
|
On 2/21/07, Ivan Imperl <nos...@ml...> wrote: > My ISP forwards all mail for my domain at one account. I than use > fetchmail to download all mail to my box, MailScanner to scan for > spam and viruses (for winblows users) and sendmail distribute it to > users on local network. Hire is my .fetchmailrc: > > # Configuration created Mon Dec 1 12:45:17 2003 by fetchmailconf > set logfile "/var/log/fetchMailByIva" > set postmaster "iva" > # set nobouncemail > set no spambounce > set properties "" > > poll pop3.ourisp.net with proto POP3: > localdomains ourdomain.org > user 'ouruseratisp' there with password 'pass' is * here > > It's a low traffic on dial-up connection. Fedora Core 1 (about to be > replaced with Debian etch). > > Now to the problem. Recently we started to receive a lot of (large) mail > that is for the users that do not exist (do not have accounts) on local > mail server. Since this takes a lot of dial-up time, I was wondering if > there is a possibility for fetchmail to delete such mail. You could configure 550 as an anti-spam code (see the man page), but keep in mind that if somebody mis-types an email address it'll just get deleted and you'll never know. Note too that you really should have set the envelope header option to correctly parse multi-drop emails - see the man page again. Not doing this can lead to email going places you weren't expecting (like being dropped on the floor). -- 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: Ivan I. <nos...@ml...> - 2007-02-22 09:14:49
|
Nedavno Rob MacGregor pise: | You could configure 550 as an anti-spam code (see the man page), but | keep in mind that if somebody mis-types an email address it'll just | get deleted and you'll never know. I did. Here: ----------------------------------------------------------------- # Configuration created Mon Dec 1 12:45:17 2003 by fetchmailconf set logfile "/var/log/fetchMailByIva" set postmaster "iva" set no bouncemail set no spambounce set properties "" poll pop3.ourisp.net with proto POP3: localdomains ourdomain.org user 'ouruseratisp' there with password 'pass' is * here antispam 550 ----------------------------------------------------------------- but it had no difference: ----------------------------------------------------------------- fetchmail: SMTP> MAIL FROM:<so...@so...> BODY=7BIT SIZE=1428 fetchmail: SMTP< 250 2.1.0 <so...@so...>... Sender ok fetchmail: SMTP> RCPT TO:<Non...@ou...> fetchmail: SMTP< 550 5.1.1 <Non...@ou...>... User \ unknown fetchmail: SMTP listener doesn't really like recipient address \ `Non...@ou...' fetchmail: SMTP> RCPT TO:<iva@localhost> fetchmail: SMTP< 250 2.1.5 <iva@localhost>... Recipient ok fetchmail: no address matches; forwarding to iva. fetchmail: SMTP> DATA fetchmail: SMTP< 354 Enter mail, end with "." on\ a line by itself #*fetchmail: SMTP>. (EOM) fetchmail: SMTP< 250 2.0.0 l1M7uVrX002878 Message accepted for delivery fetchmail: flushed fetchmail: POP3> DELE 1 fetchmail: POP3< +OK fetchmail: POP3> QUIT fetchmail: POP3< +OK fetchmail: 6.2.0 querying pop3.infosky.net (protocol POP3) at Thu 22 \ Feb 2007 08:56:31 AM CET: poll completed ----------------------------------------------------------------- So mail still gets downloaded (what I want to avoid) and forwarded to me. Any suggestions? -- ___ ____ /__/ / \ ** Registrovani korisnik Linuksa #291606 ** / / \/ /\ \ ** Registered Linux user #291606 ** /__/\____/--\__\ ** http://counter.li.org/ ** |
From: Rob M. <rob...@gm...> - 2007-02-22 10:21:47
|
On 2/22/07, Ivan Imperl <nos...@ml...> wrote: > Nedavno Rob MacGregor pise: <--SNIP--> > ----------------------------------------------------------------- > # Configuration created Mon Dec 1 12:45:17 2003 by fetchmailconf > set logfile "/var/log/fetchMailByIva" > set postmaster "iva" > set no bouncemail > set no spambounce > set properties "" > > poll pop3.ourisp.net with proto POP3: > localdomains ourdomain.org > user 'ouruseratisp' there with password 'pass' is * here > > antispam 550 Output of "fetchmail --configdump" (remember to remove passwords)? <--SNIP--> > fetchmail: 6.2.0 querying pop3.infosky.net (protocol POP3) at Thu 22 \ > Feb 2007 08:56:31 AM CET: poll completed Ok, you're running an old, unsupported and vulnerable version of fetchmail (missed that the first time). Upgrade to (at least) 6.3.6 before posting any further diagnostics. -- 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: Ivan I. <nos...@ml...> - 2007-02-23 09:22:17
|
Nedavno Rob MacGregor pise: | Ok, you're running an old, unsupported and vulnerable version of | fetchmail (missed that the first time). Upgrade to (at least) 6.3.6 | before posting any further diagnostics. I upgraded to 6.3.7. And no change: ------------------------------------------------------------------- # Configuration created Mon Dec 1 12:45:17 2003 by fetchmailconf set logfile "/var/log/fetchMailByIva" set postmaster "iva" # set no bouncemail set no spambounce set properties "" poll pop3.ourisp.net with proto POP3: localdomains ourdomain.org user 'ouruseratisp' there with password 'pass' is * here antispam 550 ------------------------------------------------------------------- ... fetchmail: SMTP> MAIL FROM:<so...@so...> BODY=7BIT SIZE=1428 fetchmail: SMTP< 250 2.1.0 <so...@so...>... Sender ok fetchmail: SMTP> RCPT TO:<Non...@ou...> fetchmail: SMTP< 550 5.1.1 <Non...@ou...>... User \ unknown fetchmail: SMTP listener doesn't really like recipient address \ `Non...@ou...' fetchmail: SMTP> RCPT TO:<iva@localhost> fetchmail: SMTP< 250 2.1.5 <iva@localhost>... Recipient ok fetchmail: no address matches; forwarding to iva. fetchmail: SMTP> DATA fetchmail: SMTP< 354 Enter mail, end with "." on a line by itself #*fetchmail: SMTP>. (EOM) fetchmail: SMTP< 250 2.0.0 l1N8Ccjq009290 Message accepted for delivery fetchmail: flushed fetchmail: POP3> DELE 1 fetchmail: POP3< +OK fetchmail: POP3> QUIT fetchmail: POP3< +OK fetchmail: SMTP> QUIT fetchmail: SMTP< 221 2.0.0 something.somethingelse.org closing \ connection fetchmail: 6.3.7 querying pop3.infosky.net (protocol POP3) \ at Fri 23 Feb 2007 09:12:39 AM CET: poll completed fetchmail: normal termination, status 0 ------------------------------------------------------------------- -- ___ ____ /__/ / \ ** Registrovani korisnik Linuksa #291606 ** / / \/ /\ \ ** Registered Linux user #291606 ** /__/\____/--\__\ ** http://counter.li.org/ ** |
From: Sunil S. <sh...@bo...> - 2007-02-22 10:31:47
|
Quoting from Ivan Imperl's mail on Wed, Feb 21, 2007: > set postmaster "iva" > # set nobouncemail > set no spambounce > set properties "" > > poll pop3.ourisp.net with proto POP3: ... > Now to the problem. Recently we started to receive a lot of (large) mail > that is for the users that do not exist (do not have accounts) on local > mail server. Since this takes a lot of dial-up time, I was wondering if > there is a possibility for fetchmail to delete such mail. In pop3 protocol, fetchmail does not download the mail headers and body separately. This is because, the pop3 protocol does not allow download of the body of a mail separately. So, even if the mail has been refused, fetchmail still downloads the rest of the body. To avoid downloading the body, you will have to: - use imap instead of pop3, - set postmaster to "" (empty). Note that if you set postmaster to "", you may not get any notifications from fetchmail. -- Sunil Shetye. |
From: Ivan I. <nos...@ml...> - 2007-02-22 12:33:26
|
Nedavno Sunil Shetye pise: | In pop3 protocol, fetchmail does not download the mail headers and | body separately. This is because, the pop3 protocol does not allow | download of the body of a mail separately. So, even if the mail has | been refused, fetchmail still downloads the rest of the body. | | To avoid downloading the body, you will have to: | - use imap instead of pop3, | - set postmaster to "" (empty). My ISP does not have imap, I have to use pop3. I tried to setup postmaster to "", but mail still gets downloaded, it only is not deleivered to my mailbox - not what I want. -- ___ ____ /__/ / \ ** Registrovani korisnik Linuksa #291606 ** / / \/ /\ \ ** Registered Linux user #291606 ** /__/\____/--\__\ ** http://counter.li.org/ ** |
From: Ivan I. <nos...@ml...> - 2007-02-22 12:42:40
|
Nedavno Rob MacGregor pise: | Output of "fetchmail --configdump" (remember to remove passwords)? # fetchmail --configdump TRUE=1; FALSE=0 os_type = 'linux' feature_options = ('pop3','imap','gssapi','etrn','odmr','ssl','inet6',) # Start of configuration initializer fetchmailrc = { 'poll_interval':0, "logfile":"/var/log/fetchMailByIva", "idfile":"/root/.fetchids", "postmaster":"iva", 'bouncemail':TRUE, 'spambounce':FALSE, "properties":"", 'invisible':FALSE, 'showdots':FALSE, 'syslog':FALSE, # List of server entries begins here 'servers': [ # Entry for site `pop3.infosky.net' begins: { "pollname":"pop3.infosky.net", 'active':TRUE, "via":None, "protocol":"POP3", "port":None, 'timeout':300, 'interval':0, "envelope":"Received", 'envskip':0, "qvirtual":None, "auth":"any", 'dns':TRUE, 'uidl':FALSE, "aka":[], "localdomains":["ourdomain.net"], "interface":None, "monitor":None, "plugin":None, "plugout":None, "principal":None, 'tracepolls':FALSE, 'users': [ { "remote":"ouruseratisp", "password":"pass", 'localnames':["root", '*'], 'fetchall':FALSE, 'keep':FALSE, 'flush':FALSE, 'rewrite':TRUE, 'stripcr':FALSE, 'forcecr':FALSE, 'pass8bits':FALSE, 'dropstatus':FALSE, 'dropdelivered':FALSE, 'mimedecode':FALSE, 'idle':FALSE, "mda":None, "bsmtp":None, 'lmtp':FALSE, "netsec":None, "preconnect":None, "postconnect":None, 'limit':0, 'warnings':3600, 'fetchlimit':0, 'batchlimit':0, 'ssl':FALSE, "sslkey":None, "sslcert":None, "sslproto":None, 'sslcertck':FALSE, "sslcertpath":None, "sslfingerprint":None, 'expunge':0, "properties":None, "smtphunt":["localhost"], "fetchdomains":[], "smtpaddress":None, "smtpname":None, 'antispam':'550', "mailboxes":[], } , ] } ] } # End of initializer | Ok, you're running an old, unsupported and vulnerable version of | fetchmail (missed that the first time). Upgrade to (at least) 6.3.6 | before posting any further diagnostics. I will, but before I do is it possible to do what I want with pop3 (to discard - not to download mail if username does not exist locally) ? Sunil Shetye in his mail thinks that it can not be done. Do you agree? -- ___ ____ /__/ / \ ** Registrovani korisnik Linuksa #291606 ** / / \/ /\ \ ** Registered Linux user #291606 ** /__/\____/--\__\ ** http://counter.li.org/ ** |
From: Rob M. <rob...@gm...> - 2007-02-22 13:44:00
|
On 2/22/07, Ivan Imperl <nos...@ml...> wrote: > Nedavno Rob MacGregor pise: > > | Output of "fetchmail --configdump" (remember to remove passwords)? Well, the anti-spam code is recognised so it should drop any emails that your local SMTP server returns that code for. > I will, but before I do is it possible to do what I want with pop3 (to > discard - not to download mail if username does not exist locally) ? > Sunil Shetye in his mail thinks that it can not be done. Do you agree? Yes (well, I defer to his greater understanding of the protocol). -- 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: Stuart J. B. <sjb...@bl...> - 2007-02-23 03:17:54
|
> -----Original Message----- > From: fet...@li... > Subject: Re: [fetchmail-users] How not to download mail for > non-existingusers? <snip> > In pop3 protocol, fetchmail does not download the mail headers and > body separately. This is because, the pop3 protocol does not allow > download of the body of a mail separately. So, even if the mail has > been refused, fetchmail still downloads the rest of the body. POP3 has 'top' which fetches headers-only, but yes, can't get the body seperately. Stuart |
From: Matthias A. <mat...@gm...> - 2007-02-24 10:26:57
|
Ivan Imperl schrieb am 2007-02-22: > Nedavno Rob MacGregor pise: > > | Output of "fetchmail --configdump" (remember to remove passwords)? > > # fetchmail --configdump > TRUE=1; FALSE=0 > > os_type = 'linux' > feature_options = ('pop3','imap','gssapi','etrn','odmr','ssl','inet6',) > # Start of configuration initializer > fetchmailrc = { > 'poll_interval':0, > "logfile":"/var/log/fetchMailByIva", > "idfile":"/root/.fetchids", Don't run fetchmail as root unless you must. Few sites have to. > "postmaster":"iva", > 'bouncemail':TRUE, > 'spambounce':FALSE, > "properties":"", > 'invisible':FALSE, > 'showdots':FALSE, > 'syslog':FALSE, > # List of server entries begins here > 'servers': [ > # Entry for site `pop3.infosky.net' begins: > { > "pollname":"pop3.infosky.net", > 'active':TRUE, > "via":None, > "protocol":"POP3", > "port":None, > 'timeout':300, > 'interval':0, > "envelope":"Received", That's not robust. Use another header, see http://home.pages.de/~mandree/mail/multidrop > | Ok, you're running an old, unsupported and vulnerable version of > | fetchmail (missed that the first time). Upgrade to (at least) 6.3.6 > | before posting any further diagnostics. > > I will, but before I do is it possible to do what I want with pop3 (to > discard - not to download mail if username does not exist locally) ? > Sunil Shetye in his mail thinks that it can not be done. Do you agree? No way that works on all servers at least; and implementing a way to avoid that would require (a) server cooperation, (b) downloading message headers twice. The best solution though is telling the upstream site what valid users are and have them reject messages for others. -- Matthias Andree |
From: Yvan <nos...@ml...> - 2007-02-24 10:47:50
|
Nedavno Matthias Andree pise: | The best solution though is telling the upstream site what valid users | are and have them reject messages for others How do I do that? -- ___ ____ /__/ / \ ** Registrovani korisnik Linuksa #291606 ** / / \/ /\ \ ** Registered Linux user #291606 ** /__/\____/--\__\ ** http://counter.li.org/ ** |
From: Matthias A. <mat...@gm...> - 2007-02-25 18:48:02
|
Yvan <nos...@ml...> writes: > Nedavno Matthias Andree pise: > > | The best solution though is telling the upstream site what valid users > | are and have them reject messages for others > > > How do I do that? That depends on your upstream, evidently. E-Mail, fax, phone, ... :-) -- Matthias Andree |
From: Ivan I. <nos...@ml...> - 2007-02-26 12:29:50
|
Nedavno Stuart J. Browne pise: | POP3 has 'top' which fetches headers-only, but yes, can't get the body | seperately. But I do not want to get the body separately, I want NOT to get mail at all after fetching headers (if I find that that particular mail is for user that does not exist on my mail server). Looking at fetchmail log it seems to me that it can be done: ----------------------------------------------------------------------- fetchmail: SMTP> MAIL FROM:<som...@so...> BODY=7BIT SIZE=1428 fetchmail: SMTP< 250 2.1.0 <som...@so...>... Sender ok fetchmail: SMTP> RCPT TO:<non...@ou...> fetchmail: SMTP< 550 5.1.1 <non...@ou...>... User \ unknown fetchmail: SMTP listener doesn't really like recipient address \ `non...@ou...' ----------------------------------------------------------------------- It looks like that at this point fetchmail got message that I do not want this mail, but then it downloads it anyway and forwards it to postmaster (iva): ----------------------------------------------------------------------- fetchmail: SMTP> RCPT TO:<iva@localhost> fetchmail: SMTP< 250 2.1.5 <iva@localhost>... Recipient ok fetchmail: no address matches; forwarding to iva. fetchmail: SMTP> DATA fetchmail: SMTP< 354 Enter mail, end with "." on\ a line by itself #*fetchmail: SMTP>. (EOM) fetchmail: SMTP< 250 2.0.0 l1QAh4Iv013586 Message accepted for delivery fetchmail: flushed fetchmail: POP3> DELE 1 fetchmail: POP3< +OK fetchmail: POP3> QUIT fetchmail: POP3< +OK fetchmail: SMTP> QUIT ----------------------------------------------------------------------- So if at one point fetchmail got the message that "SMTP listener doesn't really like recipient address" I just have to make it to skip few steps ("no address matches; forwarding to iva") and to go right to: ----------------------------------------------------------------------- fetchmail: POP3> DELE 1 fetchmail: POP3< +OK fetchmail: POP3> QUIT fetchmail: POP3< +OK fetchmail: SMTP> QUIT ----------------------------------------------------------------------- But I do not knew how how to do that :-( -- ___ ____ /__/ / \ ** Registrovani korisnik Linuksa #291606 ** / / \/ /\ \ ** Registered Linux user #291606 ** /__/\____/--\__\ ** http://counter.li.org/ ** |
From: Rob M. <rob...@gm...> - 2007-02-26 14:27:14
|
On 2/26/07, Ivan Imperl <nos...@ml...> wrote: > Nedavno Stuart J. Browne pise: > > | POP3 has 'top' which fetches headers-only, but yes, can't get the body > | seperately. > > > But I do not want to get the body separately, I want NOT to get mail at > all after fetching headers (if I find that that particular mail is for > user that does not exist on my mail server). Looking at fetchmail log > it seems to me that it can be done: <---SNIP---> > But I do not knew how how to do that :-( In summary of what others have said in this thread: 1) You CANNOT do that with POP3. You have to switch to IMAP to solve your problem. 2) To not forward mis-addressed email you have to set the postmaster address to "" Also known as, fetchmail cannot make up for the shortcomings of your ISP or the way you've configured it. -- 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 |