fetchmail-friends
[Top] [All Lists]

Re: [fetchmail]Fetchmail newbie

2004-06-27 04:42:04
On Sun, Jun 27, 2004 at 04:50:58PM +0545, Bikrant Neupane wrote:
Yes there is, but it's probably not what you want. fetchmail opens an SMTP
connection to your local sendmail daemon and uses
  MAIL FROM:<..whatever..>
  RCPT TO:<root(_at_)localhost>
to deliver to root's mailbox. If it did
  MAIL FROM:<..whatever..>
  RCPT TO:<you(_at_)yourdomain(_dot_)com>

where you(_at_)yourdomain(_dot_)com is the original recipient, then in most 
cases
sendmail will simply open a connection to your external mailserver (where
the POP3 message came from) and re-deliver it there.

That's unless you implement some dangerous hacks so that your local machine
believes that yourdomain.com is local, when clearly it isn't, because the
MX records for yourdomain.com point to a remote machine.
Well you are right. It can create mail loop. But I will be adding the domain 
as local thus the mails will be delivered locally in the machine where 
fetchmail is running however the MX is still the one from where the fetchmail 
retrives mail. 

This is what i want to do...
domain name: xyz.com

In the main MX server all the mails for @xyz.com will be delivered to user A
Fetchmail fetches the mail for user A from the MX server using pop3.
Then the mails will be delivered to sendmail running in local machine.
My making entries in /etc/mail/virtusertable I will then route mails to 
different mailboxes in the local machine.

Then you need multi-drop mode. This is voodoo which, if you can't work out
how to do it yourself and fix all the problems which can occur, then you are
not allowed to use it :-)

However, there's an example in man fetchmailrc which you can use as a
starting point:

         poll pop.provider.net localdomains loonytoons.org toons.org:
               user maildrop with pass secret1 to * here

(this is in the manpage for fetchmail 6.2.5; I suggest you upgrade first so
that if you find any problems you're more likely to be running the same
version as other people)

Good luck.

Brian.