Cant receive email ?

43 posts / 0 new
Last post
#1 Tue, 01/27/2009 - 16:16
loufeliz

Cant receive email ?

Hello.

I started off with clean Centos 5.2 Install (no apache, mysql, )

I downloaded the setup script and ran it. I do plan on registering this, just trying this out to get basic hang of it.

Once done, I updated my test domain to point to it.

I updated my godaddy dns record to point the the public shared ip

setup dmain as a virtual server

created a user connected via local vtp and upload simple html page can view it viw web browser on remote link. When I try and send an email from Yahoo I get error :

<lou@sportcrm.net>: 204.14.167.40 does not like recipient. Remote host said: 554 5.7.1 <lou@sportcrm.net>: Relay access denied Giving up on 204.14.167.40.

Its obviously finding the host, but for some reason it does not see email.

Once this is resolved, need to get a better Webmail front end. My users are coming from a Cobalt Raq and are used to accessing web mail via mail.<their domain>/webmail

ANyway, thanks for reading this and any suggestions or help will be appreciated.

  • Lou
Tue, 01/27/2009 - 16:38
andreychek

Howdy,

What do you see in the email logs, in /var/log/maillog?

Regarding webmail -- by default, Usermin is available by going to webmail.USERDOMAIN.com.

By editing the Server Template (Apache Website), you can make that webmail link go to any URL you like -- it's Usermin by default, but you could have it go to, say, a RoundCube installation.
-Eric

