LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-27-2013, 03:25 AM   #1
mjsubbu
LQ Newbie
 
Registered: Dec 2013
Posts: 3

Rep: Reputation: Disabled
Unhappy relay host failed to send mail to outside domain in postfix


Hi Experts,

I am a newbie for postfix. I have configured my postfix mail server to relay our intranet mail as well as outbound mails.

The internal mailing is working. when I try to send mails to outside domain ( like .gmail.com) it is giving the below error. Please help me.

I have issues the command from user1 as below :

[user1@yyyyyyy ~]$ echo "testmailing: 11.30" |mail -s "PostFix this elayaraja Test 27122013:11.30" mjsubramanian@gmail.com


#

Dec 27 13:49:41 yyyyyyy sendmail[16794]: rBR8Jel0016794: from=user1, size=272, class=0, nrcpts=1, msgid=<201312270819.rBR8Jel0016794@yyyyyyy.xxxxxxxxxx.in>, relay=user1@localhost
Dec 27 13:49:41 yyyyyyy postfix/smtpd[16795]: connect from localhost.localdomain[127.0.0.1]
Dec 27 13:49:41 yyyyyyy postfix/smtpd[16795]: 15E6816005D: client=localhost.localdomain[127.0.0.1]
Dec 27 13:49:41 yyyyyyy postfix/cleanup[16798]: 15E6816005D: message-id=<201312270819.rBR8Jel0016794@yyyyyyy.xxxxxxxxxx.in>
Dec 27 13:49:41 yyyyyyy sendmail[16794]: rBR8Jel0016794: to=mjsubramanian@gmail.com, ctladdr=user1 (507/507), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30272, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 15E6816005D)
Dec 27 13:49:41 yyyyyyy postfix/qmgr[16325]: 15E6816005D: from=<user1@yyyyyyy.xxxxxxxxxx.in>, size=792, nrcpt=1 (queue active)
Dec 27 13:49:41 yyyyyyy postfix/smtpd[16795]: disconnect from localhost.localdomain[127.0.0.1]
Dec 27 13:49:43 yyyyyyy postfix/smtp[16799]: 15E6816005D: to=<mjsubramanian@gmail.com>, relay=smtp.xxxxxxxxxx.in[70.87.29.223]:25, delay=2.2, delays=0.08/0.01/1.7/0.38, dsn=5.7.1, status=bounced (host smtp.xxxxxxxxxx.in[70.87.29.223] said: 554 5.7.1 <mjsubramanian@gmail.com>: Relay access denied (in reply to RCPT TO command))
Dec 27 13:49:43 yyyyyyy postfix/cleanup[16798]: 93DE916005C: message-id=<20131227081943.93DE916005C@yyyyyyy.xxxxxxxxxx.in>
Dec 27 13:49:43 yyyyyyy postfix/bounce[16800]: 15E6816005D: sender non-delivery notification: 93DE916005C
Dec 27 13:49:43 yyyyyyy postfix/qmgr[16325]: 93DE916005C: from=<>, size=2936, nrcpt=1 (queue active)
Dec 27 13:49:43 yyyyyyy postfix/qmgr[16325]: 15E6816005D: removed
Dec 27 13:49:43 yyyyyyy postfix/local[16801]: 93DE916005C: to=<user1@xxxxxxxxxx.in>, orig_to=<user1@yyyyyyy.xxxxxxxxxx.in>, relay=local, delay=0.07, delays=0.03/0.01/0/0.04, dsn=2.0.0, status=sent (delivered to maildir)
Dec 27 13:49:43 yyyyyyy postfix/qmgr[16325]: 93DE916005C: removed




My postconf out is here:

# postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, xxxxxxxxx.in
mydomain = xxxxxxxxx.in
myhostname = yyyy.xxxxxxxxx.in
mynetworks = 192.168.1.0/24, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relayhost = [smtp.xxxxxxxxxx.in]
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_cname_overrides_servername = no
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/saslpw
smtp_sasl_security_options = noanonymous
smtp_sender_dependent_authentication = yes
unknown_local_recipient_reject_code = 550
#
 
