[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: exim+fetchmail



"Marcelo Chiapparini" <chiappa@centroin.com.br> writes:

> modem. I want to use exim+fetchmail+mutt. So far I have some questions,

I am using almost (my mailreader is Gnus) the same configuration with
two ISPs too.

> 1) I have two ISP providers. I choose one of them when I establish
> the dial-up connection. But in the exim's configuration file there
> is room for only one ISP. If I want to change the ISP should I have
> to edit the exim's config file?  is there a way exim stores the
> information for several ISPs and, at dial-up time, inform to exim to
> what ISP I am connecting to?

Receiving mail with fetchmail is no problem at all, independently of
the ISP you are connected to.  Just enter both mailservers (or the one
you are using) in fetchmailconf.

Sending mail with several ISPs is more of a challenge.  Most SMTP
servers (smarthosts) only accept mails when you are connected by their
ISP.

I have solved the problem in this way:

First I edited the "Routers Configuration" part /etc/exim.conf (be
sure that it works with _one_ provider before you try this) so that it
is now:

<snippet>
smarthost:
  driver = domainlist
  transport = remote_smtp
  route_file = /etc/smarthost
  search_type = lsearch*
end
</snippet>

Now exim will look in the file /etc/smarthost for the SMTP server it
should use.  This is a symbolic link to one of my ISP-specific files
that contain only one line which looks like this:

<file "/etc/smarthost.addcom">
* smtp.addcom.de bydns_a
</file>

Now the only problem is to create the correct symlink on dialup.  I
have solved this with a small script called
/etc/ppp/ip-up.d/0smarthost (the 0 means that it will be executed
befor exim).  My version looks like this:

<file "/etc/ppp/ip-up.d/0smarthost">
#!/bin/sh
case $PPP_IPPARAM in
  provider|addcom-auto)
    ln -sf /etc/smarthost.addcom /etc/smarthost
    ;;
  ngi)
    ln -sf /etc/smarthost.ngi /etc/smarthost
    ;;
esac
</file>

> 2) When fetchmail retrieves the email from the ISP to my machine, is
> exim who delivers them to my /var/spool/mail/account file?

I'm not sure but AFAIK after getting the mail fetchmail sends it to
some port where exim takes it over and puts it into /var/mail/

> 3) is exim automatically called when I establish the dial-up
> connection?

This seems to be the standard configuration in Debian.  Look at the
contents of /etc/ppp/ip-up.d/ (all the scripts in this directory are
executed on dialup).  There should be a file called `exim'.

> 4) why the MUAs programs (for example balsa or xfmail) don't need a
> MTA for retrieve the messages from the ISP (at last with pop3) but
> they need a MTA for sending the emails (via smtp)?

Maybe their authors didn't have enough time... ;-)

Greetings,
Christoph



Reply to: