[plug] Collecting mail from a remote server

Daniel Pittman daniel at rimspace.net
Fri Dec 18 10:59:50 WST 2009


Adam Davin <byteme-its at westnet.com.au> writes:
> On Thu, 17 Dec 2009 12:44:53 +1100
> Daniel Pittman <daniel at rimspace.net> wrote:
>> Adam Davin <byteme-its at westnet.com.au> writes:
>> > On Thu, 17 Dec 2009 11:05:48 +1100
>> > Daniel Pittman <daniel at rimspace.net> wrote:
>> >> Adam Davin <byteme-its at westnet.com.au> writes:
>> >> 
>> >> > I have a couple of linux boxes I take care of that only operate
>> >> > onsite within the local lan. They have Exim as the local mail
>> >> > server which takes care of delivering all the local mail.
>
> <snip>
>  
>> > Exim is currently only set up to deliver local mail. I played
>> > around with the /etc/alias file and the /etc/email-addresses files
>> > for a while trying to get the mail to forward but Exim couldn't
>> > resolve the external addresses or something of that nature.
>> 
>> Ah.  That won't work then; the .forward files inject the email into
>> the normal outbound SMTP process.  (Though I would address the
>> problem, myself, by fixing outbound email delivery and all. :)
>> 
>> > I was not sure how difficult it was to reconfigure exim to pass on
>> > mail to an external SMTP and was more concerned that the external
>> > smtp, given the linux box has no "official" domain, might reject
>> > the mail.
>> 
>> Well, it obviously depends on the server receiving the email, but it
>> probably isn't too terrible.
>
> I have run dpkg-reconfigure exim4-config on a test box and after confirming
> a test mail sent to the ISP smtp server I got a "domain of sender does not
> exist" message or something of that nature.

*nod*  In theory, at least, you should be able to configure the box to use an
existing, valid public domain[1], which should placate the ISP and allow your
email through.

> Surprisingly the reconfigure was less painful than I had imagined :)
>
> Some more reading and I found the /etc/email-addresses is for rewriting the
> "From:" address in the email according to the local user.

That is an Exim specific feature, and I don't know a lot about it.  The manual
says that you are correct, though, and it looks like you can use it to map
Unix users to (as they comment) ISP email addresses.

> /etc/aliases is for rewriting the "To:" address according to the local
> users. The ~/.forward file has the same function as the /etc/aliases file
> but on a local user level instead of system.

Correct, indeed.

> So, hopefully now I am doing it the time honoured "Right Way (tm)" :)

Heh.  Well, that is more or less what is considered right by people who grew
up in the time of the dinosaurs ^W^W KREMVAX and all. :)

More seriously, I hope that makes life a bit easier: now you don't have to
rely on polling hacks or anything like that, and can use the standard and well
tested SMTP stuff to do this.

        Daniel

Footnotes: 
[1]  ...possibly, for example, one from a service like dyndns, who will set up
     the MX records and everything to your dynamic address for little or no cost.

-- 
✣ Daniel Pittman            ✉ daniel at rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons



More information about the plug mailing list