Home › Forums › OS X Server and Client Discussion › Questions and Answers › Spam and Virus Controls with Postfix
- This topic has 29 replies, 7 voices, and was last updated 20 years, 11 months ago by
Anonymous.
-
AuthorPosts
-
April 5, 2004 at 1:50 pm #357742
carl
Participantiztech,
I believe all of those modules should have been included in step 4. It’s easy to correct, though. Just issue the command, “sudo perl -MCPAN -e shell” again. Then in the CPAN shell, enter the command “install <ModuleName>” where <ModuleName> is replaced by the missing modules (ex. “install IO::Wrap” without quotes). Remember to install any dependencies if prompted to do so.
If you attempt to install any modules that are already installed, I think you’ll receive a message that the module is up to date (no harm done).
Let us know how that works for you. If anyone who reads this sees a mistake (I’m no expert here), please correct me.
Carl
April 5, 2004 at 9:21 pm #357750iztech
Participanti managed to get everything loaded after downloading xtools from apple developer site.
clamav is working becuase i tested it on a virus and it reflected 1 virus.
postfix is working fine but when i send an email with a virus it goes through.
also does this setup scan for spam as well?
April 5, 2004 at 10:12 pm #357751carl
ParticipantPostfix will scan for spam if you have SpamAssassin configured. Both SpamAssassin and ClamAV will need to be called from Postfix. If one isn’t working, you’ll need to check the mail log (/var/log/mail.log) for details.
Step 5 explains how to configure Postfix to call amavis. Amavis actually calls ClamAV and SpamAssassin (configured in the /etc/amavisd.conf file).
April 5, 2004 at 11:41 pm #357752iztech
Participantthanks carl and joel
i am almost there. it seems for some reason the
content_filter=smtp-amavis:[127.0.0.1]:10024 was not sticking. it finally got saved and now i have another problem.in the debug window i am seeing a lot of
can’t connect to 127.0.0.1 port 10025mail is coming in but is getting lost somewhere and it’s not getting bounced either.
i must be missing something prety clear…
April 6, 2004 at 3:49 am #357754Anonymous
ParticipantIf I understand correctly, mail is delivered to PostFix, handed to amavisd, and then given back to PostFix.
The file main.cf includes information on how to deliver the mail to amavisd:
[code:1:da0f596794]content_filter=smtp-amavis:[127.0.0.1]:10024[/code:1:da0f596794]
The file amavisd.conf tells Amavis to listen on the correct port:
[code:1:da0f596794]$inet_socket_port = 10024;[/code:1:da0f596794]
The file master.cf tells PostFix to listen for responses on a different port:
[code:1:da0f596794]127.0.0.1:10025 inet n – y – – smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
[/code:1:da0f596794]
Check master.cf to be sure that you copied the information correctly. You can test that port with the following command:
[code:1:da0f596794]# telnet localhost 10025[/code:1:da0f596794]
The server should respond with:
[code:1:da0f596794]Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
220 mta1.domain.com ESMTP
[/code:1:da0f596794]
press ctrl-], then type ‘quit’ to quitHope this gets you going again.
Carl
April 7, 2004 at 2:02 am #357765iztech
Participantthanks for helping.
everything is working. that is except my login system.
that’s why my previous post states where is the mail going…when i changed from authentication to plain password checking using accounts created for each user in the system everything worked.
i hope i don’t have to end up with this method.
i have created a new thread discussing this.
April 24, 2004 at 2:25 am #357855Anonymous
ParticipantCreate a directory in /Library/StartupItems – name it Amavis
Make sure permissions are correct.
Inside the Amavis directory, create a file: Amavis
Insert this into Amavis file:#!/bin/sh
. /etc/rc.common
StartService ()
{
if [ “${Amavis:=-NO-}” = “-YES-” ]; then
ConsoleMessage “Starting Amavis”
su clamav -c amavisd
freshclam -d -c 2 -l /var/log/clam-update.log
fi
}StopService ()
{
ConsoleMessage “Stopping Amavis”
}RunService “$1”
Inside the Amavis directory, create a file: StartupParameters.plist
Insert this into StartupParameters.plist:{
Description = “Whatever You Want It To Say”;
Provides = (“Amavis”);
Requires = (“Resolver”);
Preference = “None”;
Messages =
{
start = “Starting Amavis”;
stop = “Stopping Amavis”;
};
}Ceate a line in /etc/hostconfg and add this to the bottom:
Amavis=-YES-
Hope this does it.
April 24, 2004 at 4:10 pm #357859iztech
Participantthanks for the script to startup amavis.
i have been running everything with the debug window.
please look at the post “spam getting through, virus emails get stopped”
i have posted a log.
virus are being blocked but not spam.in the header it is showing x-virus scan by amavisd-new but nothing indicating spam scanning.
also the amount of spam coming through is another indication that spam is not being stopped.
not sure how i can trouble shoot this.
thanks
May 3, 2004 at 5:32 am #357927Anonymous
ParticipantI’ve installed everything, got to the point of testing it when…
May 3 05:23:33 server postfix/smtp[24386]: fatal: unexpected command-line argument: 127.0.0.1:10025
appears in the log whenever I send a message in.
Any ideas gratefully received, as all incoming mail is being blocked…
many thanks
fraser
May 4, 2004 at 9:57 am #357933dana_drury
ParticipantHi Fraser,
I found that the GUI completely screws up your master.cf if you use it to control your mail.
I discovered by stopping the mail process, then editing the master.cf.defaultserver.swap file with the:
smtp-amavis unix – – y – 2 smtp etc then it works fine because it swaps back the correct configuration, I did this after 40 minutes of pulling my hair out and it all worked fine.
May 4, 2004 at 10:29 pm #357934Anonymous
ParticipantThanks for the suggestion, Dana, but when I test the port I’m still getting this:
[server:/Users/admin] clamav% telnet 127.0.0.1 10025
Trying 127.0.0.1…
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
[server:/Users/admin] clamav%Did you restart the mail service in server admin, or just do ‘postfix reload’?
Thanks
Fraser
May 5, 2004 at 10:50 am #357942Anonymous
ParticipantAha! I think I’ve cracked it. For some reason, editing master.cf.defaultserver.swap with emacs rather than Text Edit had the required effect.. (Why? I cannot guess)
Thanks for your help
Fraser
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed