I've attatched my config file, as well as the -d9 output from sending
myself a message with
/usr/lib/sendmail -d9 chrish@??? > & fool
The message was something like:
From: joe schmoe
To: bill nye
Subject: fool
This is a message
The problem apparently lies in the the bit that goes like this:
domain_director director skipped: domain mismatch
mlists director skipped: domain mismatch
stripped suffix -junk
dashed_forward director skipped: previously directed chrish@???
calling standard_forward director
What I don't understand is why my suffix is being "stripped". Because
once it has been "stripped", then the chrish@??? has
indeed already been processed by my filter file. However, if the suffix
hadn't been stripped, then it should call the new filter file with the
chrish-junk@justin address, and things should be fine.
Ideas?
-Chris
On Fri, 29 Aug 1997, Philip Hazel wrote:
> As you didn't attach your Exim configuration, I don't know what those
> are. To do what you want, they should include one that recognizes the
> "junk" suffix.
>
> I suggest you try running a delivery (or a -bt call) with the -d9 option
> set. This will produce lots of debugging output, which should tell you
> (or me if you send it to me) which directors are handling the addresses
> and in what order. That should make it possible to follow what is going
> on.
Debug level set to 9
set_process_info: 664 1.62 accepting a local non-SMTP message from <root@???>
Sender: root@???
Recipients:
chrish@???
search_tidyup called
>>Original headers:
From: joe schmoe
To: bill bye
Subject: net
Rewriting rules exist
search_open (6) NULL
database lookup required for select eusers.nickname from eusers, accounts where eusers.user_id = accounts.user_id and accounts.address = 'root@???' and eusers.nickname is not null
search_open (6) NULL
database lookup required for select eusers.usfullname from eusers, accounts where eusers.user_id = accounts.user_id and accounts.address = 'root@???'
rewrite_one_header: type=F:
From: joe schmoe
rewrite_one_header: type=T:
To: bill bye
search_tidyup called
>>Final headers:
P Received: from root by justin.lakeside.sea.wa.us with local (Exim 1.62 #7)
id 0x4ZcX-0000Ai-00; Fri, 29 Aug 1997 15:34:36 -0700
F From: joe schmoe
T To: bill bye
Subject: net
I Message-Id: <E0x4ZcX-0000Ai-00@???>
S Sender: root <root@???>
Date: Fri, 29 Aug 1997 15:34:36 -0700
Data file written for message 0x4ZcX-0000Ai-00
Writing spool header file
LOG: 0 MAIN
<= root@??? U=root P=local S=490 T="net"
fork /usr/local/mail/exim/bin/exim -d9 -Mc 0x4ZcX-0000Ai-00
Debug level set to 9
set_process_info: 668 1.62 delivering specified messages
delivering message 0x4ZcX-0000Ai-00
set_process_info: 668 1.62 delivering 0x4ZcX-0000Ai-00
Opened spool file 0x4ZcX-0000Ai-00-H
user=root uid=0 gid=0 sender=root@???
sender_local=1 resent=no
Non-recipients:
Empty Tree
---- End of tree ----
recipients_count=1
Delivery address list:
chrish@???
opened DB file /var/spool/exim/db/retry: flags=0 fd = 6
locked
unique=chrish@???
chrish@???: queued for directing
directing chrish@???
calling global_aliases director
global_aliases director: file = /usr/local/mail/exim/alias/global search type = 48
file=/usr/local/mail/exim/alias/global query=chrish
search_open (0) /usr/local/mail/exim/alias/global
file lookup required for chrish in /usr/local/mail/exim/alias/global
global_aliases director failed for chrish:
mlists_aliases director skipped: domain mismatch
domain_aliases director skipped: domain mismatch
calling justin_aliases director
justin_aliases director: file = /usr/local/mail/exim/alias/justin search type = 48
file=/usr/local/mail/exim/alias/justin query=chrish
search_open (0) /usr/local/mail/exim/alias/justin
file lookup required for chrish in /usr/local/mail/exim/alias/justin
justin_aliases director failed for chrish:
ls_mlists director skipped: domain mismatch
ls_mlists2 director skipped: domain mismatch
domain_director director skipped: domain mismatch
mlists director skipped: domain mismatch
calling dashed_forward director
dashed_forward director: file = .forward
dashed_forward director euid=1000 egid=1000
successful stat of /home/c/chrish
dashed_forward director restored euid=41 egid=65534
dashed_forward director generated chrish-junk@???
dashed_forward director succeeded for chrish
transport: <none>
opened DB file /var/spool/exim/db/retry: flags=0 fd = 8
locked
unique=chrish-junk@???
chrish-junk@???: queued for directing
directing chrish-junk@???
calling global_aliases director
global_aliases director: file = /usr/local/mail/exim/alias/global search type = 48
file=/usr/local/mail/exim/alias/global query=chrish-junk
search_open found (0) /usr/local/mail/exim/alias/global cached
file lookup required for chrish-junk in /usr/local/mail/exim/alias/global
global_aliases director failed for chrish-junk:
mlists_aliases director skipped: domain mismatch
domain_aliases director skipped: domain mismatch
calling justin_aliases director
justin_aliases director: file = /usr/local/mail/exim/alias/justin search type = 48
file=/usr/local/mail/exim/alias/justin query=chrish-junk
search_open found (0) /usr/local/mail/exim/alias/justin cached
file lookup required for chrish-junk in /usr/local/mail/exim/alias/justin
justin_aliases director failed for chrish-junk:
ls_mlists director skipped: domain mismatch
ls_mlists2 director skipped: domain mismatch
domain_director director skipped: domain mismatch
mlists director skipped: domain mismatch
stripped suffix -junk
dashed_forward director skipped: previously directed chrish@???
calling standard_forward director
standard_forward director: file = .forward
standard_forward director euid=1000 egid=1000
successful stat of /home/c/chrish
standard_forward director restored euid=41 egid=65534
dashed_procmail director skipped: suffix mismatch
calling standard_procmail director
standard_procmail director failed: file existence failure
dashed_tmail director skipped: suffix mismatch
calling standard_tmail director
standard_tmail director succeeded for chrish
transport: standard_tmail_pipe
After directing:
Local addresses:
chrish-junk@???
Remote addresses:
Failed addresses:
Addresses to be routed:
Deferred addresses:
search_tidyup called
>>> Local deliveries >>>
opened DB file /var/spool/exim/db/retry: flags=0 fd = 7
locked
delivering chrish-junk@??? as chrish using standard_tmail_pipe:
uid=41 gid=41 home=/home/c/chrish current=/home/c/chrish
Local delivery process 669 uid=41 gid=41
set_process_info: 669 1.62 delivering 0x4ZcX-0000Ai-00 to chrish using standard_tmail_pipe
standard_tmail_pipe transport entered
pipe command:
argv[0] = /usr/local/mail/bin/tmail
argv[1] = ${local_part}
pipe command after expansion:
argv[0] = /usr/local/mail/bin/tmail
argv[1] = chrish
Writing message to pipe
writing data block: timeout=0
writing data block: timeout=0
writing data block: timeout=0
writing data block: timeout=0
writing data block: timeout=0
writing data block: timeout=0
writing data block: timeout=0
writing data block: timeout=0
set_process_info: 671 1.62 reading output from /usr/local/mail/bin/tmail ${local_part}
standard_tmail_pipe transport yielded 0
standard_tmail_pipe transport returned OK
post-process chrish-junk@???
chrish-junk@??? succeeded: adding to nonrecipients list
LOG: 0 MAIN
=> chrish <chrish@???> D=standard_tmail T=standard_tmail_pipe
search_tidyup called
>>> Remote deliveries >>>
tidying up after delivering 0x4ZcX-0000Ai-00
set_process_info: 668 1.62 tidying up after delivering 0x4ZcX-0000Ai-00
Processing retry items
Succeeded addresses:
chrish-junk@???: no retry items
chrish@???: no retry items
chrish@???: no retry items
Failed addresses:
Deferred addresses:
end of retry processing
LOG: 0 MAIN
Completed
end delivery of 0x4ZcX-0000Ai-00
# configure
# Main exim runtime configuration file
# started by:
# /usr/local/mail/exim/bin -bd -q30m
# by Chris Harris
# modified: June 10, 1997
######################################################################
# Runtime configuration file for Exim #
######################################################################
# This is a default configuration file which will operate correctly in
# uncomplicated installations. Please see the manual for a complete list
# of all the runtime configuration options.
# This file is divided into several parts, all but the last of which are
# terminated by a line containing the word "end". The parts must appear
# in the correct order, and all must be present (even if some of them are
# in fact empty). Blank lines, and lines starting with # are ignored.
######################################################################
# MAIN CONFIGURATION SETTINGS #
######################################################################
# Specify your host's canonical name here. If this option is not set, the
# uname() function is called to obtain the name.
# primary_hostname = justin.lakeside.sea.wa.us
# Specify the domain you want to be added to all unqualified addresses
# here. If this option is not set, the primary_hostname value is used.
# qualify_domain =
# If you want unqualified recipient addresses to be qualified with a different
# domain to unqualified sender addresses, specify the recipient domain here.
# If this option is not set, the qualify_domain value is used.
# qualify_recipient =
# Specify your local domains as a colon-separated list here. If this option
# is not set (i.e. not mentioned in the configuration file), the
# qualify_recipient value is used as the only local domain. If you do not want
# to do any local deliveries, uncomment the following line, but do not supply
# any data for it. This sets local_domains to an empty string, which is not
# the same as not mentioning it at all. An empty string specifies that there
# are no local domains; not setting it at all causes the default value (the
# setting of qualify_recipient) to be used.
local_domains = justin.lakeside.sea.wa.us:mlists.lakeside.sea.wa.us:lakeside.sea.wa.us:simba.lakeside.sea.wa.us
# No local deliveries will ever be run under the uids of these users (a colon-
# separated list). Note the default setting means you cannot deliver mail
# addressed to root as if it were a normal user. (This isn't usually a problem,
# as most sites have an alias for root that redirects such mail to a human
# administrator.)
never_users = root:daemon
# If you want Exim to support the "percent hack" for all your local domains,
# uncomment the following line. This is the feature by which mail addressed
# to x%y@z (where z is one of your local domains) is locally rerouted to
# x@y and sent on. Otherwise x%y is treated as an ordinary local part.
# percent_hack_domains=*
# If you are running Exim under its own uid (recommended), then you should
# set up that uid as a trusted user by de-commenting the following and
# changing the name if necessary.
trusted_users = root:exim:mlists:colinc:chrish:abarker
# exim_user and exim_group determine what exim runs under, instead of root,
# when it can
exim_user = exim
exim_group = nogroup
# locally_caseless says whether or not CHRISH and chrish are the same.
# chris has set this to false, because this is safer than setting it
# to the default, true. (If it is true, then we never have the option
# of switching it to false without breaking something. The reverse,
# however, is not true.)
locally_caseless = true
# log_subject logs the subject of each message in the log file. This
# should probably be turned off some day, but Chris think it'd be
# interesting to browse through subjects once we get the domain-wide
# thing on here setup.
log_subject = true
# When a message is delayed, Exim sends a warning message to the sender at
# intervals specified by this option. If it is set to a zero amount of time,
# no warnings are sent.
# This is set to 0, because Chris thinks delay warnings are stupid.
delay_warning = 0s
# don't accept mail from folks we can't verify
# note: I think verify here only checks host names. But that's better
# than no checking at all.
sender_verify = true
sender_verify_reject = true
# always_bcc
# this is not necesary except for mlist dists
#always_bcc = true
end
######################################################################
# TRANPORTS CONFIGURATION #
######################################################################
# this transport (will deliver) delivers mail to Chris' lookup program,
# which sends it to the right address according to the mail DB.
domain_pipe:
driver = pipe;
command = /usr/local/mail/bin/deliver-domain ${local_part},
user = exim,
return_fail_output
# the following is a procmail driver that we will use.
# The second one is for things with a suffix. (or maybe always use the
# 2nd one -- I think so.)
standard_procmail_pipe:
driver = pipe;
command = "/usr/local/bin/procmail -d ${local_part}",
from_hack,
user = exim
dashed_procmail_pipe:
driver = pipe;
command = "/usr/local/bin/procmail -a ${local_part_suffix} -d ${local_part}",
from_hack,
user = exim,
return_fail_output
# here are the tmail transports
dashed_tmail_pipe:
driver = pipe;
command = "/usr/local/mail/bin/tmail ${local_part}+${substr_1_1000:$local_part_suffix}",
user = exim
standard_tmail_pipe:
driver = pipe;
command = "/usr/local/mail/bin/tmail ${local_part}",
user = exim
local_delivery:
driver = appendfile;
file = /home/${local_part}/Mailbox
# mlist stuff
mlists_pipe:
driver = pipe;
command = /usr/local/mail/exim/bin2/exim -f ${return_path} ${local_part}@???,
user = exim,
# we'll let it add its own prefix
prefix = ""
# This transport is used for handling pipe addresses generated by alias
# or .forward files. It has a conventional name, since it is not actually
# mentioned elsewhere in this configuration file.
address_pipe:
driver = pipe;
return_output
# This transport is used for handling file addresses generated by alias
# or .forward files. It has a conventional name, since it is not actually
# mentioned elsewhere in this configuration file.
address_file:
driver = appendfile
# This transport is used for handling autoreplies generated by the filtering
# option of the forwardfile director. It has a conventional name, since it
# is not actually mentioned elsewhere in this configuration file.
address_reply:
driver = autoreply
# This transport is used for delivering messages over SMTP connections.
remote_smtp:
driver = smtp;
end
######################################################################
# DIRECTORS CONFIGURATION #
######################################################################
# take care of aliases
global_aliases:
driver = aliasfile;
file = /usr/local/mail/exim/alias/global
search_type = lsearch
mlists_aliases:
domains = mlists.lakeside.sea.wa.us,
driver = aliasfile;
file = /usr/local/mail/exim/alias/mlists,
search_type = lsearch
domain_aliases:
domains = lakeside.sea.wa.us,
driver = aliasfile;
file = /usr/local/mail/exim/alias/domain,
search_type = lsearch
justin_aliases:
domains = justin.lakeside.sea.wa.us,
driver = aliasfile;
file = /usr/local/mail/exim/alias/justin,
search_type = lsearch
# handle @lakeside mail
ls_mlists:
domains = lakeside.sea.wa.us,
driver = smartuser,
require_files = /usr/local/mail/mlists/${local_part},
transport = mlists_pipe
ls_mlists2:
domains = lakeside.sea.wa.us,
driver = smartuser,
suffix = -request
require_files = /usr/local/mail/mlists/${local_part},
transport = mlists_pipe
domain_director:
domains = lakeside.sea.wa.us,
driver = smartuser,
transport = domain_pipe
# handle @mlists mail
mlists:
domains = mlists.lakeside.sea.wa.us,
driver = smartuser,
transport = mlists_pipe
# handle @justin mail in a complicated, flexible, Chris-like way.
# Note that this could stand a bit of improvement for people like
# Chris who would like spam filtering applied to all of their mail
# before it is sent anywhere. But that might not be too hard
# with the correct .forward file.
# if ${local_part} has a dash
# if there is an approcpiate .forward-bla file, use it
# if there is a standard .forward, use it.
# if there is a .procmailrc, use it.
# if ${local_part} has a dash
# pass the address along to tmail with the dash exchanged for a plus
# fire the boring and bland addresses off to tmail
# This director handles user-anything in a qmail-like way.
dashed_forward:
domains = justin.lakeside.sea.wa.us,
suffix = -*,
suffix_optional,
driver = forwardfile;
file = .forward${local_part_suffix},
filter
# If that fails, this director will pass user-anything into the standard
# .forward file, which can then deal with it as it likes
standard_forward:
domains = justin.lakeside.sea.wa.us,
suffix = -*,
suffix_optional,
driver = forwardfile;
file = .forward,
filter
dashed_procmail:
domains = justin.lakeside.sea.wa.us,
suffix = -*,
driver = localuser,
transport = dashed_procmail_pipe,
require_files = "${home}/.procmailrc";
standard_procmail:
domains = justin.lakeside.sea.wa.us,
driver = localuser,
transport = standard_procmail_pipe,
require_files = "${home}/.procmailrc";
dashed_tmail:
domains = justin.lakeside.sea.wa.us,
suffix = -*,
driver = localuser,
transport = dashed_tmail_pipe;
standard_tmail:
domains = justin.lakeside.sea.wa.us,
driver = localuser,
transport = standard_tmail_pipe;
end
######################################################################
# ROUTERS CONFIGURATION #
######################################################################
# This router routes to remote hosts over SMTP using a DNS lookup with
# default options.
lookuphost:
driver = lookuphost,
transport = remote_smtp;
# This router routes to remote hosts over SMTP by explicit IP address,
# given as a "domain literal" in the form [nnn.nnn.nnn.nnn]. The RFCs
# require this facility, which is why it is enabled by default in Exim.
# If you want to lock it out, set forbid_domain_literals in the main
# configuration section above.
literal:
driver = ipliteral,
transport = remote_smtp;
end
######################################################################
# RETRY CONFIGURATION #
######################################################################
# This single retry rule applies to all domains and all errors. It specifies
# retries every 15 minutes for 2 hours, then increasing retry intervals,
# starting at 2 hours and increasing each time by a factor of 1.5, up to 16
# hours, then retries every 8 hours until 4 days have passed since the first
# failed delivery.
# Domain Error Retries
# ------ ----- -------
*.lakeside.sea.wa.us * F,5d,15m
* * F,2h,15m; G,16h,2h,1.5; F,4d,8h
end
######################################################################
# REWRITE CONFIGURATION #
######################################################################
# the maroon hack -- change all NT names to say "maroon", and lc.
# because maroon is too brain-dead to understand something like
# this.
^(.*)@(bigedith|us|lsnet|library|maroon)\.lakeside\.sea\.wa\.us$ \
${lc:$1}@??? fFTt
# the simba hack -- send all mail bound for simba to people's other
# accounts.
*@simba.lakeside.sea.wa.us \
"${lookup pgsql {select selector from eusers, accounts where eusers.user_id = accounts.user_id and accounts.address = '$1@???'} \
{$value} fail}" T
# DON'T ENABLE THIS UNLESS YOU ARE CHRIS
# the morris hack -- send all mail bound for simba to people's other
# accounts.
#*@morris.lakeside.sea.wa.us \
# "${lookup pgsql {select selector from eusers, accounts where eusers.user_id = accounts.user_id and accounts.address = '$1@???'} \
# {$value} fail}" T
# put in the "correct" human-readable name for justin addresses
# note: this is broken -- later rewriting lines are overriding this somehow
*@justin.lakeside.sea.wa.us \
"${lookup pgsql {select eusers.capfullname from eusers, accounts where eusers.user_id = accounts.user_id and accounts.address = '$1@???'} \
{$value} fail} <$1@???>" fw
# try nickname rewriting
*@* \
"${lookup pgsql {select eusers.nickname from eusers, accounts where eusers.user_id = accounts.user_id and accounts.address = '$1@$2' and eusers.nickname is not null} \
{$value@???} fail}" fF
# try first_last rewriting
*@* \
"${lookup pgsql {select eusers.usfullname from eusers, accounts where eusers.user_id = accounts.user_id and accounts.address = '$1@$2'} \
{$value@???} fail}" fF
# End of Exim configuration file