Greetings to all.
I have (what is to me) a very unusual problem.
I've had exim up and running for 2 years now without a hitch. I have
virtual users, virtual_forward files and spam assassin working just
fine. However, now I have a client who wants a forward file AND
spamassassin.
It works like this:
me@??? <---alias pointing to:
me@??? <---main email address. This has a forward file that reads:
me, my@???
me@??? is also set to scan for spam. (Not all accounts use
spamassassin so I keep a file of accounts to scan for each domain)
So virtual_forward of me@??? sends to me@??? and my@???
It also fires the spamcheck_director for me@???.
The forward generated by the forward file comes through as me@??? and
fires spamcheck_director again.
The end result is for any message going to me@???:
me@??? gets 2 copies
my@??? gets 1 copy.
How can I set it up so that me@??? does not get 2 copies?
Any help would be greatly appreciated.
TIA,
=C=
A cut from the log shows:
2003-09-23 08:20:44 1A1n5w-0000ZB-00 <= friend@??? H=(public.com)
[x.x.x.x] P=esmtp S=975 id=Law15-F110tIIZS2TRq0000776f@???
2003-09-23 08:20:48 1A1n5w-0000ZE-00 <= root@??? U=mail P=spam-scanned
S=1227 id=Law15-F110tIIZS2TRq0000776f@???
2003-09-23 08:20:48 1A1n5w-0000ZE-00 => me <me@???>
D=virtual_localuser T=virtual_localdelivery
2003-09-23 08:20:48 1A1n5w-0000ZE-00 => my@??? <me@???>
R=lookuphost T=remote_smtp H=someserver.blackberry.net [x.x.x.x]
2003-09-23 08:20:48 1A1n5w-0000ZE-00 Completed
2003-09-23 08:20:48 1A1n5w-0000ZB-00 => me <me@???>
D=spamcheck_director T=spamcheck
2003-09-23 08:20:48 1A1n5w-0000ZB-00 => my@??? <me@???>
R=lookuphost T=remote_smtp H=someserver.blackberry.net [x.x.x.x]
2003-09-23 08:20:48 1A1n5w-0000ZB-00 Completed
exim -bt me@??? shows:
[root@servername mail]# exim -bt me@???
me@???
<-- me@???
<-- me@???
deliver to me in domain a.com
director = spamcheck_director, transport = spamcheck
my@???
<-- me@???
<-- me@???
deliver to my@???
router = lookuphost, transport = remote_smtp
host mail.blackberry [x.x.x.x] MX=10
host mail2.blackberry.net [x.x.x.x] MX=20
My relevant directors (in order) are:
virtual_userforward:
domains = "partial-lsearch;/home/virtual/domain_map"
driver = forwardfile
file_transport = address_file
pipe_transport = address_pipe
no_verify
file = /home/virtual/${domain_data}/mail/.forward_${local_part}
filter
no_check_local_user
reply_transport = address_reply
qualify_preserve_domain
errors_to = root
user = mail
group = mail
modemask = 002
spamcheck_director:
# do not use this director when verifying a local-part at SMTP-time
domains =
"partial-lsearch;/home/virtual/domains_that_are_spam_scanned"
local_parts =
"lsearch;/home/virtual/${domain_data}/mail/scan_for_spam"
no_verify
# When to scan a message :
# - it isn't already flagged as spam
# - it isn't already scanned
# - it didn't originate locally (as long as I don't harbor
spammers :-))
condition = "${if and { {!def:h_X-Spam-Flag:} {!eq
{$received_protocol}{spam-scanned}} {!eq {$received_protocol}{local}} }
{1}{0}}"
driver = smartuser
transport = spamcheck
--
* Cal Evans
*
http://www.eicc.com
* We take care of your IT,
* So you can take care of your business.