LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 12-10-2011, 09:05 PM   #1
Bushytea
LQ Newbie
 
Registered: Jun 2008
Distribution: Centos 5.2
Posts: 6

Rep: Reputation: 0
Can't Send Mail from Smart Phone or Outlook


Hi,

I am running a server with Centos 5.2, Postfix 2.3.3 and Dovecot. The server is not on my local network so it is not behind my router.

I can send mail to/from the email account on the server. (Ex: Send mail from server account to aol account then send mail from aol account back to server account)

I can even see the mail that is in the users mailbox from my phone but I am not able to send. When I try to setup the account in Outlook or try to send mail from my phone they both say they are unable to connect to the smtp server. When I test the settings in Outlook it says that it logs in successfully but cannot connect to the smtp server. There are no errors in my maillog either but there are no signs that there was any attempt to connect either.I have searched and found tons of how-tos but just can not get it to work.

Maillog:

Quote:
Dec 10 21:03:26 sendmail[29858]: alias database /etc/aliases rebuilt by root
Dec 10 21:03:26 sendmail[29858]: /etc/aliases: 72 aliases, longest 10 bytes, 700 bytes total
Dec 10 21:03:27 postfix/postfix-script: starting the Postfix mail system
Dec 10 21:03:27 postfix/master[29904]: daemon started -- version 2.3.3, configuration /etc/postfix
Dec 10 21:03:28 postfix/postfix-script: stopping the Postfix mail system
Dec 10 21:03:28 postfix/master[29904]: terminating on signal 15
Dec 10 21:03:28 sendmail[29921]: alias database /etc/aliases rebuilt by root
Dec 10 21:03:28 sendmail[29921]: /etc/aliases: 72 aliases, longest 10 bytes, 700 bytes total
Dec 10 21:03:28 postfix/postfix-script: starting the Postfix mail system
Dec 10 21:03:28 postfix/master[29967]: daemon started -- version 2.3.3, configuration /etc/postfix
Results from telnet mail.domain.com 25 is:

Quote:
ehlo host
250-mail.domain.com
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
Here is part of my main.cf from posfix:

Quote:
myhostname = mail.domain.com
mydomain = domain.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, $mydomain
mynetworks = 127.0.0.0/8 168.100.189.2/32
alias_maps = hash:/etc/aliases
#
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_invalid_hostname reject_non_fqdn_hostname reject_non_fqdn_sender reject_non_fqdn_recipient reject_unknown_sender_domain reject_unknown_recipient_domain reject_rbl_client zen.spamhaus.org permit
smtpd_helo_required = yes
disable_vrfy_command = yes
smtpd_delay_reject = no

# SASL Authentication
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
Then here is my dovecot.conf

Quote:
protocols = imap pop3
listen = *
disable_plaintext_auth = no
pop3_uidl_format = %08Xu%08Xv
mechanisms = plain login
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
Thanks!

Last edited by Bushytea; 12-10-2011 at 09:08 PM.
 
Old 12-11-2011, 05:18 PM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Code:
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_invalid_hostname reject_non_fqdn_hostname reject_non_fqdn_sender reject_non_fqdn_recipient reject_unknown_sender_domain reject_unknown_recipient_domain reject_rbl_client zen.spamhaus.org
this line is somewhere not allowing you to "relay" the messages (emails) you want to send.
I don't know exactly which, but if misconfigured, then you became an open relay for spammers (which in this case your Postfix treats you).

Quote:
Results from telnet mail.domain.com 25 is:
Code:
ehlo host
250-mail.domain.com
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
I would try more than just this Telnet login,
try to send some real message and see the Log and output why it doesn't:
Code:
telnet yourserverdomain.net 25
250-mail.domain.com
EHLO FQDN server name or something
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN 
mail from: some_your_email@address.com
250 2.1.0 Ok
rcpt to: doesnt@example.com  <--- try your real email address for test
554 5.7.1 <doesnt_exist@example.com>: Relay access denied
Now you get a "Relay access denied" message from your server which points to restrictions in the line stated at beginning.

good luck
 
Old 12-19-2011, 01:42 PM   #3
Bushytea
LQ Newbie
 
Registered: Jun 2008
Distribution: Centos 5.2
Posts: 6

Original Poster
Rep: Reputation: 0
Well I made some progress today on this issue but still need some help/advice.

I changed the below line from
Quote:
myhostname = mail.domain.com
to
Quote:
myhostname = domain.com
I also changed the line
Quote:
mynetworks = 127.0.0.0/8 168.100.189.2/32
to
Quote:
mynetworks_style = subnet
Now I have been able to send email from my phone to an AOL email account successfully. However when I try to setup an account in Outlook it keeps giving me the error below.

Quote:
Send test e-mail message: Outlook cannot connect to your outgoing (SMTP) e-mail server. If you continue to receive this message, contact your server administrator or Internet service provider (ISP).
What would allow my phone to work now but not allow outlook to connect?

Thanks
 
Old 12-20-2011, 05:58 AM   #4
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Your DOVECOT port 110 for POP3 access might be inaccessible. Probably you don't have it running or blocked by firewall not to allow incoming connections on port 110.

Quote:
myhostname = domain.com
can be configured as written in Postfix configuration

under section
My own hostname near bottom end of page.
 
  


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
Block Outlook user to send mail jjena Linux - Newbie 3 06-23-2010 12:59 AM
Outlook can not send mail to external domains fhejazi General 7 09-08-2006 02:48 PM
I cannot send mail using Outlook and sendmail server? tthai01 Linux - Networking 2 02-12-2003 08:59 AM
I can recieve mail (outlook) but i cant send mail hal_baumgardner Linux - Networking 4 07-13-2001 08:54 AM

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

All times are GMT -5. The time now is 12:26 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