LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-17-2005, 10:26 PM   #1
latino
Member
 
Registered: Aug 2003
Location: Puerto Rico
Distribution: Centos 6.6
Posts: 142

Rep: Reputation: 15
Question ¿Not receiving mail?, need help isolating this -->data included


Hi:

I am using RHEL 4, Apache 2.0.54 and would like to FIX a problem I have been dealing about NOT ABLE TO RECEIVE mail from the outside world. IMAP server is Dovecot.

This is a dedicated server which I manage. Months ago after being frustrated trying to setup mail receive, I opted for using a generic free account. Now, I am back decided to FIX this.

DATA I
I asked my server provider about the MX record at DNs (so I can receive email at username@mydomain.com) and he told me it looks ok.

mydomain.com. IN NS ns1.myisp.com.
mydomain.com. IN NS ns2.myisp.com.
mydomain.com. IN MX 10 mail
mydomain.com. IN A x.x.x.x
www IN A x.x.x.x
ftp IN A x.x.x.x
mail IN A x.x.x.x

DATA II
Squirrelmail Configtest shows EVERYTHING ok. See below...

SquirrelMail configtest
This script will try to check some aspects of your SquirrelMail configuration and point you to errors whereever it can find them. You need to go run conf.pl in the config/ directory first before you run this script.

SquirrelMail version: 1.4.5 [CVS]
Config file version: 1.4.0
Config file last modified: 17 June 2005 22:03:37


Checking PHP configuration...
PHP version 5.0.4 OK.
PHP extensions OK.
Checking paths...
Data dir OK.
Attachment dir is the same as data dir.
Plugins OK.
Themes OK.
Default language OK.
Base URL detected as: http://www.mydomain.com/webmail/src
Checking outgoing mail service....
SMTP server OK (220 myserver.com ESMTP Sendmail 8.13.1/8.13.1; Fri, 17 Jun 2005 22:08:31 -0500)
Checking IMAP service....
IMAP server ready (* OK dovecot ready.)
Capabilities: * CAPABILITY IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN LISTEXT LIST-SUBSCRIBED NAMESPACE STARTTLS AUTH=PLAIN
Checking internationalization (i18n) settings...
gettext - Gettext functions are available. You must have appropriate system locales compiled.
mbstring - Mbstring functions are unavailable. Japanese translation won't work.
recode - Recode functions are unavailable.
iconv - Iconv functions are available.
timezone - Webmail users can change their time zone settings.
Checking database functions...
not using database functionality.

Congratulations, your SquirrelMail setup looks fine to me!

Login now

DATA III - MAILLOG
Jun 17 21:16:15 myserver sendmail[7906]: j5I2GF21007906: to=webmaster@mydomain.com, ctladdr=nobody (99/99), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30440, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (j5I2GFV2007907 Message accepted for delivery)

Please note that I have replaced 'mydomain' to not make public it. The situation I am unable to see any mail in Squirrelmail INBOX nor at /var/mail/ .

From the maillog message above I can presume I am receiving the email? What I need to do ti fix this. Pointers please!

Finally, netstat -tl shows imap is listening...

TIA


Last edited by latino; 06-17-2005 at 10:30 PM.
 
Old 06-18-2005, 06:46 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
You have to configure sendmail to accept mail for your domain. RH may have a script for this. I have used RH5 (long time ago), then it was called mailconf - if I recall correctly.
 
Old 06-18-2005, 09:57 AM   #3
latino
Member
 
Registered: Aug 2003
Location: Puerto Rico
Distribution: Centos 6.6
Posts: 142

Original Poster
Rep: Reputation: 15
ok. I tried sending a email to webmaster@mydomain.com and the email is located at:

/var/spool/mail/root

The email was not received through outside tou... have to open a Yahoo account to test from outside world.

Tried from hotmail and no luck.. I also tried to edit sendmail M4 through webmin and recevied this message:

The Sendmail M4 configuration base directory /usr/share/sendmail-cf was not found on your system, or is not the correct directory. Maybe it has not been installed (common for packaged installs of Sendmail),

