CentOS 5 :: Setup Spamassassin With Postfix And Procmail?
Nov 17, 2010
I have Centos 5.5 and using Postfix, procmail and Dovecot for sending and receiving emails. I have spamassassin installed too but not configured. I am getting lots of spams. I googled a lot to find if there is any configuration but I couldn't find.how to setup spamassassin to filter emails for spams.
I have Postfix and Spamassassin setup on Ubuntu Server 9.10. The mail is working perfectly. Spamassassin is correctly marking messages as spam. My problem is with the milter and procmail. On past servers I was able to reject spam based on score via the spamass-milter. For whatever reason I can not get it to work. I have also tried with procmail, again, it does not work. Here are the relative lines in their respective config files:
I am currently running Ubuntu Server 9.10 and followed this HOWTO on setting up my email server.
[url]
Everything seems to work correctly. If I look in the Maildir the emails I send to test are there.
The problem is when I try to sync my email via IMAP from my windows box (on a different network) it doesn't show any of my email nor does it deliver new email. My email app doesn't give any errors nor does the logs on the server.
How can I get it so my email syncs to windows computer? I am sure it is something really small that I am over looking but I can't seem to find it anywhere. I don't know if you need to see any of my config files but I can post them if needed.
In the last week email delivery had slowed down to taking approximately 24 hours and investigation has revealed that there were 45000 emails in the mailqueue. I flushed the mailqueue yesterday but mail delivery is slowing down again because emails are again being queued by the thousand.
The mails are mainly spam sent to ficticious users at a genuine domain hosted on the server.
My setup is running Courier IMAP with Postfix, Spassassin is installed along with Amavisd-new but I just don't understand why this has suddenly become a problem based on my setup not having changed for the last 6 months.
Should these spam emails be being discarded by spamassassin before reaching the mail queue? Are my discard score settings too high (6.9)?
Small server running 5.3 - stock postfix configured to use Maildir. Dovecot configured but both pop and imap ports blocked by firewall. Access to mail is via Squirrelmail via https. Configured to virus scan via ClamAV. Works just fine. Now I want to add procmail filtering. So I create these two files - ~/.forward and ~/.procmailrc in my user home dir: "|exec /usr/bin/procmail -f- || exit 75 #mpeters"
block incoming email within either postfix or spamassassin when the sender equals the recipient. The manner in which our mail infrastructure is set up would preclude this from happening. Granted, we do have outside vendors that spoof our domain so we have to allow emails in with our domain as the sender/from. The vendors do not, however, utilize the same sender/recipient when sending emails.
I setup postfix as a null client on my VPS to send only automated, outbound emails. I also have Google App mail for the domain (for sending receiving personalized emails), however, I receive the following in Gmail for emails sent by from Postfix. The destination email address are correct (tried a few of my personal email addresses). I once got Postfix to work, but no longer the case.
host ASPMX.L.GOOGLE.com[209.85.223.16] said: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or
For 3 days now I've been trying to setup a CentOS box with Apache, PHP, MySQL and iRedMail (Postfix/Dovecot) Everything is great apart from Apache, which is returning 403 errors: "You don't have permission to access / on this server.". The apache error_log file says: "[Mon Jul 26 14:02:32 2010] [error] [client x.x.x.x] (13)Permission denied: access to / denied" (I've blanked out my IP). I have no idea what's happening here. Apache works fine until I add my VirtualHost which is:
<VirtualHost mydomainname.com> DocumentRoot "/home/myuser/public_html" <Directory "/home/myuser/public_html"> allow from all Options +Indexes RewriteEngine On
I am trying to set up a Mail Server -- Virtual Users with Postfix, PostfixAdmin, Courier, Mailscanner, ClamAV On CentOS 5.5 using this guide. These are the version and softwares I have used till now:-
Due to all the "fun" I had upgrading spamassassin from 3.2.5 to 3.3.1 on C55 I thought I would detail it here so as to possibly save others from all the frustration I have endured. There are probably a zillion different ways to make this work but this is how I did it and it seems to work well.
1) Acquire spamassassin rpm. I downloaded several different versions from various sites and had problems with all of them so I ended up grabbing the SRPM from Fedora 13 spamassassin-3.3.1-2.fc13.src.rpm. This of course will not load onto C55 as rpmbuild has changed so I loaded it onto a FC13 box and then TARed the SPEC & SOURCES directories, copied them onto a C55 and built SRPM from there.
2) Install on C55 The new spamassassin requires several updated packages to make it happy. a) perl-Mail-DKIM greater than 0.31. I cheated and used this one from FC8 perl-Mail-DKIM-0.32-3.fc8.noarch.rpm b) perl-socket6 that is 2.0 or later. I got this one from DAG perl-Socket6-0.20-1.rf.x86_64.rpm c) perl-NetAddr-IP that is 4.0 or later. Again DAG saved the day perl-NetAddr-IP-4.007-1.rf.x86_64.rpm d) the spamassassin of course :) Actually I built them from the SRPMs as I needed both the 32 and 64 bit packages for various servers.
3) Run sa-update --D to get the latest rules then restart the spamassassin service. For those who do not have access to a FC13 box you can get a copy of the SRPM I made here [URL].
I followed this how to document [URL] to install postfix, Amavisd, SpamAssassin and ClamAV. My postfix installation is working fine and I can send and receive emails fine. However, it looks like SpamAssassin is not catching any emails. Emails do get passed over to Amavisd as I can see in the logs but ALL Messages comes out CLEAN without being tagged as spam.
As per the document, I did test by sending a test virus email
it does get delievered without being detected as SPAM or tagged as SPAM.
As I said, I have followed the documentation dot by dot and hence do not have spamassassin starting up as a service but i guess amavisd starts it within itself as a module.
Also, my postfix version is the one that supports mysql virtual tables which I got from rpmforge.
Anyone know what version of spam assassin is newer 3.3.1-3 or 3.3.1-52 I would assume 52 is newer but I don't know if once it reaches 99 it going to 2 Example 3.3.1-99 ---- 3.3.1-2 -----3.3.1-21 and so on. I could be completely off but can anyone just clarify if 3.3.1-3 is newer or older than 3.3.1.52
(On a side note does anyone know the difference between spamassassin-3.3.1-3.el5.rfx.i386.rpm and spamassassin-3.3.1-3.el5.rf.i386.rpm?? What does the X mean?) I looked at the release date of .52 and it seems to be in march 2010 whereas .1-3 seems to be in november. oes that seem correct? Does anyone have a direct download to spamassassin-3.3.1-3el5.rf.i386.rpm???
I have been trying to get procmail working on CentOS 5.2. I don't need anything fancy, just an auto reply for a "noreply@" account. Looking at the sendmail configuration, it appears procmail is the MDA. I have looked at many different tutorials and how-tos, but most are old, and/or the locations/paths and setups are markedly different from the defaults on my system. Can anyone recommend a good CentOS-based tutorial on Procmail w/ recipes? (I have an RHEL book and it's no help either.) Thank you for your time and consideration.
Recently we are receiving lots of spam email specially ( Viagra). I want to use spamassassen to filter the spams so I need to configure procmail as local mail delivery agent.At the moment I am using prosfix for mail delivery agent and our server is Centos 5. I did google it but couldn't find a good instruction.
I have my .procmailrc file set up to pipe mail to a simple php script I've written. The only thing the script does at this point is echo back a "hello" message. However, procmail does not execute the script properly.
Here's my script (/home/webs/site.com/scripts/echo.php):
I'm new to CentOS, having always used Slackware in the past. I'm trying to get Cyrus 2.3.7 IMAP working with Procmail 3.22, and having a slight issue. My current setup in sendmail.mc is as follows:
so i set out to change the default smtp port the server uses because my ISP blocks port 25 and i need the email to work in outlook. this morning i could receive email, but not send it. so i did some research and thought that i needed to edit the master.cf file in /etc/postfix/ by commenting out this line: smtp inet n - n - - smtpd -oand replace it with587 inet n - n - - smtpd (587 being the port i want to use)somewhere along the lines postfix server stopped running and now i cannot get it to start.if i try using SSH it crashes immediately and if i restart it in simple control panel nothing happens
I have isntalled a server with Centos 5.2 OS, now I would like to switch from the default sendmail to postfix doing a yum install postfix I've noticed there is already available an rpm version for the OS but I would like to compile my own 2.5 version, I've noticed compiling from source does not allow me to use the mail switcher to tell to the system I'm gonna use Postfix instead of Sendmail as the default MTA while this is possible when I use the "official" rpm version of the package. Now my question is this, would this be a problem? There is some specific procedure/best practice I should follow? Or once compiled and configured Postfix I can safely disable/uninstall sendmail?
Brand new to Linux. Sort of got thrown in front of the bus if you know what I mean. The company I work for has a Linux server running CentOS 5.4 Company uses Linux for their Email, FTP and Web Server. Have been here a few years dabbling in and out of Linux and now that the old Admin has left the company.....I need to learn it ASAP. The server has run pretty solid until today.
The email server runs SendMail and SpamAssasin. Received lots of complaints today regarding extra SPAM. Noticed that SpamAssassin was not running. Tried to restart it through the WebMin tools and got the following error: Starting spamd: child process [3956] exited or timed out without signaling production of a PID file: exit 255 at /usr/bin/spamd line 2588.
just followed the guide on how to setup Ubuntu 10.04 server + postfix from here: [URL]..ports 110, 143, 25 are forwarded on my router to LAN IP of mailserver.
postfix settings hostname: server1.mydomain.com example email: user@mydomain.com
I can receive emails in outlook, if they were sent from the mailserver using: mailx user@mydomain.com
However, external emails from hotmail.com to user@mydomain.com never arrive. I'm thinking this is because of the DNS host records for my domain. Here's what I have.
CentOS 5 box was just setup to replace a crashed old one. I have postfix.admin installed and working, added users (confirmed from mysql command line) and can login using telnet server pop3 with the user information. The problem I am left with is just receiving mail. I have both squirrelmail and roundcube installed, and can also authenticate using both (/var/log/maillog shows);From either webclient I can naturally send mail out and both yahoo and gmail client confirms, yet a reply shows nothing, and nothing ever shows in the maillog. Firewall is shut down but I don't know postfix enough to see how to test, or is something else grabbing the mail.
I can provide anything necessary, just let me know what. As I see it (just so far) Postfix should be the server that answers and receives the mail, dovecot is more the pop/imap the client would use, so I think it's a postfix issue. If so, can I turn up the debugging, etc. but again, I think all mail received should appear in the maillog file 1st as I see the outbound mail go fine!
make install then i got this error: postfix: fatal: chdir(/usr/libexec/postfix): No such file or directory make: *** [install] Error 1 I don't understand why it's checking the usr/libexec folder for the daemons although I've set the folder to /opt/product/postfix-2.6.5/libexec in the makefile. Here is also the cat of my makedefs.out:
I have a problem setting up Postfix on my home (behind Router/firewall) Ubuntu driven server, I have been trying for days now with no luck. All I would like to do is use the server to send mail (MTA). So while installing I configured it as a satellite system.
I have a Postfix+Dovecot and virtual users setup taken from here. I've got virtual users authenticating using a password file. But I'd like to lock the service down further, so authenticated users can only email other authenticated users (those listed in the same password file) - so it's a closed community. I don't seem to be able to stop authenticated users mailing outside the community.
It wasn't too long ago that I discovered Linux/Ubuntu (in terms of actually USING it) and I've been completely blown away by the capabilities it puts in the user's hands! To think that someone can take an old desktop from a trash pile (literally, in my case) and turn it into a web server for ZERO dollars is absolutely crazy.
Anyway, I've been using said desktop as a sort of "dummy" machine to learn Linux. I want to be clear that I've got another computer for personal use and that I understand that setting up server software on any computer poses a security risk. Having said that, I have a few questions regarding mail servers and their setup on Ubuntu. Again - I'm comfortable with what I've done so far in Ubuntu (installing packages, terminal interaction, basic usage)
My question is mainly this: if you have, say, a domain name through DynDNS (let's say example123.com) and it points to an Ubuntu system, does something like Postfix enable you to make your own email addresses such as user1@example123.com and have an email server from wherever the Ubuntu system is?
I've been following the basic Postfix setup here and have had success so far (down to the "Adding your local domains to postfix" section) bu wanted to make sure that what I'm intending to do is what I'm doing (haha... i hope that makes sense). That is: get domain name at DynDNS, host pages on LAMPP server, use Postfix to facilitate incoming/outgoing email for that domain name.