Setting up maildrop to filter incoming email


#1

I’ve followed the wiki instructions on how to set up maildrop to filter incoming email: http://wiki.dreamhost.com/Maildrop

I was able to compile everything fine, and when I run it manually, it seems to sorta work. Here are what the relevant files look like:

$ cat .mailfilter

VERBOSE = 6 logfile "${HOME}/.mailfilter.log" log "==========" to "arthaey+maildrop@gmail.com"

$ cat .forward.postfix

$ cat email.txt

[code]From: arthaey@arthaey.com
To: arthaey@gmail.com
Subject: Test

This is a maildrop test.
[/code]

And then when I run maildrop < email.txt to manually test it at the command line, it outputs to a file with the same filename as the “to” email address in the mailfilter file:

$ cat arthaey+maildrop@gmail.com

[code]From MAILER-DAEMON Sat Sep 20 22:35:12 2014
From: arthaey@arthaey.com
To: arthaey@gmail.com
Subject: Test

This is a maildrop test.
[/code]

I chmod’d the .mailfilter and .forward.postfix files like the wiki said, and then sent an email to arthaey@arthaey.com. However, it did not forward to arthaey+maildrop@gmail.com, nor did anything show up in ~/.mailfilter.log.

What should I check next to troubleshoot what the problem is? Has anyone gotten maildrop to filter incoming email recently? (All the forum posts that reference maildrop are old.)


#2

Those instructions were outdated — that method of setting up mail filtering no longer works. Sorry. :frowning:

You can set up email filters in the DreamHost Panel under “Mail > Message Filters”.


#3

Well, that would explain it not working, at least. Thanks for the quick reply!

Unfortunately, what I wanted to do with my incoming emails was run them through a Ruby script. That doesn’t seem to be an option with the Mail > Message Filters.


#4

You can do that. http://wiki.dreamhost.com/Email_to_Script

Setup requires two forwards. First in the panel to forward mail from a mail account on a mailserver, to your webserver.

Then, on the webserver a .forward.postfix file to pipe that email to the script.

Documented in more detail at the link.