_WHERE_ is sendmail.cf file located in RHEL 4?

FOUND! --> /etc/mail

Now have to find the problem...

Any pointers please!

Latino

Last edited by latino; 06-18-2005 at 10:18 AM.
 
Old 06-18-2005, 10:30 AM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
As I said, it's been a long time since I used sendmail for a mail server. Things could be different now. I'd recommend to send mail (from outside) to your.account@your.ip.address and see if it gets thru. If it does - you have to tell sendmail to accept mail for your domainname.
 
Old 06-18-2005, 11:43 AM   #5
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 32
latino

sendmail.mc should be in "/etc/mail" I don't use webmin so you may have to get your hands dirty on the command line

From the logs it would appear that sendmail is working your email to webmaster@mydomain.com appeared in root's mail folder because I assume you don't have a user named webmaster

All of the next instructions need to be performed as root

Open with a text editor, I use vi "/etc/mail/sendmail.mc" find the line that reads
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

Change it to
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

This allows sendmail to listen on all available interfaces not just 127.0.0.1 which will only give you local mail

You will now have to remake sendmail.cf normally right at the top of sendmail.mc there are instructions to do this usually something like this

Make sure you are in the mail directory and run from the command line as root
make -C /etc/mail

This is dependent on your version of sendmail

Next take a look in "/etc/mail" if there is a file there named "local-host-names" add your domain to it

Example
linuxquestions.org

If it's not there create the file and add your domain

Next edit the file named "aliases" here you should find a section to re-route root's mail to yourself, in my case
root: peter

Peter or whoever should be a valid user on your machine

Now from the command line run
newaliases

This will make the file aliases.db

Now restart sendmail so that it reads all the new configuration and try again

If nothing else this may point you in the right direction

Pete
 
Old 06-20-2005, 08:21 PM   #6
latino
Member
 
Registered: Aug 2003
Location: Puerto Rico
Distribution: Centos 6.6
Posts: 142

Original Poster
Rep: Reputation: 15
Hi:

Well did the changes and this is what I am getting:

1- email to Webmaster@mydomain.com IS being received from the OUTSIDE.

BUT...

2- all email is being sent to root mail account

This even happens after changing aliases to redirect root email to webmaster

HOWEVER. I want to be able to make users receive email NOT just redirect root email to webmaster. I want to have FULL email capabilities.

What could be the problem that email is not being saved to var/spool/mail/user or /home/User/mail??

IS this a sendmail issue or coould be an IMAP issue??

Could I assume sendmail receiving is ok, since email to webmaster was accepted altough sent to root mail???

Any help will be appreciated.

 
Old 06-20-2005, 09:36 PM   #7
latino
Member
 
Registered: Aug 2003
Location: Puerto Rico
Distribution: Centos 6.6
Posts: 142

Original Poster
Rep: Reputation: 15
Hi All:

Ok good news that may help others. Various..

1- I tried telneting to mydomain.com 25 and sendmail answered so it was listening to the outside world...

2- I did the dnl before the line Pete told...

3- Used webmin to assign user to mail group.

4- Dunno why but users with a CAPITAL letter did'nt received mail. I created another user with lower caps and it is working.

Have to restart the server to be sure it is truly FIXED!.

Later


Last edited by latino; 06-20-2005 at 09:44 PM.
 
Old 06-21-2005, 01:06 AM   #8
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 32
Congratulations latino

Welcome to the mysterious world of Sendmail

Pete
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Not receiving data from serial modem. ejoe Linux - Hardware 18 04-01-2007 12:35 PM
receiving unwanted data from internet mohtasham1983 Linux - General 2 11-28-2005 12:37 PM
problem receiving pop3 mail from postfix mail server GEN_Electric Linux - Software 2 02-14-2005 02:43 PM
modem stops receiving data positron Linux - Newbie 3 07-21-2004 03:32 AM
Receiving all data from socket Ohmu Programming 6 03-08-2004 01:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration