Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MailScanner Postfix ClamAV SpamAssassin HowTo
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
vector0319
n00b
n00b


Joined: 16 Jun 2003
Posts: 68
Location: Salisbury, MD, USA

PostPosted: Mon Mar 29, 2004 5:15 pm    Post subject: MailScanner Postfix ClamAV SpamAssassin HowTo Reply with quote

This is a little howto I threw together to help myself out:

http://www.opustechsystems.com/howto/anti-virus-spam-howto.html

Hope it can help someone else out as well. Let me know if you have any questions or comments. Thanks,

Jeremy
http://www.opustechsystems.com
_________________
"Accept no one's definition of your life, but define yourself."
-- Harvey Fierstein
Back to top
View user's profile Send private message
carlito
n00b
n00b


Joined: 29 May 2003
Posts: 51
Location: Puerto Rico

PostPosted: Wed Mar 31, 2004 9:01 am    Post subject: Reply with quote

I follow your document and everything on postfix is ok except this error when i try to start mailscanner:

Starting MailScanner...
/opt/MailScanner/bin/check_mailscanner: line 53: MailScanner: command not found

If you can sent me the mailscanner.conf or help me with this i'll be very grateful.
_________________
Living la vida Linux
Back to top
View user's profile Send private message
GamesBond
n00b
n00b


Joined: 15 Mar 2004
Posts: 66
Location: Amsterdam

PostPosted: Wed Mar 31, 2004 4:58 pm    Post subject: Reply with quote

Thanks for the HOWTO!

Did you know there is an effort being made to get MailScanner in portage?

https://bugs.gentoo.org/show_bug.cgi?id=36060

:)
Back to top
View user's profile Send private message
whitetux
n00b
n00b


Joined: 17 Mar 2004
Posts: 20

PostPosted: Thu Apr 01, 2004 6:39 pm    Post subject: Thanks! Reply with quote

Hey great how to.

One question, why MailScanner over amavisd-new? Just curious because I have used amavisd-new in the past and have never tried MailScanner before.
Back to top
View user's profile Send private message
vector0319
n00b
n00b


Joined: 16 Jun 2003
Posts: 68
Location: Salisbury, MD, USA

PostPosted: Thu Apr 01, 2004 8:19 pm    Post subject: Reply with quote

carlito,

Not sure why you are getting that error. The MailScanner command should be in the same directory as check_mailscanner. Either way I've been helping with getting a MailScanner ebuild up and going. Ther has been alot of work on it from alot of people. I hope it will get into portage soon. See bug above until then. Thanks!

Jeremy

carlito wrote:
I follow your document and everything on postfix is ok except this error when i try to start mailscanner:

Starting MailScanner...
/opt/MailScanner/bin/check_mailscanner: line 53: MailScanner: command not found

If you can sent me the mailscanner.conf or help me with this i'll be very grateful.

_________________
"Accept no one's definition of your life, but define yourself."
-- Harvey Fierstein
Back to top
View user's profile Send private message
vector0319
n00b
n00b


Joined: 16 Jun 2003
Posts: 68
Location: Salisbury, MD, USA

PostPosted: Thu Apr 01, 2004 8:21 pm    Post subject: Reply with quote

Your welcome!

Yep knew about the bug page and have helped out. I see you are helping as well. Great! This was my quick attempt to help those until the ebuild gets in portage.

GamesBond wrote:
Thanks for the HOWTO!

Did you know there is an effort being made to get MailScanner in portage?

https://bugs.gentoo.org/show_bug.cgi?id=36060

:)

_________________
"Accept no one's definition of your life, but define yourself."
-- Harvey Fierstein
Back to top
View user's profile Send private message
vector0319
n00b
n00b


Joined: 16 Jun 2003
Posts: 68
Location: Salisbury, MD, USA

PostPosted: Thu Apr 01, 2004 8:23 pm    Post subject: Re: Thanks! Reply with quote

whitetux,

Never heard of amavisd until now. Thanks for the tip. One of the great things of open source is choice. I gave those who wanted a choice a HowTo on one of those choices. Why not write up a HowTo on amavisd? :)

Jeremy

whitetux wrote:
Hey great how to.

One question, why MailScanner over amavisd-new? Just curious because I have used amavisd-new in the past and have never tried MailScanner before.

_________________
"Accept no one's definition of your life, but define yourself."
-- Harvey Fierstein
Back to top
View user's profile Send private message
GamesBond
n00b
n00b


Joined: 15 Mar 2004
Posts: 66
Location: Amsterdam

PostPosted: Fri Apr 02, 2004 7:55 am    Post subject: Reply with quote

I had a look at amavis earlier, it was more difficult to install, required modifications to my mail server setup and was not able to do spam checks at the same time. I am *VERY* pleased with MailScanner it is far superior than any commercial package available on the market.

