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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
sensible-mda
SENSIBLE-MDA(8) System Manager's Manual SENSIBLE-MDA(8)
NAME
sensible-mda - a generic local MDA router for Debian systems
SYNOPSIS
sensible-mda from to detail client-addr
DESCRIPTION
sensible-mda is used to simplify the installation and configuration of sendmail(8) , or other MTAs for use on Debian systems. With sensi-
ble-mda, sendmail can support a plethora of MDAs (procmail, maildrop, deliver, etc.) without having pick any one of them as required.
FUNCTION
sensible-mda is called by sendmail as a local mailer when the following exists in sendmail.mc:
define(`LOCAL_MAILER_ARGS', `sensible-mda $g $u $h ${client_addr}')dnl
sensible-mda will look for the following MDAs (in this order), and pass the mail on to the first SUID MDA found (Or first found MDA, if run
w/euid=root): procmail(1), maildrop(1), deliver(8), mail.local(8)
OPTIONS
Available command line options are the following:
from The sender of this email (sendmail $g variable)
to The recipient of this email (sendmail $u variable)
detail The detail portion of the recipient userid (sendmail $h variable) - ie:
cowboy+sendmail@debian.org
client-addr
TCP/IP address of the sender (sendmail ${client_addr} variable) Not used (for the nonce)
FILES
/etc/mail/sendmail.mc
sendmail m4 input to generate sendmail.cf
/etc/mail/sendmail.cf
actual sendmail configuration file (treated as a binary file)
SEE ALSO
sendmail(8), procmail(1), maildrop(1), deliver(8), mail.local(8)
BUGS
None known so far.
AUTHOR
Richard Nelson <cowboy@debian.org>
HISTORY
4th Berkeley Distribution October 21 1999 SENSIBLE-MDA(8)