Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Mar 17, 2015 7:02 pm 
Offline
Newbie

Joined: Tue Mar 17, 2015 6:49 pm
Posts: 4
Complete noob with this stuff so please bare with me.

At the moment I am using this strictly for hosting MySQL db's. I would like to be able to receive system emails though whether those be alerts or notifications that upgrades are available. I did some research today, but can't seem to get this working (the emails are never received).

/etc/postfix/main.cf

Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost, localhost.localdomain, , localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
inet_protocols = all


/etc/aliases
Code:
# See man 5 aliases for format
postmaster:    root
# added 03/17/15 so root emails are forwarded
root:          me@example.com


Obviously that is not my email. Any ideas here or possibly point me in the right direction? I have use the mail command in ssh to send some test emails to myself and they do not come through. Webmin is also installed and it allows test emails to be sent from within its interface as well which are not received either.


Top
   
PostPosted: Tue Mar 17, 2015 7:17 pm 
Offline
Newbie

Joined: Tue Mar 17, 2015 6:49 pm
Posts: 4
Some additional info here. Just checked email from within Webmin and there are some settings obviously missing/wrong. I did not do the initial setup of this server either.

The email headers are showing :

From MAILER-DAEMON@localhost (Mail Delivery System)
To root@localhost
Date 17/03/2015 16:58
Subject Undelivered Mail Returned to Sender

failed delivery status :

Final recipient me@example.com
Reason for failure 550 Access denied - Invalid HELO name (See RFC2821
Remote mail server example.com
Reporting mail server localhost


Top
   
PostPosted: Tue Mar 17, 2015 8:49 pm 
Offline
Newbie

Joined: Tue Mar 17, 2015 6:49 pm
Posts: 4
In /etc/postfix/main.cf I needed myhostname = li******.members.linode.com. Restarted postfix afterwards.

echo "This is the body of the email" | mail -s "This is the subject line" user@example.com

is being received

echo "This is the body of the email" | mail -s "This is the subject line" root

is NOT being received

What else do I need to do here? The root/system emails is what I really need to work.


Top
   
PostPosted: Wed Mar 18, 2015 5:52 pm 
Offline
Senior Member

Joined: Fri Feb 13, 2015 8:12 pm
Posts: 101
Try
Code:
dpkg-reconfigure postfix

and choose "Internet Site". Use that as your starting point.

(You are apparently using "Local only" which means no email is forwarded outside).


Top
   
PostPosted: Fri Mar 20, 2015 4:14 am 
Offline
Newbie

Joined: Tue Mar 17, 2015 6:49 pm
Posts: 4
That is what was chosen.

What I ended up doing was changing the email that Webmin was sending from. The default was 'webmin@osprey.111.111.111.111' and I changed this to 'root@li****.members.linode.com' and that did the trick.

Why did that work? I have no idea to be honest.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group