Old 12-27-2013, 03:48 AM   #2
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,385

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
I would guess that you are not authenticating properly to your relay, so it is rejecting your attempt to send.
Check these settings and associated files for validity
Code:
relayhost = [smtp.xxxxxxxxxx.in]
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/saslpw
smtp_sender_dependent_authentication = yes
 
Old 12-27-2013, 04:28 AM   #3
mjsubbu
LQ Newbie
 
Registered: Dec 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi descendant_command,

Thank you very much for your update.

Here is my sender_reply and saslpw files output. I have verified the smtp.XXXXXXXXXX.in is working fine. I could able to download mails to my outlook.
The webmail tomy server also working for the same users with the same password.

Any idea what I am missing here. The syntax or anything.


[root@yyyyyy postfix]# cat sender_relay
user1@xxxxxxxx.in smtp.xxxxxxxx.in
user2@xxxxxxxx.in smtp.xxxxxxxx.in
user2@xxxxxxxx.in smtp.xxxxxxxx.in
user4@xxxxxxxx.in smtp.xxxxxxxx.in


[root@yyyyyy postfix]# cat saslpw
user1@xxxxxxx.in user1@xxxxxxx.inassword
user2@xxxxxxx.in user2@xxxxxxx.inassword
user3@xxxxxxx.in user3@xxxxxxx.inassword
user4@xxxxxxx.in user4@xxxxxxx.inassword
 
Old 12-27-2013, 05:13 AM   #4
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,385

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Just to be clear - smtp.XXXXXXXXXX.in is your ISP's SMTP relay (or such - external relay anyway), yes?
Not your own server?

Because it is pretty difficult to tell with everything munged with X's ...

I don't know much about the auth syntax for that as I don't use an external relay for my servers.
But it's pretty clear it doesn't like you, so you should verify the name/pw being sent, and that it is one that works.

You could increase the verbosity of the postfix logging, or best, tcpdump the SMTP session to see exactly what is being passed and replied.
 
Old 12-27-2013, 02:31 PM   #5
mjsubbu
LQ Newbie
 
Registered: Dec 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi,

Thank you for the update.

This smtp.XXXXXXX.in is our mail servers SMTP. It is not any other third party ISP's. I could able resolve the smtp from my mail server.

Actually I am using this mail server as MTA only to distribute the mail locally to the users in Intranet.

[root@YYYYYY]# nslookup smtp.XXXXXXXXXXXX.in
Server: 122.165.223.1
Address: 122.165.223.1#53

Non-authoritative answer:
smtp.XXXXXXXXXXXX.in canonical name = smtp.ZZZZZZZZZZ.com.

Name: smtp.ZZZZZZZZZZ.com
Address: 70.87.29.223
Name: smtp.ZZZZZZZZZZ.com
Address: 70.87.29.14
Name: smtp.ZZZZZZZZZZ.com
Address: 70.87.29.134


Any how I will double check the user and SMTP authentication once again.

I have one more doubt. I found something new when I ran a nslookup for my smtp. It gave me a canonical name for the smtp host. Do I need to use the canonical name instead of the direct SMTP host name.

Please look at the above output.

Do I need to use smtp.XXXXXXX.in or smtp.ZZZZZZZ.in?.

Thanks in advance.
 
Old 12-27-2013, 03:46 PM   #6
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,385

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Sorry, you lost me. I still have no idea of your setup.

One thing though, any MX record should point to an A record NOT a CNAME (although that probably has nothing to do with your relay issue).

Good luck - I'm off to the beach ...
 
  


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
how to make postfix only relay certain domain mail? jimmyjiang Red Hat 7 02-06-2013 07:08 AM
Configure postfix to send mail direct or a via relay wim1977 Linux - Server 2 04-14-2012 12:54 PM
postfix relay error Host or domain name not found. zeos386sx Linux - Server 10 04-17-2010 04:20 PM
Postfix - Single domain with multipe relay host jignesh.vasani Linux - Software 10 11-30-2009 05:53 PM
Postfix+Dovecot error : RELAY ACCESS DENIED when send mail out to Other domain simon.unix Linux - Networking 6 09-16-2009 11:54 AM


All times are GMT -5. The time now is 08:17 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration