Graham Leggett | 16 May 2013 14:29

maildrop silently discards email - how to troubleshoot?

Hi all,

I am currently seeing a bizarre problem with email delivery, where email sent to a mailman mailing list gets
sent back to the poster, gets as far as maildrop, which then causes the mail to silently disappear without a trace.

Focusing on maildroprc, I have the config specified below. The second last step is to log the line
"Delivered normally to [path]", and the last step is the "to" command to perform the delivery. Despite
logging the second last line correctly, and despite returning an apparent "successful" response back to
postfix, the message vanishes completely and no delivery takes place:

Delivered normally to [path]
Date: Thu May 16 07:25:31 2013
From: "Facebook" <[snip] <at> facebookmail.com>
Subj: [snip]
File: [path]                             (11286)

This problem seems limited only to email sent back to the poster from mailman, it does not affect other mail,
which has been working fine on this server for many years.

Normally I would set a verbose debugging mechanism up to get a sense of what maildrop is doing, but verbose
logging has no effect when in delivery mode, and I am stuck.

First off, does anyone know why the "to" command would return success without having delivered any email to
that directory, and second, does anyone know how to turn on some kind of verbose logging when in delivery mode?

# default logfile
logfile "/var/log/maildrop"
VERBOSE="5"
# Create mailboxes if necessary
`[ -d $HOME/ ]`
(Continue reading)

Mark Constable | 10 Apr 2013 16:03
Favicon
Gravatar

Unable to create a dot-lock

I'm testing ISPConfig and postfix on Ubuntu 13.04 with courier-imap
0.68.2 and seeing this weird error where the senders address is
being used as part of the user home path...

Apr 10 22:55:06 hp maildrop[17807]: Unable to create a dot-lock at
 /var/vmail/bounces <at> nacionalpromo.com/goldcoast.org/17807.0.hp.

The above path should be more like...

 /var/vmail/goldcoast.org/markc/17807.0.hp.

so I don't think this is a simple case of incorrect permissions.

I put a script in place of /usr/bin/maildrop...

~ ll /usr/bin/maildrop*
-rwxr-xr-x 1 root root       78 Apr 10 13:07 /usr/bin/maildrop*
-rwsr-xr-x 1 root daemon 196000 Jan 23 23:32 /usr/bin/maildrop.orig*

~ cat /usr/bin/maildrop
#!/bin/sh
(echo $*; id ; env) | logger -p mail.info
/usr/bin/maildrop.orig $*

And the result is below just after the above dot-lock error...

Apr 10 22:55:06 hp logger: -d vmail markc <at> goldcoast.org markc goldcoast.org bounces <at> nacionalpromo.com
Apr 10 22:55:06 hp logger: uid=5000(vmail) gid=5000(vmail) groups=5000(vmail)
Apr 10 22:55:06 hp logger: MAIL_CONFIG=/etc/postfix
Apr 10 22:55:06 hp logger: PATH=/usr/bin:/bin
(Continue reading)

Doug Barton | 26 Mar 2013 08:24
Picon

Marking a message read when delivering to a Maildir

Howdy,

I have searched the web and cobbled together a process to deliver a 
message to my Junk folder (Maildir), then immediately mark it read. 
However, I've run into a small problem, the filter runs faster than the 
actual delivery, so I have to spin waiting for the file to appear. My 
filter is below.

I'm wondering, is there an easier/better way to do this in the first 
place? Is it ever contemplated to add this as a feature?

Thanks,

Doug

if (/^X-Spam-Status: Yes/:h)
{
         cc Maildir/.Junk
         `until [ -f ${HOME}/Maildir/.Junk/cur/1*:2, ]; do sleep 0.1; done`
         `for m in ${HOME}/Maildir/.Junk/cur/1*:2,; do mv $m ${m}S; done`
         exit
}

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
(Continue reading)

nromig | 8 Mar 2013 17:08

Maildrop Virtual Users