But as said, open source is all about the freedom to choose :)
Back to top
View user's profile Send private message
MasquedAvenger
Guru
Guru


Joined: 21 Aug 2003
Posts: 559
Location: Southern California

PostPosted: Sat Apr 03, 2004 1:35 am    Post subject: Reply with quote

I can't get my setup working. I copied over /var/spool/postfix to /var/spool/postfix.in, copied /etc/postfix to /etc/postfix.in, and did all the necessary changes. The init script started up just fine, but it won't deliver any mail. This is from an already working postfix setup (I'd been using it for a while and decided I wanted to implement clamav for my windows users.) Once I undid the changes to /etc/postfix, got rid of the mailscanner init script, and re-loaded the normal postfix script, mail is delivered again. I'm afraid that I won't be able to play with this for a while now since I have others depending too heavily on my server. Guess I will have to wait until later :( Any ideas anyone?

James
Back to top
View user's profile Send private message
vector0319
n00b
n00b


Joined: 16 Jun 2003
Posts: 68
Location: Salisbury, MD, USA

PostPosted: Tue Apr 06, 2004 7:53 pm    Post subject: Reply with quote

There is already a pretty stable MailScanner ebuild getting worked on. You can check out the bug referenced above.

To answer your question though. Check /var/log/maillog (or your mail log location) and see if MailScanner is complaining about any permission problems. I have had the same issue you are having in the past and it has either been a permission problem or a typo in my MailScanner.conf or in main.cf. Good luck and sorry it didn't work right of the bat.

Jeremy

MasquedAvenger wrote:
I can't get my setup working. I copied over /var/spool/postfix to /var/spool/postfix.in, copied /etc/postfix to /etc/postfix.in, and did all the necessary changes. The init script started up just fine, but it won't deliver any mail. This is from an already working postfix setup (I'd been using it for a while and decided I wanted to implement clamav for my windows users.) Once I undid the changes to /etc/postfix, got rid of the mailscanner init script, and re-loaded the normal postfix script, mail is delivered again. I'm afraid that I won't be able to play with this for a while now since I have others depending too heavily on my server. Guess I will have to wait until later :( Any ideas anyone?

James

_________________
"Accept no one's definition of your life, but define yourself."
-- Harvey Fierstein
Back to top
View user's profile Send private message
carlito
n00b
n00b


Joined: 29 May 2003
Posts: 51
Location: Puerto Rico

PostPosted: Wed Apr 07, 2004 2:14 pm    Post subject: Reply with quote

I solved my problem, i do a symlink of ln -s /usr/bin/MailScanner /opt/MailScanner/bin/MailScanner and now everything is working :)
_________________
Living la vida Linux
Back to top
View user's profile Send private message
noganex
n00b
n00b


Joined: 20 Aug 2003
Posts: 57
Location: Germany

PostPosted: Wed Apr 07, 2004 2:22 pm    Post subject: Reply with quote

I can't connect to the host. Site down? :(
Anyone got a mirror for the HowTo? Sounds good.. :)
Back to top
View user's profile Send private message
carlito
n00b
n00b


Joined: 29 May 2003
Posts: 51
Location: Puerto Rico

PostPosted: Wed Apr 07, 2004 8:10 pm    Post subject: Reply with quote

vector0319: i successfull install and configure the postfix, spamassasin and the mailscanner but on my email account i got the spam messages as: {Spam?} Dollar buy - Rolex, Diamonds and More <------ how i do that spam emails dont go to my accounts?
_________________
Living la vida Linux
Back to top
View user's profile Send private message
vector0319
n00b
n00b


Joined: 16 Jun 2003
Posts: 68
Location: Salisbury, MD, USA

PostPosted: Wed Apr 07, 2004 8:59 pm    Post subject: Reply with quote

carlito,

there is an option in the MailScanner.conf that will configure what it should do with spam, highly marked spam, and viruses. You can store, deliver, bounce, etc each one of those options. Check in the conf file and take out deliver on the appropriate config line. I would tell you the exact line, but I'm to lazy to look it up :) Good luck.

Also Mailwatch @ http://mailwatch.sf.net is a great tool to use with MailScanner, but not for the faint of heart. Back up your conf files before trying this. I learned the hard way :P

Jeremy

carlito wrote:
vector0319: i successfull install and configure the postfix, spamassasin and the mailscanner but on my email account i got the spam messages as: {Spam?} Dollar buy - Rolex, Diamonds and More <------ how i do that spam emails dont go to my accounts?

_________________
"Accept no one's definition of your life, but define yourself."
-- Harvey Fierstein
Back to top
View user's profile Send private message
vector0319
n00b
n00b


Joined: 16 Jun 2003
Posts: 68
Location: Salisbury, MD, USA

PostPosted: Wed Apr 07, 2004 9:03 pm    Post subject: MailScanner HowTo mirror Reply with quote

