.mailfilter rule mysteriously not followed
"Dr Michael Daly" <[email protected]>
| Newsgroups | gmane.mail.maildrop |
|---|---|
| Message-ID | <[email protected]> |
Hello
Wondering if someone could again be of help in troubleshooting why Mail
delivery from a particular mailserver to the desired mailbox is repeatedly
failing, contrary to the configuration in the relevant .mailfilter file.
The setup is running on a QNAP NAS device. Dovecot is running.
The mail from the domain internode.on.net should end up in the
.INBOX.Internode mailbox, but it is finding its way into a mailbox
specified higher up in the .mailfilter file (ie in the .INBOX.lists
mailbox). I have attached two such emails that were each sent from
different mailservers to me at the internode.on.net domain
Here is whats in .mailfilter:
(and see below for fetchmail log)
**********************************************************************
DEFAULT="$HOME/Maildir"
Sent="$HOME/Maildir/.INBOX.Sent"
Junk="$HOME/Maildir/.INBOX.Junk"
CPD1="$HOME/Maildir/.INBOX.cpdONE"
HAMPTON="$HOME/Maildir/.INBOX.HamptonONE"
LISTS="$HOME/Maildir/.INBOX.lists"
MD="$HOME/Maildir/.INBOX.md"
INTERNODE="$HOME/Maildir/.INBOX.Internode"
logfile "$HOME/maildrop.log"
if (/^Subject:.*world.*business.*/)
{
to $Junk
}
if (/^From:.*md@mydomain\.com\.au/ \
&& /^To|Cc|Bcc:.*md@mydomain\.com\.au/)
{
to $Sent
}
if (/^To:.*md@mydomain\.com\.au/)
{
to $MD
}
if (/^To:.*lists@mydomain\.com\.au/)
{
to $LISTS
}
if (/^To|Cc|Bcc:[^a-zA-Z0-9]*@cpdONE\.info/)
{
to $CPD1
}
if (/^To|Cc|Bcc:[^a-zA-Z0-9]*@cpdONE\.org\.au/)
{
to $CPD1
}
if (/^To|Cc|Bcc:[^a-zA-Z0-9]*@hamptondomain\.com\.au/)
{
to $HAMPTON
}
if (/^To|Cc|Bcc:.*michaeldaly.*@internode\.on\.net\.*/)
{
to $INTERNODE
}
to $DEFAULT
#end of .mailfilter contents
**********************************************************************
I am now invoking fetchmail 6.3.21 with:
su - mdtesting -c '/opt/bin/fetchmail -vvv -f /opt/etc/fetchmailrc'
Other notes:
/opt/bin/maildrop has the SUID bit set
viz the relevant part of fetchmailrc:
set postmaster admin
set no bouncemail
poll mydomain.com.au service 110 protocol pop3 uidl
user "md" password "mypassword" is "mdtesting" here
poll mail.internode.on.net service 110 protocol pop3 uidl
user "michaeldaly" password "anotherpasswd" is "mdtesting" here
mda "/opt/bin/maildrop -d %s"
#also tried mda "/opt/bin/maildrop -d %T"
#hamptondomain, cpdONE.info, cpdONE.org.au not yet specified here
fetchmail log does not seem to give clues:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
fetchmail: Trying to connect to 203.16.214.182/110...connected.
fetchmail: POP3< +OK internode.on.net bld-mail20 Ready
fetchmail: POP3> CAPA
fetchmail: POP3< +OK Capability list follows
fetchmail: POP3< TOP
fetchmail: POP3< USER
fetchmail: POP3< UIDL
fetchmail: POP3< SURGEMAIL
fetchmail: POP3< .
fetchmail: POP3> USER michaeldaly
fetchmail: POP3< +OK michaeldaly nice to hear from you - password required
fetchmail: POP3> PASS *
fetchmail: POP3< +OK michaeldaly has 1 mail messages
fetchmail: selecting or re-polling default folder
fetchmail: POP3> STAT
fetchmail: POP3< +OK 1 1829
fetchmail: POP3> UIDL
fetchmail: POP3< +OK uidl data follows
fetchmail: POP3< 1 20
fetchmail: 1 is unseen
fetchmail: POP3< .
fetchmail: 1 message for michaeldaly at mail.internode.on.net (1829 octets).
fetchmail: POP3> LIST 1
fetchmail: POP3< +OK 1 1829
fetchmail: POP3> TOP 1 99999999
fetchmail: POP3< +OK message follows
fetchmail: reading message [email protected]:1 of 1 (1829
octets)About to rewrite Return-Path: <[email protected]>...
...rewritten version is Return-Path: <[email protected]>.
fetchmail: About to rewrite From: "Dr Michael Daly" <[email protected]>...
...rewritten version is From: "Dr Michael Daly" <[email protected]>.
fetchmail: About to rewrite To: [email protected]...
...rewritten version is To: [email protected].
fetchmail: About to rewrite Reply-To: [email protected]...
...rewritten version is Reply-To: [email protected].
fetchmail: about to deliver with: /opt/bin/maildrop -d 'mdtesting'
fetchmail: message [email protected]:1 was not the
expected length (1852 actual != 1829 expected)
fetchmail: flushed
fetchmail: POP3> DELE 1
fetchmail: POP3< +OK message deleted
fetchmail: POP3> QUIT
fetchmail: POP3< +OK closing connection
fetchmail: 6.3.21 querying mail.internode.on.net (protocol POP3) at Mon
Jan 21 18:04:22 2013: poll completed
fetchmail: New UID list from mail.internode.on.net: 20 = EXPUNGED
fetchmail: swapping UID lists
fetchmail: sleeping at Mon Jan 21 18:04:22 2013 for 300 seconds
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Thanks
Michael Daly
------------------------------------------------------------------------------
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. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
Courier-maildrop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
1358748817.M594120P5386V0000000000000900I0000000006CC0387_0.NASC2089B ,S=4114
(application/octet-stream, 4.1 KB) - not displayed
1358751861.M695856P6067V0000000000000900I0000000006CC0388_0.NASC2089B ,S=1983
(application/octet-stream, 1.8 KB) - not displayed