# Special mail setup...  Any help appreciated!

## firekite

Hey, guys.  This topic has been hashed over before, but nothing *directly* speaks to what I'm looking to do.  It's frustrating, because it seems like it should be so simple, and yet I feel helpless to actually get it done.

Concept: retrieve multiple external POP3 addresses (1 is my ISP's, 3 other hosted remotedly for my domain name), serve that retrieved email via webmail (IMAP and SquirrelMail).

The main problem I'm having is that I have yet to figure out how to retrieve the messages from multiple external email addresses, most likely via fetchmail (so I'm told).  Perhaps this is insanely simple, and it's just due to my unfamiliarity with the Unix mail system, I don't know.  But *any* help and/or suggestions would be greatly appreciated! :)

Thanks!

----------

## Larde

I think that setup isn't special at all - I guess most of us have a similar setup.  :Smile:  If really this  *Quote:*   

> I have yet to figure out how to retrieve the messages from multiple external email addresses

 is your main problem, then don't worry: simply stick multiple poll statements in your .fetchmailrc, as in

```
poll pop.puretec.de with protocol POP3, with options uidl

        user "myuser1" there with password "mypass1" is myuser@localhost here

        with options nokeep mimedecode pass8bits

poll pop.puretec.de with protocol POP3, with options uidl

        user "myuser2" there with password "mypass2" is myuser@localhost here

                with options nokeep mimedecode pass8bits

poll pop.gmx.de with protocol POP3, with options uidl

        user "myuser3" there with password "mypass3" is myuser@localhost here

                with options nokeep mimedecode pass8bits
```

etc. Just create a .fetchmailrc similar to that (the manpage will guide you further), and fire up fetchmail. It should poll one account after the other and try to stick it in you locally running MTA. That means, you should have decided and installed already something like qmail, postfix, exim, whatever you find easiest to set up.

Hth,

Larde.

----------

## firekite

Yes, but wouldn't that mean I'd need to create a new linux user for every different email address?  Heh, I wish there were a little more thorough guide somewhere for those of us who aren't new to computing/networking, but *are* still pretty new to linux :\

----------

## Larde

 *Quote:*   

> but wouldn't that mean I'd need to create a new linux user for every different email address?

 

No, it wouldn't. Why do you think so? You can have all the pop3 sources you want to poll in one .fetchmailrc of your user, and the "is myuser@localhost" statement of my example can all point to the very same user. I actually have 5 pop3 sources, and my example was just an edited cut'n'paste from my own .fetchmailrc. 

I think I've seen some Howto's for mail setup over in Tips & Tricks section, you should search for mail there. It just seems hard in the beginning, you'll get into it.  :Smile: 

Larde.

----------

## firekite

Thanks :)

----------

## firekite

 *Larde wrote:*   

> 
> 
> ```
> poll pop.puretec.de with protocol POP3, with options uidl
> 
> ...

 

Quick question on this setup:

Does this mean that if I have an email address of "foo@bar.com" out there being hosted for me, and I deliver it to "myuser@localhost", does it still know that it's really foo@bar.com and not myuser@localhost whenever I'm actually sending and receiving email?  Specifically, if I have foo2@bar.com in addition to foo@bar.com, will they both be recognized as seperate email addresses and replies sent out as such?

The way I have it set up right now, I'm using Outlook2002 to receive messages through multiple email accounts.  If someone emails me at foo2@bar.com, and I hit Reply, it replies through foo2@bar.com.  My concern is that when I set up fetchmail to pull in the mail and deliver it to myuser@localhost, reading the mail through SquirrelMail will not accurately reply using foo2@bar.com, instead replying as myuser@localhost.  Am I crazy?  Am I just overanalyzing it?

----------

## firekite

Anyone?

----------

## Larde

Hi!

 *Quote:*   

> Does this mean that if I have an email address of "foo@bar.com" out there being hosted for me, and I deliver it to "myuser@localhost", does it still know that it's really foo@bar.com and not myuser@localhost whenever I'm actually sending and receiving email?

 

I try to jump in again.  :Smile: 

Well, fetchmail really is just for getting mails somewhere and deliver it to a local user. What adress you use to send out mail is up to you, fetchmail has nothing to do with it. You can send out mails from your local user with any "From:" you want, just configure your mail program to do so. 

Ah, and when fetchmail collects mails from different sources and delivers it locally to one user, you will still see the original "To:" the mail was sent to, so you can set up your mail client to use that address automatically when you reply to a mail or sort incoming mails in different mailfolders depending on the original "To:". Well, at least this is what I do using evolution.  :Smile: 

Hth,

Larde.

----------

## firekite

I think it's safe to say that mail is one of the most flexible and still most cryptic/complicated (unnecessarily so) points of Linux.

----------

## jukka

have you already tried getmail? compared to fetchmail it's easier (in my opinion...) to configure, and it can deliver mail directly to mbox and maildir files.

 *firekite wrote:*   

> I think it's safe to say that mail is one of the most flexible and still most cryptic/complicated (unnecessarily so) points of Linux.

 

if you read the docs it's not complicated at all. have you ever tried to set up a RFC-whatever conforming mailserver (smtp, imap, pop3, ...) on a windows "system"? that's what i call cryptic/complicated...

----------