Mirrors is at http://footon.jheslop.com/howto/anti-virus-spam-howto.html

also there is a mirror at http://wiki.linuxquestions.org search for MailScanner (should be back up soon there)

Jeremy
_________________
"Accept no one's definition of your life, but define yourself."
-- Harvey Fierstein
Back to top
View user's profile Send private message
carlito
n00b
n00b


Joined: 29 May 2003
Posts: 51
Location: Puerto Rico

PostPosted: Thu Apr 08, 2004 1:14 pm    Post subject: Reply with quote

Hey vector thanks a lot man the system is working at 100% :) SPAM is dead jejeje
_________________
Living la vida Linux
Back to top
View user's profile Send private message
vector0319
n00b
n00b


Joined: 16 Jun 2003
Posts: 68
Location: Salisbury, MD, USA

PostPosted: Thu Apr 08, 2004 2:20 pm    Post subject: Reply with quote

!De Nada Senior! ;)

carlito wrote:
Hey vector thanks a lot man the system is working at 100% :) SPAM is dead jejeje

_________________
"Accept no one's definition of your life, but define yourself."
-- Harvey Fierstein
Back to top
View user's profile Send private message
axses
Tux's lil' helper
Tux's lil' helper


Joined: 18 Mar 2003
Posts: 110

PostPosted: Tue Apr 27, 2004 12:00 pm    Post subject: Reply with quote

Hey thx for this great tutorial. It was exactly what I was looking for. I have done the same install using exim on another machine. It works well too.


Thx

axses
Back to top
View user's profile Send private message
bfdarren
n00b
n00b


Joined: 31 Mar 2004
Posts: 2

PostPosted: Tue Apr 27, 2004 9:14 pm    Post subject: individual spamassassin settings Reply with quote

Great HowTo, but is it possible to set it up so that SpamAssassin can be customized by each user of the system? I looked at the configuration and it appears that is should already be doing it, but when I add an account to the blacklist, it still gets through without any tagging.

Thanks
Back to top
View user's profile Send private message
vector0319
n00b
n00b


Joined: 16 Jun 2003
Posts: 68
Location: Salisbury, MD, USA

PostPosted: Tue Apr 27, 2004 10:03 pm    Post subject: Re: individual spamassassin settings Reply with quote

I'm not a hundred percent sure about that. Intuition would say it should work for each user especially since, like you said, it states so in the conf file. You should contact the MailScanner maintainer Julian and should be able to answer your question a little better: mailscanner@ecs.soton.ac.uk

Hope this helps and you get it working for you.

Jeremy

bfdarren wrote:
Great HowTo, but is it possible to set it up so that SpamAssassin can be customized by each user of the system? I looked at the configuration and it appears that is should already be doing it, but when I add an account to the blacklist, it still gets through without any tagging.

Thanks

_________________
"Accept no one's definition of your life, but define yourself."
-- Harvey Fierstein
Back to top
View user's profile Send private message
turtlendog
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jan 2004
Posts: 107
Location: East AZ

PostPosted: Thu Apr 29, 2004 2:00 am    Post subject: Reply with quote

No joy for me :(

I tried this HOWTO to implement mailscanner and spamassassin in my existing postfix/clamav/cyrus solution (clamav had been being called by evolution).

The first sign of trouble was this error when installing the Convert::BinHex perl module. Here's the output of make test:

Code:
root@ben /home/bdug/Convert-BinHex-1.119
 ><> make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/comp2bin....Can't locate package Exporter for @Checker::ISA at t/comp2bin.t line 3.
Undefined subroutine &main::check called at t/comp2bin.t line 75.
t/comp2bin....dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-9
        Failed 9/9 tests, 0.00% okay
Failed Test  Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/comp2bin.t  255 65280     9   18 200.00%  1-9
Failed 1/1 test scripts, 0.00% okay. 9/9 subtests failed, 0.00% okay.
make: *** [test_dynamic] Error 2


I know nothing about perl so that's greek to me.

It's perhaps worth noting that I installed the default version of MIME::Tools rather than the (by someone) recommended 5.411 since I didn't feel like patching the crap out of the recommended 5.411

Anyway, I disabled clamav and spamassassin checking in the MailScanner.conf, so there shouldn't be anything else stopping the transfer of mail. The messages back up in /var/spool/postfix.in/deferred and never make it to /var/spool/postfix/incoming

I guess I have to suspect that the Convert::BinHex module is causing the problem, though I don't see any debugging output from mailscanner.

I'd love to hear some thoughts from anyone who knows more about perl and CPAN modules than I do. (and that shouldn't be hard to do!)
Back to top
View user's profile Send private message
vector0319
n00b
n00b


Joined: 16 Jun 2003
Posts: 68
Location: Salisbury, MD, USA

