LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   sendmail/fetchmail confused (https://www.linuxquestions.org/questions/linux-newbie-8/sendmail-fetchmail-confused-64236/)

mazzo 06-07-2003 01:26 PM

sendmail/fetchmail confused
 
Hi

Although not a complete newbie, I am struggling.

I have set up an RH9 server to provide web and mail access to windows pc's.

I am using squid - which is working fine.
I am using fetchmail - which is collecting the mail from one pop box for distribution to local imap boxes.
I am using sendmail as the mta.

Problem:

I have tried to get the server to recognise who it is - but am failing. I think this is causing fetchmail and/or sendmail to fail.

I am on a fixed IP - have set /etc/sysconfig/network to include hostname as "server" (before that it thought it was the name assigned by my isp)

I have local_host_names configured with the domain names that we use, along with all the aliases etc (for sendmail)

BUT: mail sent on the server in any account (using pine) works fine. It is put into the correct mailboxes. Mail collected by fetchmail does not get sorted and goes to the mail admin account - every time.

If I do a uname -n my box thinks it is server.companyname.com.
It might be the "server." bit that is causing the problem. I've been banging my head on this one for nearly 3 days and don't seem to be moving on.

Any help (or further questions) would be VERY much appreciated.

Thanks

acid_kewpie 06-07-2003 01:50 PM

well what's your fetchmail config? it should have something like "user CooLl337d00D is steve here" which should sort it fine.

mazzo 06-07-2003 01:55 PM

Thanks for the reply.

My .fetchmailrc says

user foo there with password xxxx is mail

That is the only line with usernames in it. I also have the aka bit for the domain names of mail collected.

I had this up and running on an RH7.1 and it was the same script - only it worked then !

I've forgotten to do something - but I can't remember what !!!!

acid_kewpie 06-07-2003 02:09 PM

well if it says the local user is "mail" then i'd guess that it will be being routed via the /etc/aliases file to whomever gets mail's mail...

mazzo 06-07-2003 03:56 PM

Yes - that's what I would have thought - and it does IF the mail is sent on the server using pine. It never leaves the server because it checks local_host_names. In this case it does what it should and puts the mail in the right imap box.

But it's mail collected from the outside world that doesn't work (even though they are the same domains as I use when sending from pine on the server).

So I think it dumps them in mail possibly because I have not configured up the server's identity properly.

But - as I said - I am having a real nightmare with this one.

I also noted that when mail is sent by pine, it doesn't say from user@companyname.com but user@server.companyname.com

Thanks for the help so far !

acid_kewpie 06-07-2003 05:34 PM

i'm not too hot with actual smtp issues, but your smtp should be able to rewrite the internal domain with the official domain, for exim i have this:

*@*.thirtythreeandathird.net $1@thirtythreeandathird.net

obviously it's not going to be that easy in sendmail... probably involves having to stand under the third oak tree with a badger under your arm on a full moon... :)

what happens if you do send mail to the local address being used by fetchmail? if the same does happen irrlelevant of fetchmail that that will be out of the equation.

mazzo 06-07-2003 05:50 PM

Thanks Chris

Yes sendmail is a little arcane......

Sendmail copes with all mail sent to any of the domains listed in .fetchmailrc - so long as they are sent from the server itself.

So these mails do not leave the server - they go directly to the appropriate mailbox.

This keeps leading me towards not having my hostnames etc set up correctly.

Maybe I should post something on there about configuring my localhost.localdomain bit.

As I said - I have forgotten to do something...but what ???

:confused:

mazzo 06-09-2003 06:39 AM

Sorted it !

I knew I had forgotten something - and I eventually found it.

It was a fetchmail problem.....

Just in case anyone else has this problem, here is the answer (the red text is what I omitted)

user foo there with password xxxx is mail * here options fetchall warnings 3600

acid_kewpie thanks for your help.

:D


All times are GMT -5. The time now is 11:53 AM.