Re: [Exim] Two questions (related)

Etusivu
Poista viesti
Vastaa
Lähettäjä: Jim Knoble
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [Exim] Two questions (related)
Circa 2001-Apr-05 18:08:59 +0200 dixit Gary Jones:

: I have two questions, but first a bit of system background info. I am
: on an intermittent dialup, using POP3 (fectmail) to collect mail. I
: rewrite the outgoing From using a reqrite rule to lookup the user and
: associate it with X@remotedomain. Thanks to the MAPS DUL I'm pretty
: much forced to use a smarthost which requires me to do a POP3 check
: to verify who I am before I actually send any email.

[...]

: Secondly, is there a way for exim to force a fetchmail (or some other
: POP3) connection before it tries to send mail?

There are two ways that i can think of to accomplish this:

  (1) Use a cron job to send queued outgoing mail.  Run fetchmail
      before starting the queue run (using 'exim -q').  You'll probably
      want to use some sort of magic (e.g., touching or removing a
      file, and then checking for the file in the cron job) to enable
      or disable the fetchmail when your dialup link goes up or down,
      respectively.


  (2) Find out how long it takes for your POP check to "disappear" (for
      example, with my ISP, i can do SMTP for up to 10 or 15 minutes
      after a successful POP3 authentication).  Setup fetchmail to
      check for mail about that often.  When your dialup link comes up,
      do a fetchmail check and then a queue run ('exim -q') to deliver
      queued outgoing mail.


In both cases, the following apply:

  - You don't actually have to retrieve mail with every fetchmail run
    (especially if your SMTP-after-POP window is short); 'fetchmail -c'
    will check for mail without retrieving it.


  - You can use exim's 'queue_only_file' directive to avoid attempting
    to deliver remote mail when your dialup link is down.  You can run
    an exim daemon process ('exim -bd') to deliver local mail
    immediately.


Good luck.

--
jim knoble | jmknoble@??? | http://www.jmknoble.cx/