Sponsored Content
Top Forums UNIX for Advanced & Expert Users Problem with sendmail procmail spamassasin & relay Post 302217919 by hardesty on Wednesday 23rd of July 2008 11:48:53 PM
Old 07-24-2008
Problem with sendmail procmail spamassasin & relay

I have been working on setting up a mail relay. I have just about everything working except for the procmail part. The configuration is as follows:

Internet -> mailrelay -> mail server
|
spamassassin server

I have spamassassin running on a seperate server and have configured spamc to connect to it.

I have this in my cf file:

MAILER(procmail)dnl
LOCAL_CONFIG
CPprocmail
LOCAL_RULESETS
LOCAL_RULE_0
R$* < @ $=w > $* $#procmail $@ /etc/mail/procmailrc $: $1<@$2.procmail.>$3
R$* < @ $=w. > $* $#procmail $@ /etc/mail/procmailrc $: $1<@$2.procmail.>$3
R$* < @ $=R > $* $#procmail $@ /etc/mail/procmailrc $: $1<@$2.procmail.>$3
R$* < @ $=R. > $* $#procmail $@ /etc/mail/procmailrc $: $1<@$2.procmail.>$3
R$* < @$* .procmail. > $* $1<@$2.>$3 Already filtered, map to original address


In my procmailrc file I have:

DROPPRIVS=yes
VERBOSE=on
LOGFILE=/var/log/procmail.log

:0fw
* < 256000
| /usr/local/bin/spamc
:0
* ^X-Spam-Status: Yes
/dev/null

:0 w
! -oi -f "$@"


My threshold for spamd is 15 at the moment for finding spam.

It looks like sendmail send the new mail off to procmal and process it: I see this in the log:
procmail: Assigning "LASTFOLDER=/dev/null"
procmail: Opening "/dev/null"
Subject: [SPAM] More length and width
Folder: /dev/null 4175
procmail: [21421] Wed Jul 23 00:05:51 2008
procmail: No match on "^X-Spam-Status: Yes"
procmail: No match on "^^rom[ ]"
procmail: Executing "/usr/lib/sendmail,-oi,-oi,-f,ilan@escortcorp.com,sfair_funw@hardlink.net.procmail"
procmail: Match on "< 256000"
procmail: Executing "/usr/local/bin/spamc"
procmail: Match on "< 256000"
procmail: Executing "/usr/local/bin/spamc"
procmail: [21402] Wed Jul 23 00:05:52 2008
procmail: Assigning "LASTFOLDER=/usr/lib/sendmail -oi -oi -f "
Subject: 20m reward for capture of Osama
Folder: /usr/lib/sendmail -oi -oi -f 1137
procmail: [21421] Wed Jul 23 00:05:52 2008
procmail: Assigning "LASTFOLDER=/usr/lib/sendmail -oi -oi -f "
Subject: Visit to See our Newly Opened Discount Store and KEEP your bucks INTA
Folder: /usr/lib/sendmail -oi -oi -f 25378
procmail: [21441] Wed Jul 23 00:05:54 2008
procmail: Match on "^X-Spam-Status: Yes"
procmail: Assigning "LASTFOLDER=/dev/null"


It is deleting spam Like I would expect. The problem is what it does with the good mail. It seems to try to send it back to sendmail and then I never see it again. I do see procmail jobs running where they have rewritten the address to end in .procmail, but it just sort of disappears.

Any idea on where I could be missing things?

solaris 5.8
sendmail 8.14.2
spamassassin 3.25
procmail 3.22
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Sendmail Relay

I'm trying to get my Solaris 7 sendmail server to allow external clients to send to external recipients. I know this has to do with relaying, but I'm not sure how unsafe I have to get to allow this. I simply need for users to login from any domain and be allowed to send mail via SMTP to any... (4 Replies)
Discussion started by: Solaris
4 Replies

2. UNIX for Dummies Questions & Answers

Sendmail open relay

All I am having a bit of a problem with my sendmail smtp server. The environment: Redhat Linux 8 sendmail-8.12.8-9.80. The mailserver is used by our application to send mail notifications to users on the system. The application is hosted on 2 different servers (separate domains)... (2 Replies)
Discussion started by: skotapal
2 Replies

3. Linux

local mail relay problem in Sendmail

I have a linux box. Sendmail is work fine in this box. The only problem I am facing is whenever I send mail using the mail command to the outside world or to root@localhost, I get this error - 127.0.0.1 localhost denied from relaying The command I used to send mail is - Ls -l | mail -s... (0 Replies)
Discussion started by: RajaRC
0 Replies

4. Solaris

sendmail + procmail + spamassassin

Hello, I'm triying to install senmail + procmail + spamassassin, but i've been having trouble with the first part, i cant install procmail... im using solaris 9, i have already installed sendmail, then i tried to install procmail and everything goes right, , then edit the /etc/mail/sendmail.cf... (1 Reply)
Discussion started by: sx3v1l_1n51de
1 Replies

5. Solaris

Sendmail relay problem

I have a sendmail issue When I try to send a mail message using mailx I get a "connection refused by mail14.messagelabs.com" error. relay=mail14.messagelabs.com., dsn=4.0.0, stat=Deferred: Connection refused by mail14.messagelabs.com However, mail14.messagelabs.com doesn't exist. The... (4 Replies)
Discussion started by: soliberus
4 Replies

6. Solaris

Sendmail error delaying relay

When I try to send mail, sendmail delays a lot. After monitoring syslog, I noticed that sendmail starts with this first message... waits a minute and gives the second message... waits another minute and then sends off the email. How do I correct this in sendmail or completly disable it. I'm sending... (0 Replies)
Discussion started by: adelsin
0 Replies

7. Red Hat

add relay to sendmail.cf

Hi, I notice that my relay on sendmail.cf is just "DS" and no ip. So I guess, it's using the local DNS to relay my mail which sometimes being spammed. I would like to add a new relay ip "DSxxx.xxx.xxx.xxx" on sendmail.cf. What do I need to edit sendmail.cf? Do I just use vi or m4? ... (4 Replies)
Discussion started by: itik
4 Replies

8. Solaris

Sendmail relay failing

Hi Techies Bit new to sendmail thingy. I have a Solaris 10 box. There is a request generated by customer that they want Solaris 10 box to use as relay an external smtp server. the smtp server is updated in hosts file and it is pingable. I have updated by "vi" /etc/mail/sendmail.cf # ...... (0 Replies)
Discussion started by: khaniqshahid
0 Replies

9. UNIX for Dummies Questions & Answers

Help with SendMail Procmail filtering

Hi All, I am very new to Unix. I have a test server running FreeBSD 10.1 and SendMail 8.14.9. I need to filter incoming emails based on the sender's email address or domain and forward them to another address on a different domain as well as to the original recipient. Can I achieve this with... (1 Reply)
Discussion started by: simplemind
1 Replies

10. UNIX for Advanced & Expert Users

Some mails not scanned by SpamAssassin 3.4.1 w sendmail/procmail on Fedora 21

We have a user who has about a 50% missed rate on spam detection. I'm wondering if his user prefs or something is preventing scanning of all messages? SpamAssassin version 3.4.1, running on Perl version 5.20.3, sendmail Version 8.15.2 The contents of the user_prefs file: # How many points... (2 Replies)
Discussion started by: RobbieTheK
2 Replies
CUFILTER(1p)						User Contributed Perl Documentation					      CUFILTER(1p)

NAME
cufilter - Filter emails through Mail::CheckUser SYNOPSIS
Add the following lines to your ~/.procmailrc: # Filter mail through Mail::CheckUser :0f | /usr/bin/cufilter DESCRIPTION
When email messages are filtered through this program using the procmail settings as outlined in the SYNOPSYS, the email address in the "From:" header is passed through Mail::CheckUser to ensure validity. If there is a problem with the email address, the "Subject:" header is modified to show which email address failed along with the failure reason. No messages are lost, but it provides an easy way for the mail client to organize, sort, or filter based on the subject tweaks. EXAMPLES
Lets say a spammer sends a message with the following headers: From: god@heaven.org To: you@host.com Subject: Happy Pill Then the new headers might change to the following: From: god@heaven.org To: you@host.com Subject: [CU!god@heaven.org!DNS failure: SERVFAIL] Happy Pill This makes it easy to filter for mail clients. INSTALL
This file can be installed into /usr/bin/cufilter and is intended to be utilized through the procmail functionality by adding the following lines to your ~/.procmailrc configuration. # Filter mail through Mail::CheckUser :0f | /usr/bin/cufilter AUTHORS
Rob Brown bbb@cpan.org COPYRIGHT
Copyright (c) 2003 Rob Brown bbb@cpan.org. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. $Id: cufilter,v 1.3 2003/09/18 15:36:26 hookbot Exp $ SEE ALSO
Mail::CheckUser(3), procmail(1). perl v5.14.2 2012-03-10 CUFILTER(1p)
All times are GMT -4. The time now is 12:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy