Sendmail/Fetchmail Combo Bcc mail all coming to root


I've got mail coming into a POP3 isp box.

Fetchmail is getting it.  and squirting it all at port 25 sendmail is then handling the delivery.

All bcc mail is coming to root (me!)

How can I get sendmail to parse the header and extract the line that says

'Received: from [] (
     by with esmtp (Exim 3.34 #1)
     id 17YzaJ-0007Ti-00
     for; Sun, 28 Jul 2002 18:44:32 -0700'

and suck out the correct alias which is jae.tan and deliver the BCC'd picture of little cats, daft jokes etc to her!



Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

vsamtaniConnect With a Mentor Commented:
If you don't have dns correctly configured, you need to tell fetchmail which servers handle mail for you. Normally, fetchmail will use dns to find out that is an MX server for your domain, and then it will read the rest of the Received header from that server. Only then will it pay any attention to the address.

So, either make sure that you can do dns queries from the box that fetchmail is running on, or explicitly tell fetchmail about your mx server by using the aka directive.

You need to tell fetchmail that it is processing mail for the domain "", and not just the particular machine you are running it on. It will then be able to use the name part of addresses like

So you need something like:

poll your.mailbox.server.tld localdomains
  user bendecko password secret to * here

(ie, just add the "localdomains" to the server definition of your mailbox server)

bendeckoAuthor Commented:

thanks for the help this is roots .fetchmailrc file

# Configuration created Sat Jul 20 01:13:15 2002 by fetchmailconf
set syslog
set postmaster "postmaster"
set bouncemail
set no spambounce
set properties ""
poll localdomains
       user 'bendecko' with password 'secret' to * here

What is wrong with that?

In the header of the message I get

'X-Fetchmail-Warning: no recipient addresses matched declared local names'

Even tho '

for; Mon, 29 Jul 2002 18:50:46 -0700

is in the same header.

any ideas?


Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

You could also try adding an


to your server definition. Fetchmail ought not to need this, because is the MX server for your domain, but it's worth a try to see if it makes a difference.

I presume you do have a local user called jae.tan?

bendeckoAuthor Commented:
yeah i have jae.tan

i've not added the line for aka ets yet cos i spotted this :-

--------------------- sendmail Begin ------------------------

340 bytes transferred
1 messages sent

**Unmatched Entries**

unable to qualify my own domain name (klang) -- using short name
g6UDbna24731: g74ECHb26392: sender notify: Cannot send message for 5 days

 ---------------------- sendmail End -------------------------

maybe thats whats causing it?

i've not got proper DNS setup eg zone file blah blah yet cos we were on dial-up and now adsl.

bendeckoAuthor Commented:
brilliant.  that works a treat.

well done

All Courses

From novice to tech pro — start learning today.