Koozali.org: home of the SME Server

SMTP bounces *@localhost

Dan Brown

SMTP bounces *@localhost
« on: February 02, 2000, 05:32:23 PM »
For a variety of complex reasons, I'm trying to set up fetchmail to run on my e-smith box (which already runs as its own mail server), fetch e-mail from my ISP's mail account, and drop that into one of the e-smith accounts.  The account at the ISP is danb35, and the account on my e-smith box is dan.

For now, I've set up a .fetchmailrc file in /root, and I've included the line "user danb35 is dan".  Fetchmail connects to the ISP, downloads the mail, and tries to forward it to "dan@localhost", which then bounces as "unknown host: localhost".  If I change the line to "user danb35 is dan@danb.mine.nu", it works fine.

So, I'm left with two questions: (1) shouldn't the mail server recognize localhost as a valid hostname?  (2) is there a better way of setting this up?  Any help is appreciated.

Joseph Morrison

RE: SMTP bounces *@localhost
« Reply #1 on: February 02, 2000, 05:41:17 PM »
Hi Dan,

Which version of e-smith are you running? The latest stable version (3.1) supports fetchmail already. You should be able to make a minor change to the template:

/etc/e-smith/templates/etc/fetchmail

to achieve what you want.
Best regards,
- Joe

Dan Brown

RE: SMTP bounces *@localhost
« Reply #2 on: February 02, 2000, 05:52:40 PM »
OK, I'd seen the /etc/fetchmail file; I just wasn't sure how the system used it.  Should I just add the appropriate command line to that file (via the template)?  Is it able to reference a .fetchmailrc file somewhere?

I'm running e-smith 3.0 with the 3.0.4 RPM installed.  It has fetchmail already installed, so that's not a problem.  I'm still unsure why it's bouncing messages to "dan@localhost", though--shouldn't it recognize that as a valid host?

Thanks for the help!

Dan Brown

RE: SMTP bounces *@localhost
« Reply #3 on: February 02, 2000, 06:03:13 PM »
Oh, and one more question.  In .fetchmailrc, I seem to need to specify the interface as "ppp0/38.x.x.x" (my IP address)--it complains if I just use "ppp0".  Of course, with a PPP connection, I get a different IP address every time.  I didn't see anything in the fetchmail docs about this, but I coud have missed it.

Charlie Brady

RE: SMTP bounces *@localhost
« Reply #4 on: February 03, 2000, 01:00:15 AM »
Dan Brown wrote:

> For a variety of complex reasons, I'm trying to set up
> fetchmail to run on my e-smith box (which already runs as its
> own mail server), fetch e-mail from my ISP's mail account, and
> drop that into one of the e-smith accounts.  The account at the
> ISP is danb35, and the account on my e-smith box is dan.
>
> For now, I've set up a .fetchmailrc file in /root, and I've
> included the line "user danb35 is dan".  Fetchmail
> connects to the ISP, downloads the mail, and tries to forward
> it to "dan@localhost", which then bounces as
> "unknown host: localhost".  If I change the line to
> "user danb35 is dan@danb.mine.nu", it works fine.

Good, although I would recommend that you use the dan account for this, rather than the root account.

> So, I'm left with two questions: (1) shouldn't the mail server
> recognize localhost as a valid hostname?

No. "localhost" should, and does, resolve to an IP address, but there's no reason that the mail server should accept email which has that address. If you think about it, it's not a very useful email address to have...

> (2) is there a better way of setting this up?

You seem to have a good solution already, don't you?  You could also look at the "--domainname" option to fetchmail.

Charlie

Charlie Brady

RE: SMTP bounces *@localhost
« Reply #5 on: February 03, 2000, 01:03:25 AM »
Dan Brown wrote:

> OK, I'd seen the /etc/fetchmail file; I just wasn't sure how
> the system used it.  Should I just add the appropriate command
> line to that file (via the template)?  Is it able to reference
> a .fetchmailrc file somewhere?

The system use of fetchmail is to collect mail for a whole domain, if it is delivered into a single external POP mailbox by an ISP which supports the domain as a virtual domain. If you wish to collect addition mail for particular users in addition to that usage, then setting up additional fetchmailrc files and using cron is a good way to do that.

Charlie