Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have been trying to get Spamassassin set up on my postfix server. I used http://advosys.ca/papers/postfix-filtering.html To go by. Everything installs clean and looks ok till I get to the test portion where I create a txt file and cat it to my filter.
Code:
Change to the /var/spool/filter directory if not there already. Use your favorite text editor to create a file named "test.txt" containing the following:
From: <tester@yourdomain.com>
To: <you@yourdomain.com>
Hi there. This is a test message.
Code:
Send the above test message through the filter script as follows:
cat test.txt | /usr/local/anomy/filter.sh -f tester -- root
I do it and I dont get any errors, the tutorial says for some reason I should have mail in root. But I dont.
What am I missing?
Last edited by gr0undz3r0; 10-20-2006 at 01:35 AM.
First step should always be to look at you log. I'd guess it's maillog
Personally, I'd have a look ate www.postrfix.org and look at one of the howtos and implement amavisd-new. This will call spamassassin for you and filter viruses as well.
Rgds
Last edited by billymayday; 10-20-2006 at 05:39 AM.
Oct 20 08:15:53 mail postfix/smtp[29469]: E0C5F804068: to=<tester@mail.mydomain.com>, relay=none, delay=0, status=bounced (mail for mail.mydomain.com loops back to myself)
Oct 20 08:15:53 mail postfix/qmgr[23348]: E0C5F804068: removed
So it looks like I cant take mail that loops back.
I guess I need to fix that.
Any idea how?
Thanx Mate.
NOTE: Your server must already have Postfix installed and working. Please do not try to follow these instructions until you first have a basic installation of Postfix working.
Oct 20 08:15:53 mail postfix/smtp[29469]: E0C5F804068: to=<tester@mail.mydomain.com>, relay=none, delay=0, status=bounced (mail for mail.mydomain.com loops back to myself)
Oct 20 08:15:53 mail postfix/qmgr[23348]: E0C5F804068: removed
So it looks like I cant take mail that loops back.
I guess I need to fix that.
Any idea how?
Thanx Mate.
When you typed out your test.txt file, make sure that you replace the "To: " line with a valid address that Postfix will deliver locally.
To find out which addresses postfix will deliver locally, just have Postfix show you the "mydestination" parameter, as follows:
Code:
postconf mydestination
if you see
mydestination = $myhostname localhost.$mydomain localhost
then those are the default settings, and mail sent to user@mydomain.com will not be delivered locally, but mail sent to user@hostname.mydomain.com will be, since "mydestination" has $myhostname listed.
I dont think the contents of the text file matter.
I dont have the user tester in the textfile:
The Text File:
Code:
From: <gooduser@mydomain1.com>
To: <gooduser2@mydomain2.com>
Hi there. This is a test message.
~
Output from maillog:
Code:
Oct 21 02:10:56 mail postfix/smtp[23718]: 203CE804068: to=<tester@mail.mydomain.com>, relay=none, delay=0, status=bounced (mail for mail.mydomain.com loops back to myself)
Oct 21 02:10:56 mail postfix/qmgr[23348]: 203CE804068: removed
I think the sender and recipient are stated in the command line var:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.