Linode Forum
https://forum.linode.com/

Script for send-only mail
https://forum.linode.com/viewtopic.php?f=11&t=7379
Page 1 of 1

Author:  Raydon [ Fri Jul 08, 2011 7:56 am ]
Post subject:  Script for send-only mail

Hi,

I am attempting to write a script which will allow for my vps to send mail (receiving mail is not required).

So far I have the following:

Code:
# Install postfix
echo "postfix postfix/main_mailer_type select Internet Site" | debconf-set-selections
echo "postfix postfix/mailname string $setting_hostname" | debconf-set-selections
echo "postfix postfix/destinations string localhost.localdomain, localhost" | debconf-set-selections
aptitude -y install postfix

/usr/sbin/postconf -e "inet_interfaces = loopback-only"
/usr/sbin/postconf -e "local_transport = error:local delivery is disabled"

# Ensure postfix will start at boot
/usr/sbin/update-rc.d postfix defaults

# Install mailutils to be able to send using the mail command
aptitude -y install mailutils

# Restart to apply changes
/etc/init.d/postfix start


This works and allows me to send mail using the mail command. However, I wanted to be sure that I hadn't missed anything out.

Any pointers would be appreciated

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/