Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Nov 06, 2012 10:58 am 
Offline
Senior Newbie

Joined: Tue Oct 30, 2012 6:47 am
Posts: 9
I, with some help, installed Postfix, Dovecot and MySQL on a Linode cloud server running CentOS 6.

I can send email from my gmail account to joe@MYDOMAIN.COM. I can't send email from joe@MYDOMAIN.COM to a valid email address.

Since I can successfully send emails to joe@MYDOMAIN.COM, I am guessing that I don't have a dns problem but rather a Postfix or Dovecot configuration error.

The following line is from my /var/log/mail.

Nov 6 04:21:26 mail postfix/smtpd[3302]: NOQUEUE: reject: RCPT from c-24-118-254-66.hsd1.mn.comcast.net[24.118.254.66]: 450 4.1.8 <joe@AsusLaptop.hsd1.mn.comcast.net>: Sender address rejected: Domain not found; from=<joe@AsusLaptop.hsd1.mn.comcast.net> to=<joe@MYDOMAIN.COM> proto=ESMTP helo=<AsusLaptop.hsd1.mn.comcast.net>

The comcast.net stuff above is my ISP and I am sending the email from a laptop behind a router.

Any help would be appreciated.


Top
   
PostPosted: Tue Nov 06, 2012 11:23 am 
Offline
Junior Member

Joined: Sun Oct 21, 2012 4:00 pm
Posts: 28
Not sure. I'd be able to tell you more if you included more information.

...

http://www.openspf.org/Tools

Quote:
We provide an e-mail based record tester. Send an e-mail to spf-test@openspf.net. Your message will be rejected (this is by design) and you will get the SPF result either in your MTA mail logs or via however your MTA reports errors to message senders (e.g. a bounce message). This is done to avoid the risk of backscatter from the tester. This test tests both MAIL FROM and HELO and provides results for both.


After, please post the resulting diagnostic / header / log information here, it would make things easier to troubleshoot.


Top
   
PostPosted: Tue Nov 06, 2012 12:21 pm 
Offline
Senior Newbie

Joined: Tue Oct 30, 2012 6:47 am
Posts: 9
Do you want to see more of /var/log/maillog?


Top
   
PostPosted: Tue Nov 06, 2012 1:46 pm 
Offline
Junior Member

Joined: Sun Oct 21, 2012 4:00 pm
Posts: 28
Sure. That, and/or anything you have related to the SPF testing.


Top
   
PostPosted: Tue Nov 06, 2012 2:23 pm 
Offline
Senior Member
User avatar

Joined: Fri Dec 11, 2009 7:09 pm
Posts: 168
joe wrote:
Nov 6 04:21:26 mail postfix/smtpd[3302]: NOQUEUE: reject: RCPT from c-24-118-254-66.hsd1.mn.comcast.net[24.118.254.66]: 450 4.1.8 <joe@AsusLaptop.hsd1.mn.comcast.net>: Sender address rejected: Domain not found; from=<joe@AsusLaptop.hsd1.mn.comcast.net> to=<joe@MYDOMAIN.COM> proto=ESMTP helo=<AsusLaptop.hsd1.mn.comcast.net>


Take my advice with a grain of salt, but that looks like you were sending an email to joe@mydomain.com not from there, and your server rejected it because it could not find the domain AsusLaptop.hsd1.mn.comcast.net.

The actual domain name would really help the folks here.

_________________
--
Chris Bryant


Top
   
PostPosted: Tue Nov 06, 2012 3:12 pm 
Offline
Senior Newbie

Joined: Tue Oct 30, 2012 6:47 am
Posts: 9
What I want to do is send and receive email from joe@MYDOMAIN.COM just like I send and receive email from a gmail account.

I can send emails to joe@MYDOMAIN.COM from my gmail account. I use Thunderbird to send the message. I easily read the email with mutt. I can't read the email with Thunderbird since the latest release of Thunderbird can't be configured to work with mail.MYDOMAIN.com and self-signed certificates. Just for the record, I read the email with:
$ mutt -f imaps://joe@MYDOMAIN.COM@mail.MYDOMAIN.COM

The problem is that I can't send emails so they come from joe@MYDOMAIN and go to my gmail account. I try to do this with mutt and the following line in .muttrc.
set smtp_url="smtp://joe@MYDOMAIN.COM@mail.MYDOMAIN.COM"
When I try to send an email to my gmail account, I am prompted for a password and then I get the error message:
"SMTP session failed: 450 4.1.8 <joe@AsusLaptop.hsd1.mn.comcast.net>: Sender address rejected: Domain not found"
The comcast.net stuff above is from my ISP and I am using a laptop behind a router.