I have a working Courier setup for my local domain, and two hosted
domains, using Unix user accounts with a smarthost relay for outgoing
mail. I wanted to try virtual users authenticated against a MySQL table so
I created a user "vmail" and a directory structure
"/home/vmail/[domain]/[user]/Maildir" for each domain and user, populated
the MySQL table with the appropriate values and switched authdaemon from
authpam to authmysql.
My problem is that maildrop is not doing what I want! If I set
DEFAULTDELIVERY to "| /usr/bin/maildrop" in courierd all mail is delivered
to a mailbox file at /var/mail (the $MAIL variable for vmail user), but
when DEFAULTDELIVERY is "./Maildir" mail is delvered to the correct
location.
I cannot work out what I have done wrong despite reading man pages and web
articles - can someone point me in the right direction (I am a relative
newbie to mail setup).

Neil.

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
Priyadarsan Roy | 2 Mar 2013 05:12

Virtual user delivery problem via postfix

Hi All,

I am trying to use courier-maildrop the default which comes with Ubuntu
12.04 in my email server setup. I have setup the mail using Flurdy's doc
http://flurdy.com/docs/postfix/

I have setup maildrop using this article
http://ubuntuforums.org/showthread.php?t=185913&page=23&p=7278296#post7278296

Now the issue is when I test email delivery from the command line emails
land up correctly in the users home folder. Log shows that correctly too

echo "test" | maildrop -V 9 -d pd <at> ysc.co.in

Date: Sat Mar  2 07:45:03 2013
From: 
Subj: 
File: /var/spool/mail/virtual/pd__2/
(5)

But when postfix tried to deliver email to lands up in a ./Maildir
file. 

Date: Sat Mar  2 07:14:05 2013
From: proy <at> netzary.com
Subj: testing 7:26 am
File: ./Maildir
(1277)

What ever I try mail to any user lands up in ./Maildir file. 
(Continue reading)

Marco | 22 Jan 2013 15:12

Hook in external programs

Hi,

I'm new to maildrop and need some advice on how to set it up. I
don't do anything fancy, just a few filters to sort mail into
folders.

For important mails I'd like to have a notification. What is the
best way to hook in an external program like notify-send? Here is an
example of what I'd like to do:

if (/^List-ID: .*(alpha\.lists\.sourceforge\.net)/:h)
to "$MAILHOME/.Lists.alpha"
# notify-send 'New mail! List: alpha' 'From: **From**'

if (/^List-ID: .*(beta\.lists\.sourceforge\.net)/:h)
to "$MAILHOME/.Lists.beta"
# notify-send 'New mail! List: beta' 'From: **From**'

The external program notify-send should be invoked before or after
the mail is placed in the corresponding folder including information
about who sent the mail.

How do I hook notify-send into the filters?
How do I access the From: header to be provided as argument to
notify-send?

Best regards

Marco

(Continue reading)

Dr Michael Daly | 21 Jan 2013 14:37
Picon
Favicon

.mailfilter rule mysteriously not followed

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
}
(Continue reading)

Dr Michael Daly | 20 Jan 2013 23:16
Picon
Favicon

.mailfilter allegedly 'Missing'


Hi
Wondering if someone could give any clue as to why Mail is not being
delivered...I have checked with the fetchmail list prior to
checking here. This is all running on a QNAP NAS device. Dovecot is running.

I am invoking fetchmail 6.3.21 with:
su - mdtesting -c '/opt/bin/fetchmail -vvv -f /opt/etc/fetchmailrc -m
"/opt/bin/maildrop -d %T"'

which gives this message on startup:
fetchmail: Old UID list from mydomain.com.au: <empty>
fetchmail: Scratch list of UIDs: <empty>

anyway, fetchmail runs but mail is not delivered via maildrop, with the
fetchmail log advising:

fetchmail: starting fetchmail 6.3.21 daemon
fetchmail: 6.3.21 querying mydomain.com.au (protocol POP3) at Sun Jan 20
23:28:33 2013: poll started
fetchmail: Trying to connect to mydomainipaddress/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
(Continue reading)

Guido Falsi | 2 Oct 2012 16:37

$man.base.url.for.relative.links in man pages

Hi,

I'm the new maintainer for the maildrop FreeBSD port.

A user made me notice that the man pages that come with maildrop, and
with courier in genral it seems, are prendered with the
$man.base.url.for.relative.links variable undefined, which generates
this kind of content: (from maildropex(1))

NOTES   
        1. reformail
           [set $man.base.url.for.relative.links]/reformail.html

        2. xfilter
           [set $man.base.url.for.relative.links]/maildropfilter.html#xfilter

