LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-03-2011, 01:50 AM   #1
motd
LQ Newbie
 
Registered: Aug 2010
Posts: 2

Rep: Reputation: 0
enable incoming emails


hey admins !

I use php to send newsletter via sendmail.
outgoing emails work as needed.

I defined a .forward file to get responses in my regular email account.

If I use mailx to send emails from root account to my own account, it gets forwarded as needed.

If I try to send from outside the box to news@domain.com the email is not received in the box and the sender does not receive an error message.

I am sure I missed something.
How do I enable incoming emails ?
Thanks for helping out !
 
Old 03-03-2011, 03:03 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,214
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Hi and welcome to LQ,

You should check /var/log/maillog to see if any mail arrives at your server from outside.
Also run:
Code:
dig mx domain.com @8.8.8.8
to check if your mailserver is responsible to get mail for that domain.

Regards
 
Old 03-03-2011, 12:17 PM   #3
motd
LQ Newbie
 
Registered: Aug 2010
Posts: 2

Original Poster
Rep: Reputation: 0
@bathory

Thanks for the warm welcoming.

(1) Thanks for mentioning the log. It implies that something is going on.

# ls -l /var/log/mail.*
-rw-r----- 1 syslog adm 1 Feb 24 15:32 /var/log/mail.err
-rw-r----- 1 syslog adm 3305284 Mar 3 18:37 /var/log/mail.info
-rw-r----- 1 syslog adm 3305284 Mar 3 18:37 /var/log/mail.log
-rw-r----- 1 syslog adm 88 Feb 27 18:24 /var/log/mail.warn

mail.info and mail.log are identical and full of outgoing messages errors, which I did not know about and am not sure how to solve.
mail.err is practically empty.

# cat /var/log/mail.warn
Feb 27 18:24:50 host sm-mta[15951]: gethostbyaddr(x.x.x.x) failed: 1

/* x.x.x.x is an unused interface on that server. I am not sure why there is a warning message here */

(2) looks like there are also outgoing errors, such as:
Mar 3 18:44:56 host sm-mta[15414]: p239bH14029923: to=<user@aol.com>, ctladdr=<www-data@domain.com> (33/33), delay=07:07:39, xdelay=00:00:04, mailer=esmtp, pri=3998607, relay=mailin-03.mx.aol.com. [205.188.190.2], dsn=4.0.0, stat=Deferred: 421 4.7.1 : (DYN:T1) http://postmaster.info.aol.com/errors/421dynt1.html

(3) -bash: dig: command not found


seems like a bigger issue than I thought...
 
Old 03-03-2011, 01:03 PM   #4
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Welcome to the world of mail server. They are no small affair and not for the faint of heart.
1) your gethostbyaddr indicates that a reverse lookup was performed. Many computers don't return a proper reverse lookup, but legitimate mail exchangers should. Off hand, I am not sure why you would get this on an used interface, unless something were trying to access it. It sounds like something may be configured to send mail to this address.

2) quoting from the site you linked, "421 DYN:T1* The IP address you are sending from has been temporarily rate limited due to lack of whitelisting, unexpected changes in volume, or poor IP reputation." This means that AOL doesn't like you as a mail server and is rejecting your message. Your system is responding by keeping it in the deffered queue and will try periodically for a while, usually 60 days before flushing the message. If you are running your server from a dynamic IP, or residential, this could be your problem. If not, the first thing to do would be to check your IP and domain against MX toolbox. This will also tell you a lot of information regarding the identity of your mail system, which is largely handled through DNS.

3) I am not sure why you don't have dig. I thought it was a common resolver application. Try running as root or use sudo and check your DNS packages for the files

Receiving and Sending mail are two separate applications, each with their own intricacies, but the two functions are usually intimately related. Sending is handled through an MTA such as sendmail or postfix. Receiving involves the MTA, which accepts the message for delivery, but it is served up to the user using a POP or IMAP server, such as Dovecot or Cyrus. These applications often times also provide secure authentication to allow users to send mail through the MTA.

As bathory pointed out, you need to figure out what your MX records show. MX records indicate what mail exchangers handle mail for that domain. If no MX record exists, mail will be directed towards the root of the domain. Having a domain and having it be locatable (IP can be obtained) is the first step. Getting the MX record in place is the second. Next, you will need to install a POP/IMAP server and configure it for your user base as well as integrate it into the MTA.
 
Old 03-03-2011, 01:30 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,214
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Just to add to the above, dig and the other dns utilities are part of the bind-utils package (the package name may vary depending on distro)
You can also check you domain mx settings on-line here

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
postfix / smtpd is rejecting all incoming emails alitrix Linux - Server 2 06-06-2008 05:10 PM
Postfix doesn't receive incoming emails El Mago Linux - Software 8 08-04-2006 11:57 AM
get a copy of outgoing and incoming emails cksoo Linux - Enterprise 0 02-12-2006 01:56 AM
Incoming emails stuck in /var/spool/mail/home/ Nizhni Linux - Networking 0 01-21-2005 05:51 PM
Problem with incoming emails, on a redhat server darkstar11 Red Hat 2 02-20-2004 09:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

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