Procmail Filters Won't Work

Hi Folks,

I set up a fetchmail script to collect mail from freemailers, this works.
Now I want to sort the mail using procmail… putting it into folders.

But everytime I want to run the filter I get
“Failed to apply filter : Destination folder $HOME/Maildir/.INBOX.Netzwelt does not exist!”

So I check on the Linux Console.

The Subfolder is called “.INBOX.Netzwelt” and exists.

In the rule I tried “Netzwelt”, “.Netzwelt”, “.INBOX.Netzwelt”, “INBOX.Netzwelt”.

But I always get Folder not found.

This is my /etc/procmailrc

LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl --exitcode 73 $LOGNAME
EXITCODE=$?
:0

  • ?/usr/bin/test “$EXITCODE” = “73”
    /dev/null
    EXITCODE=0
    :0
  • ?/usr/bin/test “$VIRTUALMIN” != “”
    {
    INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
    }
    DEFAULT=$HOME/Maildir/
    ORGMAIL=$HOME/Maildir/
    DROPPRIVS=yes

my /etc/postfix/main.cf

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = hetzner.o-arp.de
alias_maps = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = hetzner.o-arp.de, localhost.o-arp.de, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_policy_service inet:127.0.0.1:10023
allow_percent_hack = no

In Vitualmin -> Email Messages -> Spam and Virus Scanning -> Allow mailbox users to create mail filters? is set to YES

In Webmin -> Usermin Configuration -> Available Modules -> Filter and Forward Mail is checked.

Also I can’t find errors in /var/log/syslog, /var/log/procmail.log or /var/log/mail.log.

I’m running Ubuntu 14.04.2 LTS

OK here comes the fun part of the story.
Logged in into usermin -> Usermin Index -> Filter and Forward Mail -> choose rule -> Show matching EMail in Folder -> Emails habe been found -> selected EMails and with the drop-down option I Can choose the Folder to move them and it works.

Just not automatially.

What Do I not see?

I think I got it!

This .procmailrc works:

:0 w

  • ^From:.olli@oliver
    $HOME/Maildir/.INBOX.test/
As soon as there are some "/" in the rule is dosen't work! And it look like as there must be a ".*" after "* ^From:"

Can anybody confirm that? Or it is just my system?