Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 May 2001 23:18:23 -0700
From:      William Richard <wdr@tdl.com>
To:        david@banning.com, questions@FreeBSD.ORG
Subject:   Re: procmail newbie question
Message-ID:  <01051723182302.18315@saffron>
In-Reply-To: <200105172321.f4HNLWM30134@d.tracker>
References:  <200105172321.f4HNLWM30134@d.tracker>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 17 May 2001 16:21, David Banning wrote:
> My ISP holds my mailbox and I have a dialup connection
> to the net.
>
> The mail sent has the same domain but all different sorts of
> address names eg. david@skytrackercanada.com, john@skytrackercanada.com,
> sales@skytrackercanada.com but they all go to one mailbox,
> which is david@skytrackercanada.com
>
> I would like to load these to my machine with fetchmail or popclient,
> and then separate them with procmail.

I will assume that you have three separate POP accounts on the machine that 
handles mail for skytrackercanada.com.  I will also assume that the names of 
those accounts are (david|john|sales)%skytrackercanada.com.  I will further 
assume that you have an account on your FreeBSD machine, called "david", to 
whom you want e-mail for all these accounts delivered.

Try this in your .fetchmailrc:

poll pop3.mypophost.com protocol POP3 username david%skytrackercanada.com 
password mysekritpasswd is david<CR>
poll pop3.mypophost.com protocol POP3 username john%skytrackercanada.com 
password johnssekritpasswd is david<CR>
poll pop3.mypophost.com protocol POP3 username sales%skytrackercanada.com 
password salessekritpasswd is david<CR>

Now, there are other documents elsewhere on the Internet saying how to get 
procmail procing your mail, and on how to write a procmail rule.  Essentially 
you'll split them up using the TO_: macro and put them in separate mbox files.

> By default all mail loaded through pop goes to the /var/mail/$USER
> of the person who did the pop. I can tell popclient to send it elsewhere,
> but where?  Where does procmail want it?

You have to pipe it to procmail.  Sendmail will pipe it if you put a .forward 
file in ~david:

"|exec /usr/local/bin/fetchmail"

But I prefer to have Sendmail use FEATURE(local_procmail) in the .mc file.  
Then Sendmail will use procmail instead of mail.local to deliver mail on the 
local machine (while mail.local will just dump it into /var/user/$USER).  If 
there is no .procmailrc, procmail will still DTRT and deliver to /var/mail.

-- 
William Richard, Supervising Consultant
William Richard & Associates Ltd -- The BSD Experts
Tel: 925-480-2319 x1951
E-Mail: wdr@tdl.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01051723182302.18315>