Here are the entries in /var/log/maillog dealing with sending email from joe@MYDOMAIN.COM.

Nov 6 04:21:04 mail postfix/anvil[3241]: statistics: max connection rate 1/60s for (smtp:209.85.223.174) at Nov 6 04:17:10
Nov 6 04:21:04 mail postfix/anvil[3241]: statistics: max connection count 1 for (smtp:209.85.223.174) at Nov 6 04:17:10
Nov 6 04:21:04 mail postfix/anvil[3241]: statistics: max cache size 1 at Nov 6 04:17:10
Nov 6 04:21:21 mail postfix/smtpd[3302]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Nov 6 04:21:21 mail postfix/smtpd[3302]: connect from c-24-118-254-66.hsd1.mn.comcast.net[24.118.254.66]
Nov 6 04:21:26 mail dovecot: auth: mysql: Connected to 127.0.0.1 (mail)
Nov 6 04:21:26 mail postfix/smtpd[3302]: NOQUEUE: reject: RCPT from c-24-118-254-66.hsd1.mn.comcast.net[24.118.254.66]: 450 4.1.8 <joe@AsusLaptop.hsd1.mn.comcast.net>: Sender address rejected: Domain not found; from=<joe@AsusLaptop.hsd1.mn.comcast.net> to=<joe@MYDOMAIN.COM> proto=ESMTP helo=<AsusLaptop.hsd1.mn.comcast.net>
Nov 6 04:21:26 mail postfix/smtpd[3302]: lost connection after RCPT from c-24-118-254-66.hsd1.mn.comcast.net[24.118.254.66]
Nov 6 04:21:26 mail postfix/smtpd[3302]: disconnect from c-24-118-254-66.hsd1.mn.comcast.net[24.118.254.66]
Nov 6 04:22:21 mail postfix/smtpd[3255]: timeout after END-OF-MESSAGE from localhost[127.0.0.1]
Nov 6 04:22:21 mail postfix/smtpd[3255]: disconnect from localhost[127.0.0.1]


Last edited by joe on Tue Nov 06, 2012 3:23 pm, edited 1 time in total.

Top
   
PostPosted: Tue Nov 06, 2012 3:19 pm 
Offline
Senior Member

Joined: Wed Oct 20, 2010 12:11 pm
Posts: 142
What we want is for you to provide more information. Do you own 'MYDOMAIN.COM'?


Top
   
PostPosted: Tue Nov 06, 2012 3:26 pm 
Offline
Senior Newbie

Joined: Tue Oct 30, 2012 6:47 am
Posts: 9
OK, here it is. I hope nobody crashes it.
MYDOMAIN.COM is jhesse.com. I own it and it points to a Linode server.
I think the dns is ok.


Top
   
PostPosted: Tue Nov 06, 2012 3:34 pm 
Offline
Senior Member

Joined: Wed Oct 20, 2010 12:11 pm
Posts: 142
Sounds like whatever email program you're using isn't setting a proper From: header.


Top
   
PostPosted: Tue Nov 06, 2012 4:08 pm 
Offline
Senior Newbie

Joined: Tue Oct 30, 2012 6:47 am
Posts: 9
I'm using "mutt". I don't think it has bugs.


Top
   
PostPosted: Tue Nov 06, 2012 6:48 pm 
Offline
Senior Member
User avatar

Joined: Tue Jan 04, 2005 7:32 am
Posts: 277
Website: http://www.betadome.com/
Location: Ă…lesund, Norway
Skype: neonnero
Twitter: neonnero
You mean your e-mail address really is joe@AsusLaptop.hsd1.mn.comcast.net? Funny, a hostname lookup on "AsusLaptop.hsd1.mn.comcast.net" returns an invalid hostname for me (no IP address found for the hostname).

Your Linode server does these kinds of lookups to ensure a spammer doesn't use just any random, non-existent domain as the sender address (granted, you can configure your server to skip these checks, but I would recommend against that).

In essence you've configured your e-mail client (the one you're trying to send e-mail from) to use an invalid sender address, which is why the message is being rejected.


Top
   
PostPosted: Tue Nov 06, 2012 8:37 pm 
Offline
Senior Newbie

Joined: Tue Oct 30, 2012 6:47 am
Posts: 9
I happen to be using my Linux laptop where my user name is "joe", and the host name is "AsusLaptop" and my ISP info gets appended on.

I am only using my laptop for the email client software on the computer, mutt in this case. Think of running the Thunderbird email client on a laptop. You can send gmail from Thunderbird so it comes from the gmail SMTP server and goes to wherever you send it.

