Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm using vps server with ubuntu 10.04 when i send email i got this:

Mar 19 18:09:01 mail postfix/smtp[6340]: 8FAF722294: to=<root@mydomain.com>, orig_to=<root>, relay=none, delay=0.09, delays=0.08/0.01/0/0, dsn=5.4.6, status=bounced (mail for mydomain.com loops back to myself)

I look around inforums to find the solution but in vain even i changed my Postfix settings:

My destination setting was like this

mail.mydomain.com, localhost.mydomain.com, , localhost

i changed it to this

$mail.mydomain.com, localhost, localhost.mydomain.com, mydomain.com

i made many variations but still not working.

the output of cat /etc/mailname

mail.mydomain.com

the output of postconf -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 2
mydestination = localhost.$mydomain.com, localhost, mail.mydomain.com
myhostname = mail.dimonos.info
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 ip
myorigin = $mydomain
non_smtpd_milters = inet:localhost:8891
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_milters = inet:localhost:8891
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
share|improve this question
    
Do you want the mail to be delivered locally or externally? –  ring0 Mar 20 '13 at 11:27
    
locally i use my own smtp to send an email. –  Cjay Omar Mar 20 '13 at 11:33

1 Answer 1

Based on comments:

The problem is the sending of a mail to hotmail.com, thus the problem is unlikely to be linked to mydestination, and it appears DNS resolution is not setup.

In this case please put a value in /etc/resolv.conf either based from your ISP data (DNS servers), or use the Google server - eg for Google:

nameserver 8.8.8.8
nameserver 8.8.4.4

then try to resolve the MX entries for hotmail.com

host -t mx hotmail.com

If that works, you can now try to send an email to hotmail.com

Note: if you use the NetworkManager, use it instead to set the DNS servers values.

Note2: if that doesn't work, please display the last lines of /var/log/mail.log

-- edit - previous answer for a local delivery problem --

The $mydomain variable (some info) is set to the local machine name minus the first component (/etc/mailname is used on Debian). When you send a mail to root@mydomain.com a MX DNS query is performed to identify what server is expected to accept the mail. The first step is to check what is that server

host -t mx mydomain.com

that will give you what you have to add to mydestination for postfix to understand the mail is to be delivered locally,

mydestination = localhost.$mydomain, localhost, mail.$mydomain

If the result is actually your domain (you can check the name with

hostname
uname -n

if you get a FQDN entity, remove the first component - e.g. for home.mydomain.com, your domain as set by posftix is domain.com. And ensure that value is in mydestination (if the value from host it is the same as $mydomain, simply set

mydestination = localhost.$mydomain, localhost, mail.$mydomain, $mydomain
share|improve this answer
    
when i check host -t mx mydomain.com it tells host: parse of /etc/resolv.conf failed and when i check my hotname is mail.mydomain.info –  Cjay Omar Mar 20 '13 at 11:53
    
That means your system cannot send mail outside since DNS resolution is not setup - this is not the problem anyway. Add $mydomain to mydestination and mail should be delivered locally (or simply add 'mydomain.info', the mail should go to 'root@mydomain.info') –  ring0 Mar 20 '13 at 11:59
    
i have already send an email Gmail and works fine. the loop back to myself appair when i try to send to hotmail. –  Cjay Omar Mar 20 '13 at 12:04
    
Ah, this is the opposite problem! Let me edit the answer... –  ring0 Mar 20 '13 at 12:13
    
In this case, what can i do ? –  Cjay Omar Mar 20 '13 at 12:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.