Re: .mailfilter rule mysteriously not followed
"Dr Michael Daly" <[email protected]>
| Newsgroups | gmane.mail.maildrop |
|---|---|
| Message-ID | <[email protected]> |
thanks, but still have a major anomaly.
Mail from Internode's (an ISP) mail server is ending up in the
.INBOX.Internode maildir folder as configured on my home NAS device, but
even after upgrading fetchmail (& running as 'mdtesting'), mail downloaded
to the NAS device, from my self-managed Dallas server is ending up in the
DEFAULT maildir directory when it should be in the .INBOX.lists maildir,
ie to keep it simple I have listed in ~/.mailfilter:
DEFAULT="$HOME/Maildir"
LISTS="$HOME/Maildir/.INBOX.lists"
INTERNODE="$HOME/Maildir/.INBOX.Internode"
This is whats currently & was previously tried in maildrop for intended
mail to the $LISTS maildir:
#if (/^To:.*lists@mydomain\.com\.au/)
#if /^To:.*lists@mydomain\.com\.au/
#if (/lists@mydomain\.com\.au/)
#if (/^(X\-Original\-To):.*lists@mydomain\.com\.au/)
#if (/(X-Original-To|Delivered-To):.*lists@mydomain\.com\.au/)
#if (/^(To|Cc|Bcc):.*lists@mydomain\.com\.au/)
if (/(X-Original-To):.*lists@mydomain\.com\.au/)
{
to $LISTS
}
and the maildrop rule for mail to $INTERNODE:
if (/^(To|Cc|Bcc):.*michaeldaly@internode\.on\.net/)
{
to $INTERNODE <--$LISTS here delivers to LISTS
}
Funnily enough, there's no entry at all in maildrop's log for these
anomalous mail deliveries from my Dallas based server...the only maildrop
log entries I find relate to mail delivered from Internode. It seems to
suggest maildrop is being bypassed for mail from Dallas? Using the -V
option for maildrop does not seem to help - I understand that Verbose mode
does not work when maildrop runs in delivery mode?
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The header information for the Internode sourced mail, which is working:
X-Default-Received-SPF: pass (skip=trusted (res=PASS))
x-ip-name=150.101.137.129;
Received: from mail.internode.on.net [203.16.214.182]
by NASC2089B with POP3 (fetchmail-6.3.21)
for <mdtesting@localhost> (single-drop); Sun, 27 Jan 2013 11:21:23 +1100
(EST)
Received: from ipmail06.adl2.internode.on.net (unverified [150.101.137.129])
by mail.internode.on.net (SurgeMail 5.3i) with ESMTP id 98726825-1927428
for <[email protected]>; Sun, 27 Jan 2013 09:29:18 +1030 (CDT)
Return-Path: <[email protected]>
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result:
AtMEAOteBFGWZYqG/2dsb2JhbAAjIYVdabg3c4I+Cm4GAQI8AnqICJ1wjlSFBYxwjXeCFoETA6ZVgwo
Received: from webmail3.internode.on.net (HELO localhost) ([150.101.138.134])
by ipmail06.adl2.internode.on.net with ESMTP; 27 Jan 2013 09:29:18 +1030
Message-Id:
<1eeb7860523810cac154fe8109212d7f463e8629@webmail.internode.on.net>
From: [email protected]
To: [email protected]
X-Mailer: Atmail 6.20.12
Subject: from internode, to self, 9.59am
Date: Sun, 27 Jan 2013 09:29:18 +1030
Content-Type: multipart/alternative;
boundary="=_d699a8f58b9516b55b25e96fab103fba"
MIME-Version: 1.0
X-Rcpt-To: <[email protected]>
X-SpamDetect: : -9.161000 IronPort SPAM scanned=-10.0, From: does not
include a real name=0.8
X-NotAscii: charset=utf-8
X-LangGuess: Unknown
X-IP-stats: Incoming Last 0, First 682, in=12751, out=0, spam=0
ip=150.101.138.134
Status: RO
X-UIDL: 35
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The header information for mail from the Dallas server, which is NOT
working as expected (note the msg was initially sent from Internode to
Dallas):
Return-Path: <[email protected]>
X-Original-To: mdtesting@localhost
Delivered-To: [email protected]
Received: from NASC2089B (localhost [127.0.0.1])
by NASC2089B.localdomain (Postfix) with ESMTP id A67305020C11
for <mdtesting@localhost>; Sun, 27 Jan 2013 13:18:14 +1100 (EST)
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from mydomain.com.au
by NASC2089B with POP3 (fetchmail-6.3.24)
for <mdtesting@localhost> (single-drop); Sun, 27 Jan 2013 13:18:14 +1100
(EST)
Received: from ipmail06.adl2.internode.on.net
(ipmail06.adl2.internode.on.net [150.101.137.129])
by mydomain.com.au (Postfix) with ESMTP id 49A3C7C198
for <[email protected]>; Sun, 27 Jan 2013 13:12:50 +1100 (EST)
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result:
AtMEAAKNBFGWZYqG/2dsb2JhbAAkIYVdabg1c4JIbgYBAjwCeogInX+OVIUFjHONd4IWgRMDplWDCg
Received: from webmail3.internode.on.net (HELO localhost) ([150.101.138.134])
by ipmail06.adl2.internode.on.net with ESMTP; 27 Jan 2013 12:47:25 +1030
Message-Id:
<02f6b14d3673d4cfa3f4d2ceb093838a61d950e5@webmail.internode.on.net>
From: [email protected]
To: [email protected]
X-Mailer: Atmail 6.20.12
Subject: from internode to lists, fetch 6.3.24,
(/(X-Original-To):.*lists@mydomain\.com\.au/) ie no caret
Date: Sun, 27 Jan 2013 12:47:25 +1030
Content-Type: multipart/alternative;
boundary="=_5f0713c2737273fc59c2cbceab283353"
MIME-Version: 1.0
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This is the fetchmail log for a message received by [email protected]
(as sent from Internode, as it happens):
fetchmail: 6.3.24 querying mydomain.com.au (protocol POP3) at Sun Jan 27
13:58:09 2013: poll completed
fetchmail: New UID list from mydomain.com.au: <empty>
fetchmail: not swapping UID lists, no UIDs seen this query
fetchmail: Query status=1 (NOMAIL)
fetchmail: 6.3.24 querying mydomain.com.au (protocol POP3) at Sun Jan 27
13:58:09 2013: poll started
fetchmail: Trying to connect to 72.249.83.98/110...connected.
fetchmail: POP3< +OK Dovecot ready.
fetchmail: POP3> CAPA
fetchmail: POP3< +OK
fetchmail: POP3< CAPA
fetchmail: POP3< TOP
fetchmail: POP3< UIDL
fetchmail: POP3< RESP-CODES
fetchmail: POP3< PIPELINING
fetchmail: POP3< STLS
fetchmail: POP3< USER
fetchmail: POP3< SASL PLAIN
fetchmail: POP3< .
fetchmail: POP3> USER lists
fetchmail: POP3< +OK
fetchmail: POP3> PASS *
fetchmail: POP3< +OK Logged in.
fetchmail: selecting or re-polling default folder
fetchmail: POP3> STAT
fetchmail: POP3< +OK 1 1357
fetchmail: POP3> UIDL
fetchmail: POP3< +OK
fetchmail: POP3< 1 00004d58473af082
fetchmail: 1 is unseen
fetchmail: POP3< .
fetchmail: 1 message for lists at mydomain.com.au (1357 octets).
fetchmail: POP3> LIST 1
fetchmail: POP3< +OK 1 1357
fetchmail: POP3> TOP 1 99999999
fetchmail: POP3< +OK
fetchmail: reading message [email protected]:1 of 1 (1357 octets)About
to rewrite Return-Path: <[email protected]>...
...rewritten version is Return-Path: <[email protected]>.
fetchmail: About to rewrite From: [email protected]...
...rewritten version is From: [email protected].
fetchmail: About to rewrite To: [email protected]...
...rewritten version is To: [email protected].
fetchmail: Trying to connect to 127.0.0.1/25...connected.
fetchmail: SMTP< 220 NASC2089B.localdomain ESMTP Postfix
fetchmail: SMTP> EHLO NASC2089B
fetchmail: SMTP< 250-NASC2089B.localdomain
fetchmail: SMTP< 250-PIPELINING
fetchmail: SMTP< 250-SIZE 10240000
fetchmail: SMTP< 250-VRFY
fetchmail: SMTP< 250-ETRN
fetchmail: SMTP< 250-ENHANCEDSTATUSCODES
fetchmail: SMTP< 250-8BITMIME
fetchmail: SMTP< 250 DSN
fetchmail: forwarding to localhost
fetchmail: SMTP> MAIL FROM:<[email protected]> SIZE=1357
fetchmail: SMTP< 250 2.1.0 Ok
fetchmail: SMTP> RCPT TO:<mdtest5@localhost>
fetchmail: SMTP< 250 2.1.5 Ok
fetchmail: SMTP> DATA
fetchmail: SMTP< 354 End data with <CR><LF>.<CR><LF>
fetchmail: SMTP>. (EOM)
fetchmail: SMTP< 250 2.0.0 Ok: queued as 621E05020C11
fetchmail: flushed
fetchmail: POP3> DELE 1
fetchmail: POP3< +OK Marked to be deleted.
fetchmail: POP3> QUIT
fetchmail: POP3< +OK Logging out, messages deleted.
fetchmail: SMTP> QUIT
fetchmail: SMTP< 221 2.0.0 Bye
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
finally, /opt/etc/fetchmailrc has:
poll mydomain.com.au service 110 protocol pop3 uidl
user "lists" password "XXXXXX" is "mdtesting" here
poll mail.internode.on.net service 110 protocol pop3 uidl
user "michaeldaly" password "XXXXXX" is "mdtesting" here
Anyway...anyadvice would be helpful!
Thanks
Dr Michael Daly writes:
> Thanks for the advice about the syntax... has helped but it has not
> stopped mail to [email protected] ending up in .INBOX.lists
> instead of .INBOX.Internode. Removing the To $LISTS rule fixes it, ie
> sees
> the mail ending in .INBOX.internode as desired, but is not a practical
> option.
>
> Also:
> - have examined the emails and can't find anything in the body of these
> email that would trigger a cross match.
> - have tried turning off polling of mydomain but mail to
> [email protected] still ends up in $LISTS
It doesn't matter how mail ends up with maildrop. You can run maildrop
manually, with the message on standard input.
You can set the VERBOSE variable in the maildrop recipe to produce
debugging
output that may be helpful.
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d_______________________________________________
Courier-maildrop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d