I want the same thing here with mutt as the email client. I want the email to come from my SMTP server and to go wherever I choose. I either am not using mutt properly or my SMTP is not configured properly.


Top
   
PostPosted: Tue Nov 06, 2012 9:09 pm 
Offline
Junior Member

Joined: Sun Oct 21, 2012 4:00 pm
Posts: 28
http://support.google.com/a/bin/answer.py?hl=en&answer=33786

Quote:
For example, suppose that your domain example.com uses Gmail. You create an SPF record that identifies the Google Apps mail servers as the authorized mail servers for your domain. When a recipient's mail server receives a message from user@example.com, it can check the SPF record for example.com to determine whether it is a valid message.


^There's a reason I suggested you try using the SPF checker...

If you're trying to test by sending an email to your gmail as a test, it's almost certainly guaranteed to bounce if your postfix server is sending out bogus email addresses without a valid SPF configuration.

Edited to add:

Technically, this text I'm quoting applies to google apps (email hosting using google as the provider) but my point was that the gmail / google mail servers will check SPF configuration when you send a mail to any google-hosted email address or domain.


joe wrote:
((...snip...))
I either am not using mutt properly or my SMTP is not configured properly.


Correct. You're not sending correctly (probably because mutt is configured wrong)

Would you mind posting the relevant section of your ~/.muttrc configuration file?

(minus the passwords, for obvious reasons.)

Edited again:

Actually, I think I already see your issue:

instead of:

Code:
set smtp_url="smtp://joe@MYDOMAIN.COM@mail.MYDOMAIN.COM"


try like this:

Code:
set smtp_pass=   your password goes here
set smtp_url = "smtp://mail.MYDOMAIN.COM"
set from="joe@MYDOMAIN.COM"
set realname="joe surname"


Top
   
PostPosted: Tue Nov 06, 2012 11:14 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
You can verify that Postfix is able to send outgoing mail with the following:
Code:
/usr/sbin/sendmail -t -i <<EOT
To: me@example.org
Subject: simple test

This is only a test.
EOT


Use an e-mail address that you or a friend control in the To: line.

If this works, it's just a matter of getting your e-mail client to properly submit mail.


Top
   
PostPosted: Wed Nov 07, 2012 9:31 am 
Offline
Senior Newbie

Joined: Tue Oct 30, 2012 6:47 am
Posts: 9
Still no luck. The only redacted item below is my smtp_pass.

Contents of .muttrc

set smtp_pass="redacted"
set smtp_url="smtp://mail.jhesse.com"
set from="joe@jhesse.com"
set realname="joe hesse"

=============================

Error message from mutt

SMTP session failed: 554 5.7.1 <joehesse@gmail.com>: Relay access denied

=============================

Tail of /var/log/maillog

Nov 7 07:11:27 mail postfix/anvil[3637]: statistics: max connection rate 1/60s for (smtp:24.118.254.66) at Nov 7 07:08:05
Nov 7 07:11:27 mail postfix/anvil[3637]: statistics: max connection count 1 for (smtp:24.118.254.66) at Nov 7 07:08:05
Nov 7 07:11:27 mail postfix/anvil[3637]: statistics: max cache size 1 at Nov 7 07:08:05
Nov 7 07:17:58 mail postfix/smtpd[3684]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Nov 7 07:17:58 mail postfix/smtpd[3684]: connect from c-24-118-254-66.hsd1.mn.comcast.net[24.118.254.66]
Nov 7 07:18:00 mail postfix/smtpd[3684]: NOQUEUE: reject: RCPT from c-24-118-254-66.hsd1.mn.comcast.net[24.118.254.66]: 554 5.7.1 <joehesse@gmail.com>: Relay access denied; from=<joe@jhesse.com> to=<joehesse@gmail.com> proto=ESMTP helo=<AsusLaptop.hsd1.mn.comcast.net>
Nov 7 07:18:00 mail postfix/smtpd[3684]: lost connection after RCPT from c-24-118-254-66.hsd1.mn.comcast.net[24.118.254.66]
Nov 7 07:18:00 mail postfix/smtpd[3684]: disconnect from c-24-118-254-66.hsd1.mn.comcast.net[24.118.254.66]
Nov 7 07:21:20 mail postfix/anvil[3686]: statistics: max connection rate 1/60s for (smtp:24.118.254.66) at Nov 7 07:17:58
Nov 7 07:21:20 mail postfix/anvil[3686]: statistics: max connection count 1 for (smtp:24.118.254.66) at Nov 7 07:17:58
Nov 7 07:21:20 mail postfix/anvil[3686]: statistics: max cache size 1 at Nov 7 07:17:58


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group