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

I am using provider mail hosting to send emails. On my Webserver I also have Postfix running and configured. Here is my main.cf


smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = yes
readme_directory = no
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
myhostname = 2-5-8.bih.net.ba
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = bhcom.info, 2-5-8.bih.net.ba, localhost.bih.net.ba, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = 
mailbox_size_limit = 10485760
recipient_delimiter = +
inet_interfaces = 80.65.85.114

When I try sending email to my hosted domain name, every message gets bounced with this error:

Nov  4 20:38:34 2-5-8 postfix/pickup[802]: 1492A3E0C6C: uid=0 from=<razvoj@bhcom.info>
Nov  4 20:38:34 2-5-8 postfix/cleanup[988]: 1492A3E0C6C: message-id=<20121104193834.1492A3E0C6C@2-5-8.bih.net.ba>
Nov  4 20:38:34 2-5-8 postfix/qmgr[803]: 1492A3E0C6C: from=<razvoj@bhcom.info>, size=348, nrcpt=1 (queue active)
Nov  4 20:38:34 2-5-8 postfix/local[990]: 1492A3E0C6C: to=<info@bhcom.info>, relay=local, delay=0.12, delays=0.08/0.01/0/0.04, dsn=5.1.1, status=bounced (unknown user: "info")
Nov  4 20:38:34 2-5-8 postfix/cleanup[988]: 28ED53E0C6D: message-id=<20121104193834.28ED53E0C6D@2-5-8.bih.net.ba>
Nov  4 20:38:34 2-5-8 postfix/qmgr[803]: 28ED53E0C6D: from=<>, size=2056, nrcpt=1 (queue active)
Nov  4 20:38:34 2-5-8 postfix/bounce[991]: 1492A3E0C6C: sender non-delivery notification: 28ED53E0C6D
Nov  4 20:38:34 2-5-8 postfix/qmgr[803]: 1492A3E0C6C: removed
Nov  4 20:38:34 2-5-8 postfix/local[990]: 28ED53E0C6D: to=<razvoj@bhcom.info>, relay=local, delay=0.06, delays=0.03/0/0/0.02, dsn=5.1.1, status=bounced (unknown user: "razvoj")
Nov  4 20:38:34 2-5-8 postfix/qmgr[803]: 28ED53E0C6D: removed

However, when I try to @gmail.com, it sends message without problems, and here is log. What might be the issue?

Nov  4 20:41:23 2-5-8 postfix/pickup[802]: B2EC63E0C6C: uid=0 from=<razvoj@bhcom.info>
Nov  4 20:41:23 2-5-8 postfix/cleanup[1022]: B2EC63E0C6C: message-id=<20121104194123.B2EC63E0C6C@2-5-8.bih.net.ba>
Nov  4 20:41:23 2-5-8 postfix/qmgr[803]: B2EC63E0C6C: from=<razvoj@bhcom.info>, size=350, nrcpt=1 (queue active)
Nov  4 20:41:23 2-5-8 postfix/smtp[1024]: connect to gmail-smtp-in.l.google.com[2a00:1450:4001:c02::1a]:25: Network is unreachable
Nov  4 20:41:24 2-5-8 postfix/smtp[1024]: B2EC63E0C6C: to=<amerzec@gmail.com>, relay=gmail-smtp-in.l.google.com[173.194.70.26]:25, delay=0.97, delays=0.08/0.01/0.27/0.62, dsn=2.0.0, status=sent (250 2.0.0 OK 1352058066 f7si2180442eeo.46)
Nov  4 20:41:24 2-5-8 postfix/qmgr[803]: B2EC63E0C6C: removed
share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Well, the log says it:

Nov  4 20:38:34 2-5-8 postfix/local[990]: 1492A3E0C6C: to=<info@bhcom.info>, relay=local, delay=0.12, delays=0.08/0.01/0/0.04, dsn=5.1.1, status=bounced (unknown user: "info")
Nov  4 20:38:34 2-5-8 postfix/local[990]: 28ED53E0C6D: to=<razvoj@bhcom.info>, relay=local, delay=0.06, delays=0.03/0/0/0.02, dsn=5.1.1, status=bounced (unknown user: "razvoj")

You have no local user info and no razvoj the local delivery could deliver mail to. If I understood your post correctly, you do want to send mail from that machine, but this is not your mail server where you want to receive and read it, right?

If it's correct, just drop bhcom.info from mydestination and everything should be fine.

A bit of background: every hostname listed in mydestination is considered local by Postfix and then itr tries to deliver the mail to that local user, which in your case does not exists.

share|improve this answer
    
Yes, this is my machine serving website which needs to be able to send email. That was absolutely correct. Thanks for background. –  ZeC Nov 4 '12 at 20:52
    
BTW, I would recommend configuring Postfix to send mail over your providers mailservers if that's possible. Some receiving servers have very crude rules for allowing mail and sending from the "official" server for your domain might help here :) The configuration option is relayhost, the internet has some docs on that topic :) –  zhenech Nov 4 '12 at 21:04
add comment

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.