I'm trying to sending email from nagios monitoring to some email addresses. But I have a problem with setup my from domain when I'm sending an email every time my from email address seems like this:
from=<root@patrik-VirtualBox>
and format like this some mail servers are rejecting.
so I need replace @patrik-VirtualBox
to my domain @onedata.sk
here is my /etc.postfix/main.cf:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
mailbox_command =
mailbox_size_limit = 0
mydestination = mail.onedata.sk, localhost.localdomain, localhost, yourdomain.com
myhostname = onedata.sk
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
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
from log:
Feb 3 01:55:56 patrik-VirtualBox postfix/pickup[10655]: E2FFA66C36: uid=0 from=<root@patrik-VirtualBox>
Feb 3 01:55:56 patrik-VirtualBox postfix/cleanup[10963]: E2FFA66C36: message-id=<20150203005556.E2FFA66C36@onedata.sk>
Feb 3 01:55:56 patrik-VirtualBox postfix/qmgr[10656]: E2FFA66C36: from=<root@patrik-VirtualBox>, size=340, nrcpt=1 (queue active)
Feb 3 01:56:35 patrik-VirtualBox postfix/smtp[10965]: E2FFA66C36: to=<patrik.kristel@onedata.sk>, relay=mailhub.nextra.sk[195.168.1.42]:25, delay=38, delays=0.03/0.01/30/8, dsn=5.0.0, status=bounced (host mailhub.nextra.sk[195.168.1.42] said: 517 Syntax error. (in reply to MAIL FROM command))
I have also tried to set up relayhost
or this topic, but it didn't help.
I have configured it in another server like this and there it works fine, so I don't understand why it doesn't work.