I have postfix running on my server with a main.cf as follwos:-
myorigin = $mydomain
inet_interfaces = 213.229.80.33, 127.0.0.1
mydestination = 213.229.80.33, corunna.com, localhost, corunnasystems.com
mynetworks = 213.229.80.33, 127.0.0.0/8
relay_domains =
home_mailbox = Maildir/
# HELO restrictions
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_helo_restrictions =
permit_mynetworks,
reject_non_fqdn_helo_hostname,
reject_invalid_helo_hostname,
permit
# Sender restrictions
smtpd_sender_restrictions =
permit_mynetworks,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
permit
# Recipient restrictions
smtpd_recipient_restrictions =
reject_unauth_pipelining,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
permit_mynetworks,
reject_unauth_destination,
reject_rbl_client zen.spamhaus.org,
reject_rbl_client bl.spamcop.net,
check_policy_service unix:postgrey/socket,
permit
mailbox_command = /usr/bin/procmail
I have no /etc/procmailrc file but a .forward file
"|IFS=' ' && exec /usr/bin/procmail -f- || exit 75 #user"
on each of 2 logins on the server and also a .procmailrc file, also for each login.
:0
* ? echo $FROM | egrep -i -f /home/dconran/.whitelist
/var/mail/dconran
:0fw: spamassassin.lock
* < 64000
| spamassassin
:0:
* Subject:.*\[SPAM\]
megaspam
:0:
* ^X-Spam-Status: Yes
megaspam
:0:
* ^X-Spam-Level: \*\*\*\*
bigspam
All of my messages are being piped through SpamAssassin (as far as I can tell) but some of them are then getting dumped in the megaspam and bigspam files but others with exactly the same SpamAssassin headers (ie showing that the message is spam) are getting through to my PC.
Why should some messages get through but seemingly exactly similar ones not get through?
Is there something wrong with my Postfix/.forward/.procmailrc setup?
.procmailrc
there is nothing which sets$FROM
and so the whitelisting check will never succeed.user
comment is a placeholder which should be replaced with your actual account name; but unless you are running an antique Sendmail, this part of the.forward
is completely unnecessary. In fact, most Postfix default configurations don't require any.forward
at all, and will run Procmail if a.procmailrc
file is detected.formail -XFrom: -r -xTo: | tr -d ' '
. Also NAME=formail -xFrom: -c
and SUBJECT=formail -xSubject: -c