Wed, 01/28/2009 - 05:02 (Reply to #2)
loufeliz

I have only setup on initial test user to try email out at this time.

I logged in as root and used the command and root was able to send the message. I verified by using an RemotePop from a PC using the mail.sportcrm.net as mail host.

I am ssh'ing via vpn connection to the ip (.98) as root

I noticed that the DNS settings in server all contain the local machine IP, which hopefully are not a problem given that I NAT the public IP to the IP on my DMZ. Could it be a problem that the VM host vhost.directfile.com is not registered? I could have an entry added to our DNS that resolves that name to the public ip .40 ?

Commands you requested are below :

[root@vhost ~]# host -a sportcrm.net
Trying &quot;sportcrm.net&quot;
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 5069
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1

;; QUESTION SECTION:
;sportcrm.net. IN ANY

;; ANSWER SECTION:
sportcrm.net. 38400 IN MX 5 mail.sportcrm.net.
sportcrm.net. 38400 IN TXT &quot;v=spf1 a mx a:sportcrm.net ip4: 172.16.1.98 ?all&quot;
sportcrm.net. 38400 IN SOA vhost.directfile.com. root.vhost .directfile.com. 1233007056 10800 3600 604800 38400
sportcrm.net. 38400 IN NS vhost.directfile.com.
sportcrm.net. 38400 IN A 172.16.1.98

;; ADDITIONAL SECTION:
mail.sportcrm.net. 38400 IN A 172.16.1.98

Received 218 bytes from 127.0.0.1#53 in 1 ms

&gt;Host mail.sportcrm.net
mail.sportcrm.net has address 172.16.1.98

I updated my spf record at GoDaddy to see if that makes an difference.
Will have my domain admin add an A record to directfile.com for vhost

- Lou

Wed, 01/28/2009 - 05:10 (Reply to #3)
loufeliz

I was looking around and saw a DNS setting in VirtualMIN

IP address for use in DNS records Same as real address (172.16.1.98) I changed it to the public IP .40 address and mail still not coming in.

Hopefully this is just part of tweaking the installation. My goal is to replace an aging Sun Cobalt Raq with Centos 5/Virtual Min on a new dell server I have.

- Lou

Wed, 01/28/2009 - 05:16 (Reply to #4)
loufeliz

Also tried simple sMTP test using the Local IP as SMTP server to send email to yahoo.

My guess is that the two may or may not be related.

Jan 28 01:09:23 vhost postfix/anvil[12881]: statistics: max connection rate 1/60s for (smtp:67.195.15.112) at Jan 28 01:06:03
Jan 28 01:09:23 vhost postfix/anvil[12881]: statistics: max connection count 1 for (smtp:67.195.15.112) at Jan 28 01:06:03
Jan 28 01:09:23 vhost postfix/anvil[12881]: statistics: max cache size 1 at Jan 28 01:06:03
Jan 28 01:12:18 vhost postfix/smtpd[13000]: connect from unknown[192.168.0.197]
Jan 28 01:12:19 vhost postfix/smtpd[13000]: NOQUEUE: reject: RCPT from unknown[192.168.0.197]: 554 5.7.1 &lt;lfeliz@yahoo.com&gt;: Relay access denied;
from=&lt;lou@sportcrm.net&gt; to=&lt;lfeliz@yahoo.com&gt; proto=SMTP helo=&lt;LATLOU&gt;
Jan 28 01:12:19 vhost postfix/smtpd[13000]: disconnect from unknown[192.168.0.197]

Wed, 01/28/2009 - 06:13 (Reply to #5)
andreychek

Yeah, this last one is probably due to not having your email client authenticate to the mail server when you're sending email.
-Eric

Wed, 01/28/2009 - 06:47 (Reply to #6)
loufeliz

YEp.. I can send but I stil am not able to receive emails. Tried from another server

Failed to deliver to 'lou@sportcrm.net'
SMTP module(domain @10.20.0.171|sportcrm.net) reports:
host mail.sportcrm.net says:
554 5.7.1 &lt;lou@sportcrm.net&gt;: Relay access denied

I will check back here again later today. IF there is anything else I need to try let me know. I could also arrange for someone to get remote access to my desktop and then ssh into box from there, but that is a last resort. I may try building another VM and see if same problem persists.

- Lou

Wed, 01/28/2009 - 11:18 (Reply to #7)
andreychek

My guess is that with your host on NAT behind a router, that some IP's aren't setup as they need to be.

Does it sound correct that the internal IP address of your server would be 172.16.1.98?

Any idea what the 10.20.0.171 IP address is that's in your latest message above?
-Eric

Wed, 01/28/2009 - 13:11 (Reply to #8)
loufeliz

Hi.

The 10.20.0.171 ip was me sending an email out from my office where that mail server to functions behind a NAT'd IP (Communigate Pro). I have 250 users sending email through that box daily and its just how it error'd back to me.

Yes 172.16.1.98 is my Private IP on my DMZ network which is NAT'd to the .40 public ip.

Do most users just expose the server to public internet? I have always nat'd my servers only opening the required ports.

Is there some kind of diagnostic I can provide. Could it be something in the DNS on the Virtualmin host itself?

I will be able to access it again later tongiht.

I really do appreciate all the input on this.
- Lou

Wed, 01/28/2009 - 14:13 (Reply to #9)
andreychek

Hi Lou,

I can't say that not being on a NAT'd connection would solve the problem. I'm not quite sure what the issue is.

But, it would rule out a whole host of possible issues :-)

To answer your question, I do think most folks run Virtualmin on a public server, and that's certainly the easiest way to set it up. That's what I do, but I run firewall software on the server itself, and only open up ports that need to be available.

However, it should work either way.

Does /etc/postfix/main.cf have a virtual_alias_maps line such as this:

virtual_alias_maps = hash:/etc/postfix/virtual

and, does /etc/postfix/virtual have a line such as:

sportcrm.net sportcrm.net

Not having that could make Postfix think it's not the destination for that domain.
-Eric

Wed, 01/28/2009 - 18:50 (Reply to #10)
loufeliz

/etc/postfix/main.cf did contain virtual_alias_maps = hash:/etc/postfix/virtual

the virutal file did not haveportcrm

so i added sportcrm.net sportcrm.net

saved, restarted services and still no inbound email

Puzzling.....

Wed, 01/28/2009 - 19:06 (Reply to #11)
andreychek

Well, when you edit that file, to actually update the DB, you'd have to run this:

postmap /etc/postfix/virtual

and then at the point, you can restart:

/etc/init.d/postfix restart

Does that help?

Wed, 01/28/2009 - 19:45 (Reply to #12)
loufeliz

Success! That did it.

So, now I know. I need to edit that file every time I add a virtual host.

Is this a bug? Will it be updated in future update?

Thanks for all your help.

- Lou

Wed, 01/28/2009 - 19:49 (Reply to #13)
andreychek

No! Don't settle for editing that file, this problem should never happen :-)

We're just determining the issue - the next step is to figure out if it was a fluke, or if there's something preventing it from being added correctly.

If it's a bug, Jamie will fix it.

The next step is to figure that out, though.

Do you have a new Virtual Server (domain) you can add? Even if it's just a dummy one that you delete?

I'd love to know if that line gets added the next time around.
-Eric

Wed, 01/28/2009 - 20:02 (Reply to #14)
loufeliz

Hi .. Yes I have several domains parked. I will go ahead and make the DNS changes on one of them and add it to Virtualmin in the morning and report back hear as to what I observe.

I will also probably try installing VirutalMin into a new linux VM running Centos 5.2 again

- Lou

Thu, 01/29/2009 - 04:38 (Reply to #15)
loufeliz

Good results this time.

I add a new domain and the entry was added to the virtual file.

I was able to email a user from yahoo, so looks like it was fluke. I will confirm after I do a clean re-install and repeat the process adding the same first domain and then the second.

Thanks for all the help.

- Lou

Thu, 01/29/2009 - 04:40 (Reply to #16)
andreychek

That's great news Lou, thanks for the update!
-Eric

Sun, 02/01/2009 - 07:12 (Reply to #17)
zer0

I did the port scan using Sheildsup and according to that it is open.

Sun, 02/01/2009 - 07:57 (Reply to #18)
ronald
ronald's picture

I'd say you can expect that behaviour if running a server on a dynamic IP. Even with dyndns installed wouldn't make it error free or would it?

Sun, 02/01/2009 - 08:05 (Reply to #19)
andreychek

Yeah, running on a dynamic IP is tough; what error is showing up in the mail logs though (in /var/log) whenever you send yourself a message from the outside world?
-Eric

Sun, 02/01/2009 - 09:08 (Reply to #20)
loufeliz

Hello.

Just following up : Had time to build a new VM and reinstall Virtualmin on minimal Centos installation. Glad to say it all went smoothly worked as per steps followed from getting started.

I will be going over the process to add/manage domains with my client and have him register once the new server comes in so we can start transferring domains and websites from the Cobalt Raq he is using.

Cheers!

- Lou

Sun, 02/01/2009 - 09:26 (Reply to #21)
zer0

sorry which log file am i looking for in the /var/log directory?

sorry i'm new to all this...

thanx

Sun, 02/01/2009 - 10:12 (Reply to #22)
andreychek

Howdy -- it depends on what Linux distribution you're using. It's likely either /var/log/maillog or /var/log/mail.log.
-Eric

Sun, 02/01/2009 - 13:55 (Reply to #23)
zer0

Here is part of the log...

[code:1]
Feb 1 18:45:06 b postfix/qmgr[5332]: 1AC3EE8ACB: from=&lt;test@genvioncorp.com&gt;, size=595, nrcpt=1 (queue active)
Feb 1 18:45:06 b postfix/qmgr[5332]: 8432AE8B2C: from=&lt;test@genvioncorp.com&gt;, size=740, nrcpt=1 (queue active)
Feb 1 18:45:06 b postfix/qmgr[5332]: 43C6CE8ABA: from=&lt;test@genvioncorp.com&gt;, size=594, nrcpt=1 (queue active)
Feb 1 18:45:36 b postfix/smtp[30971]: connect to f.mx.mail.yahoo.com[68.142.202.247]:25: Connection timed out
Feb 1 18:45:37 b postfix/smtp[30972]: connect to mx1.hotmail.com[65.54.244.136]:25: Connection timed out
Feb 1 18:45:37 b postfix/smtp[30973]: connect to mx4.hotmail.com[65.55.37.120]:25: Connection timed out
Feb 1 18:46:06 b postfix/smtp[30971]: connect to a.mx.mail.yahoo.com[67.195.168.31]:25: Connection timed out
Feb 1 18:46:07 b postfix/smtp[30972]: connect to mx4.hotmail.com[65.55.37.88]:25: Connection timed out
Feb 1 18:46:07 b postfix/smtp[30973]: connect to mx4.hotmail.com[65.54.244.232]:25: Connection timed out
Feb 1 18:46:36 b postfix/smtp[30971]: connect to g.mx.mail.yahoo.com[209.191.118.103]:25: Connection timed out
Feb 1 18:46:37 b postfix/smtp[30972]: connect to mx3.hotmail.com[65.55.37.72]:25: Connection timed out
Feb 1 18:46:37 b postfix/smtp[30973]: connect to mx2.hotmail.com[65.54.245.40]:25: Connection timed out
Feb 1 18:47:06 b postfix/smtp[30971]: connect to f.mx.mail.yahoo.com[209.191.88.247]:25: Connection timed out
Feb 1 18:47:07 b postfix/smtp[30972]: connect to mx1.hotmail.com[65.54.244.8]:25: Connection timed out
Feb 1 18:47:07 b postfix/smtp[30973]: connect to mx3.hotmail.com[65.55.37.104]:25: Connection timed out
Feb 1 18:47:36 b postfix/smtp[30971]: connect to c.mx.mail.yahoo.com[216.39.53.2]:25: Connection timed out
Feb 1 18:47:36 b postfix/smtp[30971]: 1AC3EE8ACB: to=&lt;zer0net2004@yahoo.ca&gt;, relay=none, delay=59060, delays=58910/0.02/150/0, dsn=4.4.1, status=deferred (connect to c.mx.mail.yahoo.com[216.39.53.2]:25: Connection timed out)
Feb 1 18:47:37 b postfix/smtp[30972]: connect to mx4.hotmail.com[65.54.244.232]:25: Connection timed out
Feb 1 18:47:37 b postfix/smtp[30972]: 8432AE8B2C: to=&lt;bilal88@hotmail.com&gt;, relay=none, delay=74818, delays=74668/0.02/150/0, dsn=4.4.1, status=deferred (connect to mx4.hotmail.com[65.54.244.232]:25: Connection timed out)
Feb 1 18:47:37 b postfix/smtp[30973]: connect to mx1.hotmail.com[65.54.244.8]:25: Connection timed out
Feb 1 18:47:37 b postfix/smtp[30973]: 43C6CE8ABA: to=&lt;bilal88@hotmail.com&gt;, relay=none, delay=65866, delays=65716/0.03/150/0, dsn=4.4.1, status=deferred (connect to mx1.hotmail.com[65.54.244.8]:25: Connection timed out)
[/code:1]

Mon, 02/02/2009 - 10:31 (Reply to #24)
Joe
Joe's picture

I'll also note that those log entries make me think you're ISP is blocking port 25 (this is very common...I don't know of any major ISP that doesn't block port 25 to home users). You'll never be able to run an SMTP server without port 25.

--

Check out the forum guidelines!

Sun, 02/01/2009 - 14:04 (Reply to #25)
zer0

also when i send my self mail from yahoo its immediately bounced i get the following response in the bounced email:

64.202.166.11 does not like recipient.
Remote host said: 550 sorry, mail to that recipient is not accepted (#5.7.1)
Giving up on 64.202.166.11.

i dont think DNS is pointing to my IP address for some reason, because thats not my ip address

Mon, 02/02/2009 - 04:05 (Reply to #26)
andreychek

If you think the DNS may be incorrect, then you may want to use a remote server to verify your DNS.

That said, the above logs suggest that your server is unable to communicate with Hotmail -- it's simply not getting to it.

If you're running this on a dynamic IP of some form, it's rather common these days for ISP's to block outgoing (and sometimes incoming) port 25 traffic.

Can you verify that you're able to get to port 25 on any remote server outside of your ISP?
-Eric

Mon, 02/02/2009 - 08:22 (Reply to #27)
zer0

I've ran scans using some of the tools on the internet to check for port 25 and they all concluded that its open and ISP is not blocking it. I am however able to send emails to my email address provided by my ISP, but I cant send them to any other email, like hotmail,yahoo,or gmail. But i cant recieve emails from anyone not even my own ISP's email.

since i'm using godaddy DNS... this is how i set up the DNS on godaddy

1st i created an A record

Host (A) Points to TTL
mail.domain.com. x.x.x.x(my ip) 1 Hour

2nd i created MX record

Priority Host Goes to TTL
0 domain.com. mail.domain.com. 1 Hour

So if everything works, when i ping mail.domain.com it should return my IP, right? but it doesnt it returns pop.secureserver.net which is listed under the CNAME for pop and mail (same for both), I dont know if i'm suppose to change that? i did try changing it to mail.domain.com and then ping mail.domain.com it returns an error that i cannot find host.

Mon, 02/02/2009 - 08:44 (Reply to #28)
andreychek

I guess you're going to need to provide both your IP address and domain for us to help, as I'm really not sure.

And all those tools can determine is that incoming SMTP isn't blocked, they can't determine outgoing SMTP.

The logs you showed imply your server isn't able to communicate with remote SMTP servers, which leads me to believe that may be the issue.

What happens if you log into your Virtualmin server, and type:

telnet ASPMX.L.GOOGLE.COM 25

You should see this:

Trying 74.125.47.27...
Connected to ASPMX.L.GOOGLE.COM.
Escape character is '^]'.
220 mx.google.com ESMTP 6si3375887ywi.26

If it just hangs there, that means outgoing port 25 is blocked.
-Eric

Mon, 02/02/2009 - 09:19 (Reply to #29)
zer0

my ip: 99.247.223.232

my domain: genvioncorp.com

actually i dont know how to telnet through virtualmin but in command prompt i did that and it didnt work, it says conection failed.

Mon, 02/02/2009 - 09:25 (Reply to #30)
andreychek

Howdy,

Okay, that helps a bit.

It does seem that the IP address associated with genvioncorp.com may be incorrect -- it points to a parked page at GoDaddy. So you may need to log into GoDaddy's control panel, and make sure the IP addresses are pointing to where you'd expect.

The IP &quot;99.247.223.232&quot; does appear to allow incoming SMTP/25, so that part should work once you update the DNS at GoDaddy.

Regarding outgoing email -- that part may be more of a problem :-)

It does sound like it's being blocked, but that's not the end of the world.

I imagine your ISP has an SMTP relay they've setup for you. You can configure things to use that for outgoing email, which should allow you to get emails to outside mailservers.
-Eric

Mon, 02/02/2009 - 09:35 (Reply to #31)
zer0

at godaddy there were two A hosts
@ 68.178.232.100 (default)

and the second one i created

mail.genvioncorp.com (my ip)

so i changed the @ to point to my ip, i hope that works... but i think it will also point the website (which is not up yet, and it wont be hosted on-site) to my ip.

and what things do i need to configure to use the SMTP relay? (sorry for the noob question)

Mon, 02/02/2009 - 09:40 (Reply to #32)
andreychek

If your SMTP relay does not require authentication, it's as simple as going into Webmin -&gt; Servers -&gt; Postix -&gt; General, and adding the SMTP relay name to &quot;Send outgoing mail via host&quot;.
-Eric

Mon, 02/02/2009 - 10:43 (Reply to #33)
zer0

so i contacted my ISP and they would allow me to use 3rd party email through their SMTP server so i have to verify my email with them, they sent me a code... but the problem is... i can not receive emails from outside world. it seems like godaddy DNS isnt working for me, is there a way i can use the DNS server built in virtualmin to do this for me?

Thanx

Mon, 02/02/2009 - 10:44 (Reply to #34)
zer0

<b>andreychek wrote:</b>
<div class='quote'>Howdy,

What do you see in the email logs, in /var/log/maillog?

Regarding webmail -- by default, Usermin is available by going to webmail.USERDOMAIN.com.

By editing the Server Template (Apache Website), you can make that webmail link go to any URL you like -- it's Usermin by default, but you could have it go to, say, a RoundCube installation.
-Eric</div>

I just talked to them and they said they dont block port 25 or port 110, however they use port 587 instead of port 25 for their outgoing server.

Mon, 02/02/2009 - 10:46 (Reply to #35)
zer0

i think there is a glitch int he forum.. it quoted the wrong person in my previous post... i meant to quote joe

Mon, 02/02/2009 - 15:43 (Reply to #36)
Joe
Joe's picture

<div class='quote'>i think there is a glitch int he forum.</div>

That's kinda like seeing a car that's been crushed into a little cube, and saying, &quot;I think that car has a dent in it.&quot; ;-)

This forum is horrible. It'll be replaced soon.

--

Check out the forum guidelines!

Mon, 02/02/2009 - 11:35 (Reply to #37)
zer0

i think i fixed my DNS record on godaddy and i can get email from out side... thank you every much everyone!!!!! i appreciate your help.

I will make the changes and use my ISP SMTP settings and see what happens... i'll post back when everything is done

Thanx again

Mon, 02/02/2009 - 15:56 (Reply to #38)
zer0

hahahah, i didnt wanna say anything :P

Tue, 01/27/2009 - 19:23
loufeliz

Hello....

I am able to remote pop the mailbox to see that I have email. However the maillog excerpt... below shows me trying to email myself from my yahoo account. Could it have something to do with how the account is named?

Jan 27 12:24:42 vhost postfix/master[30031]: daemon started -- version 2.3.3, configuration /etc/postfix
Jan 27 12:25:05 vhost postfix/smtpd[30082]: connect from web180514.mail.gq1.yahoo.com[67.195.15.112]
Jan 27 12:25:05 vhost postfix/smtpd[30082]: NOQUEUE: reject: RCPT from web180514.mail.gq1.yahoo.com[67.195.15.112]: 554 5.7.1 &lt;lou@sportcrm
.net&gt;: Relay access denied; from=&lt;lfeliz@yahoo.com&gt; to=&lt;lou@sportcrm.net&gt; proto=SMTP helo=&lt;web180514.mail.gq1.yahoo.com&gt;
Jan 27 12:25:05 vhost postfix/smtpd[30082]: disconnect from web180514.mail.gq1.yahoo.com[67.195.15.112]
Jan 27 12:25:11 vhost dovecot: pop3-login: Login: user=&lt;lou.sportcrm&gt;, method=PLAIN, rip=::ffff:76.227.239.144, lip=::ffff:172.16.1.98
Jan 27 12:25:11 vhost dovecot: POP3(lou.sportcrm): Disconnected: Logged out top=1/756, retr=0/0, del=0/1, size=1176
Jan 27 12:28:25 vhost postfix/anvil[30084]: statistics: max connection rate 1/60s for (smtp:67.195.15.112) at Jan 27 12:25:05
Jan 27 12:28:25 vhost postfix/anvil[30084]: statistics: max connection count 1 for (smtp:67.195.15.112) at Jan 27 12:25:05
Jan 27 12:28:25 vhost postfix/anvil[30084]: statistics: max cache size 1 at Jan 27 12:25:05

Tue, 01/27/2009 - 19:59 (Reply to #40)
andreychek

Hmm, interesting.

A couple of questions:

* Can other users on your system receive emails?

* If you log into your system over SSH, and run this:

cat /etc/fstab | mail -s &quot;Test Message&quot; lou@sportcrm.net

Does that email go through?

* Also while logged in over SSH, what do you see when you type this:

host -a sportcrm.net
host mail.sportcrm.net

To answer your question, I don't think it's the account name, but I'm not quite sure what the issue is ATM :-) Hopefully the above questions help point us in the right direction. Thanks!
-Eric

Sat, 01/31/2009 - 21:18
zer0

hi,
i'm having the same problem,i cant recieve emails, but i can send them, however i checked my virtual file and it contained the entry domain.com domain.com but i still cant get emails. i'm running ubuntu 8.04, and my ip is dynamic i think though it doesnt get changed very often. for my dns i'm using godaddy since i have a domain from them, i created an A record pointing to my IP

mail.domain.com IN A x.x.x.x

and then i created MX record pointing to A record

domain.com IN MX mail.domain.com

i'm forwarding ports 110, 25 and 143 to my virtualmin box.

when i try to send email to email test@domain.com from yahoo i get the following errors

64.202.166.11 does not like recipient.
Remote host said: 550 sorry, mail to that recipient is not accepted (#5.7.1)
Giving up on 64.202.166.11.

and 64.202.166.11 is not my ip.

any help will be greatly appreciated..

Sun, 02/01/2009 - 06:37 (Reply to #42)
andreychek

If you're on a dynamic IP, that may also mean that your ISP is blocking port 25/SMTP.

Do you have a way to verify that port 25 is open from the outside world?
-Eric

Topic locked