Procmail - maildrop & Mail Filters

Anyone,

I have created a virtual user e-mail server with dovecot and postfix. Is there a way to use procmail for virtual users, or is there a rpm available to maildrop. Is there another another mail filter for Rocky 8 Linux?

Greg Ennis

I see I have it on ALmaLinux 8.6. It looks like I may have built it but I do have a spec file for version 3.0.0. that I apparently got from a .bz2 on courier’s site. The latest bz2 is apparently only available from sourceforge, though I haven’t looked too hard. Download Courier Mail Server from SourceForge.net
The courier site says there are instructions on buildinig an rpm, but if I remember correctly, there was a specfile included with the tarball.

To update, I downloaded the latest maildrop (3.0.7.tar.bz2) untarred it and built it with rpmbuild -bb maildrop.spec. I did need the courier-unicode-devel as a dependency. I had already built an rpm of that, I don’t remember where I got it. I may have a rebuild of an older rpm. Anyway, once that was installled and I got the other dependencies with yum-builddep maildrop.spec the rpm built without trouble and I installed it with rpm -Uvh, again without problems.

Out of interest; if someone wanted to build a serious high traffic, world facing, mail server using RHEL 9, what packages would they choose? Or is it that RHEL 9 is not a very good choice for mail servers?

Scottro,

Thanks for letting me know. Looks like I will give maildrop a try. I would suggest that this is important enough it would be good if one of the Rocky repos would include maildrop for a dnf intsall.

Greg

Scottro,

Thanks for letting me know. Looks like I will give maildrop a try. I would suggest that this is important enough it would be good if one of the Rocky repos would include maildrop for a dnf intsall.

Greg

My pleasure. I don’t think RH has had it, though Fedora has, so I don’t
know it will get into RH. I agree though, there should be an official rpm.
I have submitted a request for an official epel package at 2091272 – Request for maildrop rpm for EPEL-8 (and courier-unicode-devel dependencies, so anyone with an interest in it, can add comments there.

I haven’t used it, but Dovecot includes Pigeonhole, a Sieve-based filter.

I added my name to your request! Thanks

It looks as if it’s been added to testing epel.
https://bugzilla.redhat.com/show_bug.cgi?id=2091272
(same link as the one I posted previously)

I read the notice this morning and have been able to download teh rpms and install them with ‘dnf install *rpm’ without a problem. However I have not been ablle to make it work at all.

My set up is like the following,

/home/vmail/domain/user/Maildir/

I found one blurb that suggested I could use a .forward file to pipe the message throughj maildrop for one user.

/etc/vmail/domain/user/.forward
I also tried
/etc/vmail/domain/user/Maildr/.forward
|/usr/bin/maildrop -d $(USER)

Neither of these locations seemed to work.
I also created anj
/etc/maildroprc file and put

EXTENSION=”$1″
user=”5″
domain=”$6″
MAILHOME=”/home/vmail/”
DEFAULT=”$MAILHOME/$domain/$user/Maildir”

if (/^X-SPAM: Spam*/)
{
to “$MAILHOME/$domain/$user/Maildir/Spam”
}
else
{
to “$MAILHOME/$domain/$user/Maildir”

My main.cf
contained
allow_mail_to_commands = alias, forward, include
allow_mail_to_files = alias, forward, include
virtual_transport = maildrop
maildrop_destination_recipient_limit = 1

My master.cf contained
maildrop unix - n n - - pipe
flags=DRXhu user=vmail argv=/usr/bin/maildrop -d ${recipient}

If you can point my in the correct direction I would appreciate your help

Greg Ennis

I haven’t yet tried it, as my own builds are working for me. However, it might be worth commenting on the bug report. My own setup is quite simple, mostly using it for personal use with getmail. I have found a good way to test a .mailfilter config is to create a simple email, then run (assuming you call that mail testmail) cat testmail.txt |maildrop -V4 -d. That might help trouble shoot. I do use postfix for an almost unused account of mine, but the maildrop lines in my master.cf are commented out and main.cf just has
mailbox_command = /usr/bin/maildrop

Edit. I just installed the maildrop and courier rpms and it worked for me. I’m not an expert, so looking at what you have, I don’t see any obvious error. Hopefully, someone with more knowledge will chime in.

Thank you for your help !!!

You’re more than welcome, but I don’t think I helped much.