mail server setup
Gregory Nowak
greg at gregn.net
Wed Jan 6 21:27:14 EST 2016
On Wed, Jan 06, 2016 at 11:49:37AM -0800, Juan Hernandez wrote:
> I wanted to know what you guys recommended for setups?
>
> I need webmail, imap, virtual domains, spam/antivirus protection, etc.
For webmail, I use sqwebmail. For imap, I use courier-imap. For MTA
(including virtual domains) I use postfix. For spam, I use
spamassassin. For antivirus I use clamav-milter to interface clamav to postfix.
On Wed, Jan 06, 2016 at 10:43:00PM +0100, MichaĆ Zegan wrote:
> More like: leave message intact, but add something like
> x-spam-status: yes
> x-spam-core: 5.0
> into mail headers.
That's done by spamc, which you can invoke through maildrop, or
procmail. I use maildrop on my server, so I'll describe how to use
that to do what you want.
You need to have postfix pass the message to maildrop. You can either
do this directly in master.cf, or through the .forward mechanism. I
use both, depending on which domain the mail is for. I'll explain how
to do that through .forward, since that's simpler
In the user's $HOME/.forward file, you want to have something like:
|/usr/bin/maildrop
Now, you want to create a $HOME/.mailfilter file, which should look
something like:
DEFAULT="$HOME/Maildir/"
xfilter "/usr/bin/spamc"
if (/^X-Spam-Flag: YES/:h || /^X-Spam-Status: Yes/:h)
{
to "$DEFAULT/.Spam/"
}
If the message is ham, it goes to $HOME/Maildir/. If the message is
spam, it goes to $HOME/Maildir/.Spam/ This assumes you are using the
Maildir mailbox format, which I am.
Greg
--
web site: http://www.gregn.net
gpg public key: http://www.gregn.net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
If we haven't been in touch before, e-mail me before adding me to your contacts.
--
Free domains: http://www.eu.org/ or mail dns-manager at EU.org
More information about the Speakup
mailing list