Email from my VPS
I now have a couple of sites setup on my Linode VPS. I have noticed I can't send email from any of them. I am running ubuntu 10 on my server.
I dont' know if and how apache needs to be configured to enable emailing.
Can anyone please help me out and tell me how to go about this, please ?
11 Replies
@obs:
How are you trying to send the email? (php/python/ruby/whatever?), do you have postfix installed?
I am using PHP. I don't know if postfix is installed, how to check and how to install if necessary ….. please help the newbie
@obs:
what distribution are you using? for debian/ubuntu it would be aptitude show postfix and next to state it will say State: Installed if you have it.
It's ubuntu 10 and it is not installed.
I have been looking at this tutorial :
It seems long and rather complex.
Can you direct me to a possibly simpler and shorted installation process ?
apt-get install postfix
Then edit /etc/postfix/main.cf to the following
# 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 = $mydomain
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 = <your server="" hostname="">alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost, localhost.$mydomain, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all</your>
You need to replace
ssmtp
I sampled the email at that point and it worked without any further intervention.
Thank you all
relayhost =
Is empty (it probably is) so people can't send spam through your server.
@obs:
Just make sure
relayhost =
Is empty (it probably is) so people can't send spam through your server.
Checked that immediately. It was empty as you suspected.
Thanks for the headsup
@obs:
Just make sure
relayhost =
Is empty (it probably is) so people can't send spam through your server.
The "relayhost" parameter does not stop others from using your server for relaying email. This parameter defines if email will be sent directly through the internet, or if it will user another email server to send email. See
You can disable relaying by only allowing emails to be sent only from specific origin ip addresses. See [http://www.postfix.org/BASICCONFIGURATIONREADME.html#relayfrom~~http://www.postfix.org/postconf.5.html#mynetworks