Procmail deletes email

Hello,

I am setting up a new mail server with webmin and virtualmin on centos 7, latest updates for everything. Everything works fine except for receiving emails, which simply disappear (no maillog errors).

After some while I found in the procmail log:

               procmail: Error while writing to ""
               From john@yahoo.com  Tue Jan 10 15:37:38 2017
               Subject: bababababababa
               Folder: **Bounced**                                                      2456
               Time:1484055459 From:john@yahoo.com To:john@johndoe.com

I disabled spam filtering in the johndoe.com server for testing purposes, but it still shows that error.

The procmail config (which I didn't touch, it is as set up by webmin/virtualmin)

           LOGFILE=/var/log/procmail.log
           TRAP=/etc/webmin/virtual-server/procmail-logger.pl
           :0wi
           VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
           EXITCODE=$?
           :0
           * ?/bin/test "$EXITCODE" = "73"
           /dev/null
           EXITCODE=0
           :0
           * ?/bin/test "$VIRTUALMIN" != ""
           {
           INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
           }
           DEFAULT=""
           ORGMAIL=""
           DROPPRIVS=yes
           :0
           $DEFAULT
Status: 
Active

Comments

I forgot to add that I changed the dovecot mail file to maildir:~/ , don't know if it has any relevance.

Now I put ORGMAIL=$HOME/ DEFAULT=$HOME/ in the procmail config and it delivers ok.

I don't know if I should mark it as fixed, as there is the issue of webmin/virtualmin leaving the paths empty

Howdy -- thanks for letting us know how you fixed that!

We don't seem to be able to reproduce that issue at the moment, though we'll keep your issue in mind in case others report a similar problem.

You should use $HOME/Maildir/ instead of just $HOME/

It is ok without /Maildir, because I also changed it from dovecot.

If you ask why, it was easier (quicker) to migrate from cpanel, using just rsync /home/cpanelusername/mail/domainname/* /home/virtualminname/homes/* (and not having /home/virtualminname/homes/mailuser/Maildir)

Ok, the real problem here is that no mail delivery location was set in your Postfix config, which caused Virtualmin to configure Procmail to deliver to nowhere! I will add a check to prevent this in the next release..