I have not foung the sgml source for the man pages in the maildrop or
courier source distribution, so Ive been unable to regenerate this
redefining the variable.

In the freeBSD port I can change them on the fly while installing, but
it would be easier to have the full source to them, so i can recompile
them with the correct path defined.

Is this possible? How is this solved in other OSes?

Thanks in advance.

--

-- 
Guido Falsi <mad <at> madpilot.net>
(Continue reading)

Michael Weishaar | 4 Sep 2012 20:57
Favicon

Maildrop copy mails instead of moving them.


Hello,

first, sorry for the bad english.

I have installed maildrop today and set up my .mailfilter as follows:

----- BEGIN .mailfilter -----
MAILBOX = "/var/qmail/mailnames/example.com/username/Maildir"

if( /^From:.* <at> some_domain.com/ )
{
to "${MAILBOX}/.folder1"
}
----- END .mailfilter -------

Incoming mails from * <at> some_domain.com should be moved to .Folder1.

Currently, however, it creates a copy. So the mail is in the inbox AND
in .folder1.

Who can explain this behavior?

--

-- 
MfG / With Kind Regards,
Michael Weishaar

Jayanta Ghosh | 24 Aug 2012 15:31
Picon
Favicon

Integration of maildrop with spamassassin

 

We are configuring a mail server on RHEL 6.1(64 Bit) with the following components:-

1.       Postfix

2.       Courier-authlib

3.       Courier-imap

4.       MySql

5.       Maildrop

6.       Spamassassin

 

The basic functionality of the mail server is in place. Now we would like to integrate Spamassassin with maildrop so that any mail that has been identified as a spam  by the Spamassassin should be delivered to another folder (not the default location) by maildrop.

We searched through the net and found out that we need to write the rules in the maildroprc file that needs to be created in the location /etc/courier or /etc. We are not very sure about where to keep the file exactly. We have created the file maildroprc with the following content

 

if ( $SIZE < 204800 )

{

        exception {

                xfilter "/usr/bin/spamassassin"

        }

}

if ( /^X-Spam-Flag: YES/ )

{

        exception {

                to "/home/jayanta.ghosh/Maildir/.Spam/"

        }

}

 and kept the file in both the location. But the mails are not delivered to the desired location i.e in the .Spam folder.

 

The mail header is as follows: -

Return-Path: <jayanta.ghosh <at> rpsg.in>

Received: by dctest1.cesc.co.in (Postfix, from userid 504)

                id 6F877D008A; Thu, 23 Aug 2012 14:26:15 +0530 (IST)

X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on dctest1.cesc.co.in

X-Spam-Flag: YES

X-Spam-Level: **************************************************

X-Spam-Status: Yes, score=999.0 required=5.0 tests=ALL_TRUSTED,GTUBE,

                HTML_MESSAGE,TVD_SPACE_RATIO autolearn=no version=3.3.1

X-Spam-Report:

                * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP

                * 1000 GTUBE BODY: Generic Test for Unsolicited Bulk Email

                *  0.0 HTML_MESSAGE BODY: HTML included in message

                *  0.0 TVD_SPACE_RATIO TVD_SPACE_RATIO

Received: from JayantaGhosh (unknown [10.50.81.45])

                by dctest1.cesc.co.in (Postfix) with ESMTPA id 4A367D006C

                for <jayanta.ghosh <at> rpsg.in>; Thu, 23 Aug 2012 14:26:15 +0530 (IST)

Message-ID: <A2B060EC8E7F42908EAB21EA2242D911 <at> JayantaGhosh>

From: "Jayanta RPSG" <jayanta.ghosh <at> rpsg.in>

To: <jayanta.ghosh <at> rpsg.in>

Subject: [SPAM]

Date: Thu, 23 Aug 2012 14:26:14 +0530

MIME-Version: 1.0

Content-Type: multipart/alternative;

                boundary="----=_NextPart_000_00A2_01CD813B.401CB850"

X-Priority: 3

X-MSMail-Priority: Normal

Importance: Normal

X-Mailer: Microsoft Windows Live Mail 15.4.3555.308

X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308

X-Spam-Prev-Subject:

 

Kindly help.

 

Regards,

Jayanta

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Courier-maildrop mailing list
Courier-maildrop <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/courier-maildrop

Gmane