I was looking over the Qmail homepage and I found that you can create a
rcpthosts file with the following shell command:

    sed 's/:.*//' <virtualdomains | cat - locals | sort >rcpthosts

by Russ Nelson. This is pretty kewl, incase you all didn't know, but one
thing was wrong. 
One: I'm ordered and sorted my virtualdomains file in a matter I like.
Two: It picked up my address: [EMAIL PROTECTED] - Not needed in rcpthosts.

So, I did a little change to it:

   sed 's/^[^@]*@//' <virtualdomains | sed 's/:.*//' \
        | cat - locals >rcpthosts
  (line wrapped due to email max line length)

This will filter out everything in front of and including the @. The only
bug I see in this one liner is that if you have multiple [EMAIL PROTECTED]
addresses, it will place multiple myhost.com lines.
It's a bug I won't mind hearing how to fix, but it won't affect how qmail
runs.

Just a little tid bit I thought I share :)

I thought you newbies might like to know..

Philip

Reply via email to