PostPosted: Thu Apr 29, 2004 2:39 am    Post subject: Reply with quote

tutlendog,

Usually when I want to add a perl module I either see if the module is in the portage tree, use the "perl -MCPAN -e shell" command, or the g-cpan.pl command. There is headway on making a MailScanner ebuild here: https://bugs.gentoo.org/show_bug.cgi?id=36060 In this ebuild there are references to the packages needed for MailScanner to run. If the package is not in portage you can run g-cpan.pl instead like so:

Code:
g-cpan.pl Convert::BinHex


Hope this helps. If you have any more questions please PM me. thx,

Jeremy

turtlendog wrote:
No joy for me :(

I tried this HOWTO to implement mailscanner and spamassassin in my existing postfix/clamav/cyrus solution (clamav had been being called by evolution).

The first sign of trouble was this error when installing the Convert::BinHex perl module. Here's the output of make test:

Code:
root@ben /home/bdug/Convert-BinHex-1.119
 ><> make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/comp2bin....Can't locate package Exporter for @Checker::ISA at t/comp2bin.t line 3.
Undefined subroutine &main::check called at t/comp2bin.t line 75.
t/comp2bin....dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-9
        Failed 9/9 tests, 0.00% okay
Failed Test  Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/comp2bin.t  255 65280     9   18 200.00%  1-9
Failed 1/1 test scripts, 0.00% okay. 9/9 subtests failed, 0.00% okay.
make: *** [test_dynamic] Error 2


I know nothing about perl so that's greek to me.

It's perhaps worth noting that I installed the default version of MIME::Tools rather than the (by someone) recommended 5.411 since I didn't feel like patching the crap out of the recommended 5.411

Anyway, I disabled clamav and spamassassin checking in the MailScanner.conf, so there shouldn't be anything else stopping the transfer of mail. The messages back up in /var/spool/postfix.in/deferred and never make it to /var/spool/postfix/incoming

I guess I have to suspect that the Convert::BinHex module is causing the problem, though I don't see any debugging output from mailscanner.

I'd love to hear some thoughts from anyone who knows more about perl and CPAN modules than I do. (and that shouldn't be hard to do!)
Code:

_________________
"Accept no one's definition of your life, but define yourself."
-- Harvey Fierstein
Back to top
View user's profile Send private message
vector0319
n00b
n00b


Joined: 16 Jun 2003
Posts: 68
Location: Salisbury, MD, USA

PostPosted: Thu Apr 29, 2004 2:42 am    Post subject: Reply with quote

Also on your statement

Quote:
Anyway, I disabled clamav and spamassassin checking in the MailScanner.conf, so there shouldn't be anything else stopping the transfer of mail. The messages back up in /var/spool/postfix.in/deferred and never make it to /var/spool/postfix/incoming


You could be right about the modules being the issue. I have had this happen many times and it usually boils down to a configuration problem or a permission problem either in postfix or MailScanner.

I usually have to go through the install process twice before I get the mail to pass through properly.
_________________
"Accept no one's definition of your life, but define yourself."
-- Harvey Fierstein
Back to top
View user's profile Send private message
axses
Tux's lil' helper
Tux's lil' helper


Joined: 18 Mar 2003
Posts: 110

PostPosted: Thu Apr 29, 2004 4:04 am    Post subject: Reply with quote

Isnt convert-binhex in portage? I have been using the portage version and have 2 successfull installations of mailscanner. Have I been using a wrong convert-binhex?

Code:


 root@axses axses # emerge -s convert-binhex
Searching...
[ Results for search key : convert-binhex ]
[ Applications found : 1 ]
 
*  dev-perl/Convert-BinHex [ Masked ]
      Latest version available: 1.119
      Latest version installed: 1.119
      Size of downloaded files: 82 kB
      Homepage:    http://www.cpan.org/modules/by-module/Convert/Convert-BinHex-1.119.readme
      Description: Extract data from Macintosh BinHex files
      License:     GPL-1
 
 
root@axses axses #



For that matter , I have used most of the perl modules from portage. On my 2nd and now my 3rd install, I have been using the 3.0.1 ebuild from bugs.gentoo.org which uses the portage version. The only other package it fetches is the patched mime.tools.
But otherwise my installs have been working 100% with the portage versions fof the perl modules.-

Lemme know.

axses
Back to top
View user's profile Send private message
turtlendog
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jan 2004
Posts: 107
Location: East AZ

PostPosted: Thu Apr 29, 2004 4:44 am    Post subject: Reply with quote

Quote:
Isnt convert-binhex in portage? I have been using the portage version and have 2 successfull installations of mailscanner. Have I been using a wrong convert-binhex?


I am such an idiot. Didn't even think about the fact that perl CPAN modules might be in portage.

The shame...

Works with the portage version on Convert::BinHex

Thanks so much for pointing that out !!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum